nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post Reply
costas

nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by costas » Mon Mar 09, 2009 5:18 pm

Dear All

I am trying to compile my NEURON-code in UNIX that I have been running on my Mac (therefore, I know the code runs). While all membrane mechanisms are read successfully by the compiler, at the end (of the nrnivmodl-procedure) I receive the following error message:

Code: Select all

.o .libs/kd.o .libs/kk.o .libs/km.o .libs/naf.o .libs/nax.o .libs/node.o .libs/mod_func.o  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libnrnoc.so /usr/local/lib/liboc.so -L/usr/X11R6/lib /usr/local/lib/libmemacs.so /usr/local/lib/libnrnmpi.so /usr/local/lib/libscopmath.so /usr/local/lib/libsparse13.so -lreadline -lncurses /usr/local/lib/libnrniv.so /usr/local/lib/libivoc.so /usr/local/lib/libneuron_gnu.so /usr/local/lib/libmeschach.so /usr/local/lib/libsundials.so /usr/local/lib/libIVhines.so -lSM -lICE -lX11 -ldl -lm  -Wl,-soname -Wl,libnrnmech.so.0 -o .libs/libnrnmech.so.0.0.0
/usr/local/lib/libnrnoc.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
 
Does anybody know what I am supposed to do to overcome this obstacle?

Thanks a lot!

Costas

ted
Site Admin
Posts: 5590
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by ted » Tue Mar 10, 2009 1:05 pm

My guess is that UNIX tried to use some .o files that had been generated under OS X (did you zip up a whole directory tree on your Mac--including files output by prevously running nrnivmodl--then transferred it to your UNIX box and expanded it there?)
Delete all .o and .c files.
Delete any .i686 directory and its contents.
Run nrnivmodl again.

eschombu

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by eschombu » Fri Jul 09, 2010 7:45 pm

I don't think Costas ever got this working, and I'm now having the same problem. We have NEURON 7.1 on our (unix) server. The mod files DO compile on my mac (with NEURON 7.2). Here's where I think the nrnivmodl output starts to indicate problems (or thereabouts; I can send a full printout if it would be helpful):

Code: Select all

"/usr/local/share/nrn/libtool"  --mode=link gcc -module  -g -O2    -o libnrnmech.la -rpath "/usr/local/lib"  h.lo kadist.lo kaprox.lo kdrca1.lo na3n.lo naxn.lo mod_func.lo  -L"/usr/local/lib" -lnrnoc -loc -lmemacs -lnrnmpi -lscopmath -lsparse13 -lreadline -lncurses -L"/usr/local/lib" "/usr/local/lib/libnrniv.la" -livoc -lneuron_gnu -lmeschach -lsundials       -lm -ldl
libtool: link: warning: library `/usr/local/lib/liboc.la' was moved.
libtool: link: warning: library `/usr/local/lib/libmemacs.la' was moved.
libtool: link: warning: library `/usr/local/lib/libnrnmpi.la' was moved.
libtool: link: warning: library `/usr/local/lib/libscopmath.la' was moved.
libtool: link: warning: library `/usr/local/lib/libsparse13.la' was moved.
libtool: link: warning: library `/usr/local/lib/libnrniv.la' was moved.
libtool: link: warning: library `/usr/local/lib/libivoc.la' was moved.
libtool: link: warning: library `/usr/local/lib/libneuron_gnu.la' was moved.
libtool: link: warning: library `/usr/local/lib/libmeschach.la' was moved.
libtool: link: warning: library `/usr/local/lib/libsundials.la' was moved.
gcc -shared  .libs/h.o .libs/kadist.o .libs/kaprox.o .libs/kdrca1.o .libs/na3n.o .libs/naxn.o .libs/mod_func.o  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libnrnoc.so /usr/local/lib/liboc.so /usr/local/lib/libmemacs.so /usr/local/lib/libnrnmpi.so /usr/local/lib/libscopmath.so /usr/local/lib/libsparse13.so -lreadline -lncurses /usr/local/lib/libnrniv.so /usr/local/lib/libivoc.so /usr/local/lib/libneuron_gnu.so /usr/local/lib/libmeschach.so /usr/local/lib/libsundials.so -lm -ldl  -Wl,-soname -Wl,libnrnmech.so.0 -o .libs/libnrnmech.so.0.0.0
/usr/local/lib/libnrnoc.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
Any recommendations on what to try? I'm running this in a folder that I don't think has any files from a mac compilation (whether in hidden or non-hidden folders).

