OSX 10.4.6 compiling mod files

Post Reply
tort
Posts: 8
Joined: Thu May 18, 2006 6:16 pm
Location: Boston University

OSX 10.4.6 compiling mod files

Post by tort »

Hi, I'm having a problem when I try to compile .mod files (for instance, I'm trying to compile a simple passive.mod, and I'm using an apple laptop with OSX 10.4.6 and NEURON 5-8). I drag the file to mknrndll and it partially compiles, it creates a powerpc directory with passive.c and passive.lo files inside (among others), but I can't find neither any passive.o file nor nrnmech.dll (in all my computer, not only in this directory).

And I get the following msg for this compilation

Creating powerpc directory for .o files.

"/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/bin/nocmodl" passive
Translating passive.mod into passive.c
VECTORIZED
"/Volumes/NEURON-5.8/NEURON-5.8/nrn/share/nrn/libtool" --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I"/Volumes/NEURON-5.8/NEURON-5.8/nrn/include/nrn" -I"/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib" -g -O2 -c -o passive.lo passive.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I.. -I/Volumes/NEURON-5.8/NEURON-5.8/nrn/include/nrn -I/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib -g -O2 -c passive.c -fno-common -DPIC -o .libs/passive.o
"/Volumes/NEURON-5.8/NEURON-5.8/nrn/share/nrn/libtool" --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I"/Volumes/NEURON-5.8/NEURON-5.8/nrn/include/nrn" -I"/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib" -g -O2 -c -o mod_func.lo mod_func.c
gcc -DHAVE_CONFIG_H -I. -I.. -I/Volumes/NEURON-5.8/NEURON-5.8/nrn/include/nrn -I/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib -g -O2 -c mod_func.c -fno-common -DPIC -o .libs/mod_func.o
"/Volumes/NEURON-5.8/NEURON-5.8/nrn/share/nrn/libtool" --mode=link gcc -module -g -O2 -o libnrnmech.la -rpath "/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib" passive.lo mod_func.lo -L"/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib" -lnrnoc -loc -lmemacs -lscopmath -lsparse13 -lreadline -lncurses
libtool: link: warning: library `/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libnrnoc.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/liboc.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libmemacs.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libscopmath.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libsparse13.la' was moved.
gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/libnrnmech.0.0.0.so -bundle .libs/passive.o .libs/mod_func.o -L/Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libnrnoc.dylib /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/liboc.dylib /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libmemacs.dylib /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libscopmath.dylib /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libsparse13.dylib -lreadline -lncurses
/usr/bin/ld: warning /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libnrnoc.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/liboc.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libmemacs.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libscopmath.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /Volumes/NEURON-5.8/NEURON-5.8/nrn/powerpc/lib/libsparse13.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
(cd .libs && rm -f libnrnmech.0.so && ln -s libnrnmech.0.0.0.so libnrnmech.0.so)
(cd .libs && rm -f libnrnmech.so && ln -s libnrnmech.0.0.0.so libnrnmech.so)
creating libnrnmech.la
(cd .libs && rm -f libnrnmech.la && ln -s ../libnrnmech.la libnrnmech.la)
Successfully created powerpc/special
Press 'return' key to close


Any idea of what is happening?

Thank you very much.
hines
Site Admin
Posts: 1600
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

The nrn-5.8.88 predates the release of i686-apple-darwin
One of the dmg files for apple OS X in the http://www.neuron.yale.edu/ftp/neuron/versions/alpha/
is for the powerpc and one is for the i686. Try http://www.neuron.yale.edu/ftp/neuron/v ... n8.6.1.dmg
tort
Posts: 8
Joined: Thu May 18, 2006 6:16 pm
Location: Boston University

Post by tort »

Ok, now when I drag my passive.mod to mknrndll, it creates a i686 folder with the files: libnrnmech.la ; mod_func.c ; passive.c ; passive.lo ; special ; mod_func_lo ; and a shortcut to passive.mod , and I get the following messages


Creating i686 directory for .o files.

"/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/bin/nocmodl" passive
Translating passive.mod into passive.c
VECTORIZED
"/Volumes/NEURON-5.9/NEURON-5.9/nrn/share/nrn/libtool" --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I"/Volumes/NEURON-5.9/NEURON-5.9/nrn/include/nrn" -I"/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib" -g -O2 -c -o passive.lo passive.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I.. -I/Volumes/NEURON-5.9/NEURON-5.9/nrn/include/nrn -I/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib -g -O2 -c passive.c -fno-common -DPIC -o .libs/passive.o
"/Volumes/NEURON-5.9/NEURON-5.9/nrn/share/nrn/libtool" --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I"/Volumes/NEURON-5.9/NEURON-5.9/nrn/include/nrn" -I"/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib" -g -O2 -c -o mod_func.lo mod_func.c
gcc -DHAVE_CONFIG_H -I. -I.. -I/Volumes/NEURON-5.9/NEURON-5.9/nrn/include/nrn -I/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib -g -O2 -c mod_func.c -fno-common -DPIC -o .libs/mod_func.o
"/Volumes/NEURON-5.9/NEURON-5.9/nrn/share/nrn/libtool" --mode=link gcc -module -g -O2 -o libnrnmech.la -rpath "/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib" passive.lo mod_func.lo -L"/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib" -lnrnoc -loc -lmemacs -lscopmath -lsparse13 -lreadline -lncurses
libtool: link: warning: library `/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libnrnoc.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/liboc.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libmemacs.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libscopmath.la' was moved.
libtool: link: warning: library `/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libsparse13.la' was moved.
gcc -bundle -flat_namespace -undefined suppress -o .libs/libnrnmech.0.so .libs/passive.o .libs/mod_func.o -L/Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib /Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libnrnoc.0.0.0.dylib /Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/liboc.0.0.0.dylib /Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libmemacs.0.0.0.dylib /Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libscopmath.0.0.0.dylib /Volumes/NEURON-5.9/NEURON-5.9/nrn/i686/lib/libsparse13.0.0.0.dylib -lreadline -lncurses
(cd .libs && rm -f libnrnmech.so && ln -s libnrnmech.0.so libnrnmech.so)
(cd .libs && rm -f libnrnmech.0.0.0.so && ln -s libnrnmech.0.so libnrnmech.0.0.0.so)
creating libnrnmech.la
(cd .libs && rm -f libnrnmech.la && ln -s ../libnrnmech.la libnrnmech.la)
Successfully created i686/special
Press 'return' key to close


So, everything seems to be working fine, but I still don't have any passive.o nor nrnmech.dll, though I dont know if they are really necessary, I am just asking about these files beacause I read in a tutorial they should be created.

So, my passive.mod is as follows:

TITLE Passive

NEURON {
SUFFIX leak
NONSPECIFIC_CURRENT i
RANGE i, e, g
}
PARAMETER {
g = 0.001 (siemens/cm2) < 0, 1e9 >
e = -65 (millivolt)
}
ASSIGNED {
i (milliamp/cm2)
v (millivolt)
}
BREAKPOINT { i = g*(v - e) }


Then I created the folllowing teste.hoc:

// make graphical interface tools available to this program
load_file("nrngui.hoc")

// specify the properties of the model cell
create soma // model topology
access soma // default section = soma

soma {
nseg = 1
diam = 10 // soma dimensions in um
L = 10/PI // surface area = 100 um^2
insert leak
}

and when I drag this test.hoc to nrngui I get (after typing psection()):


NEURON -- Version 5.9 2006-4-28 11:45:58 Main (28)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005

loading membrane mechanisms from /Users/Tort/Desktop/teste/i686/.libs/libnrnmech.so
Additional mechanisms from files
passive.mod
dlopen("/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib") failed: dlopen(/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib, 10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib: mach-o, but wrong architecture
JNI_CreateJavaVM returned -1
Info: optional feature Java VM is not present.
1

oc>psection()
soma { nseg=1 L=3.1831 Ra=35.4
/*location 0 attached to cell 0*/
/* First segment only */
insert morphology { diam=10}
insert capacitance { cm=1}
insert leak { g_leak=0.001 e_leak=-65}
}
1
oc>


So, leak is there, and I guess it should be working properly, except for this message above: dlopen (bla bla bla) failed ... wrong architeture etc which I don't know if it is important or not.

If you think I should do anything else because of these messages (or because of the absence of .o and nrnmech.dll) please let me know, otherwise I guess I can start working with it.

Thank you very much for your attention.
ted
Site Admin
Posts: 5784
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

tort wrote:Successfully created i686/special
Press 'return' key to close

So, everything seems to be working fine
The msg "Successfully created . . . " means "yes."
but I still don't have any passive.o nor nrnmech.dll, though I dont know if they are really necessary, I am just asking about these files beacause I read in a tutorial they should be created.
The tutorial antedates the advent of i686 Macs. i686/special is a shell
script that pulls together the core NEURON executable and the additional
object code that implements your compiled mechanisms.
and when I drag this test.hoc to nrngui I get (after typing psection()):


NEURON -- Version 5.9 2006-4-28 11:45:58 Main (28)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005

loading membrane mechanisms from /Users/Tort/Desktop/teste/i686/.libs/libnrnmech.so
Additional mechanisms from files
passive.mod
NEURON prints out its "welcome" message before you have the
opportunity to execute psection(). This particular msg tells you the
location and name of the file that contains the compiled mechanisms.
dlopen("/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib") failed: dlopen(/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib, 10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib: mach-o, but wrong architecture
JNI_CreateJavaVM returned -1
Info: optional feature Java VM is not present.
Ignore this msg. It is relevant only if you want to use Java with NEURON.
None of NEURON's standard tools requires Java, and only a small number
of people have ever bothered to use Java with NEURON.

Code: Select all

oc>psection()
soma { nseg=1  L=3.1831  Ra=35.4
        /*location 0 attached to cell 0*/
        /* First segment only */
        insert morphology { diam=10}
        insert capacitance { cm=1}
        insert leak { g_leak=0.001 e_leak=-65}
}
More proof that your new mechanism is present and working properly.
tort
Posts: 8
Joined: Thu May 18, 2006 6:16 pm
Location: Boston University

Post by tort »

Yes, I've been using the program the last days and it is working properly.
Thank you again!
Post Reply