Thanks,
Erik

hines
Site Admin
Posts: 1577
Joined: Wed May 18, 2005 3:32 pm

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by hines » Sat Jul 10, 2010 9:04 am

/usr/local/lib/libnrnoc.so: could not read symbols: File in wrong format
What is your machine type?
uname -a

What file did you use to install NEURON?

eschombu

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by eschombu » Mon Jul 12, 2010 4:40 pm

The reply from our computer administrator:
What is your machine type?
Linux socrates.klab.caltech.edu 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:58:38 EDT 2010 i686 i686 i386 GNU/Linux
What file did you use to install NEURON?
I'm not sure what that question refers to. Maybe "nrn-7.1.tar.gz" is
what they meant?

He said he ran into other build issues you may be interested in. Could we start an email thread so I can include him? Since he did the install, it's hard for me to answer the questions related to it. I'm at the same username as on the forum, but at caltech.edu.

Thanks again,
Erik

hines
Site Admin
Posts: 1577
Joined: Wed May 18, 2005 3:32 pm

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by hines » Mon Jul 12, 2010 5:31 pm

Yes. We can take this to email. michael dot hines at yale dot edu

I think you should try to install in a subdirectory of your $HOME so you do not have to become a root user
for installation. Try

mkdir $HOME/neuron
cd $HOME/neuron
curl -O http://www.neuron.yale.edu/ftp/neuron/v ... -17.tar.gz
curl -O http://www.neuron.yale.edu/ftp/neuron/v ... 445.tar.gz
tar xzf iv-17.tar.gz
tar xzf nrn-7.2.alpha-445.tar.gz
mv iv-17 iv
mv nrn-7.2 nrn
cd iv
./configure --prefix=`pwd`
make
make install
cd ../nrn
./configure --prefix=`pwd`
make
make install

export PATH=$HOME/nrn/i686/bin:$PATH

now try your code again.

hines
Site Admin
Posts: 1577
Joined: Wed May 18, 2005 3:32 pm

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by hines » Mon Jul 12, 2010 5:32 pm

Sorry. I should have typed
export PATH=$HOME/neuron/nrn/i686/bin:$PATH

athan
Posts: 3
Joined: Mon Feb 12, 2007 11:37 am
Contact:

Re: nrnivmodl fails--"libnrnoc.so: could not read symbols"

Post by athan » Thu Sep 16, 2010 3:37 am

costas wrote:Dear All

I am trying to compile my NEURON-code in UNIX that I have been running on my Mac (therefore, I know the code runs). While all membrane mechanisms are read successfully by the compiler, at the end (of the nrnivmodl-procedure) I receive the following error message:

Code: Select all

.o .libs/kd.o .libs/kk.o .libs/km.o .libs/naf.o .libs/nax.o .libs/node.o .libs/mod_func.o  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libnrnoc.so /usr/local/lib/liboc.so -L/usr/X11R6/lib /usr/local/lib/libmemacs.so /usr/local/lib/libnrnmpi.so /usr/local/lib/libscopmath.so /usr/local/lib/libsparse13.so -lreadline -lncurses /usr/local/lib/libnrniv.so /usr/local/lib/libivoc.so /usr/local/lib/libneuron_gnu.so /usr/local/lib/libmeschach.so /usr/local/lib/libsundials.so /usr/local/lib/libIVhines.so -lSM -lICE -lX11 -ldl -lm  -Wl,-soname -Wl,libnrnmech.so.0 -o .libs/libnrnmech.so.0.0.0
/usr/local/lib/libnrnoc.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
 
Does anybody know what I am supposed to do to overcome this obstacle?

Thanks a lot!

Costas
I was encountering the same problem. I eventually got NEURON to compile by following the full installation steps outlined by Michael.

After installing everything with the source code, I realized that the original problem was due to the fact that I had originally installed the wrong rpm. I had installed the i686 version but I was using a 64-bit machine. No problems/errors occurred until I tried running nrnivmodl at which time I got the same error message as Costas. I should have installed the x86_64 rpm version (which is basically what was installed from the complete installation from the source code -- with many more steps).

Post Reply