Problems with nrn5.7 on sun/sparc

Post Reply
asad

Problems with nrn5.7 on sun/sparc

Post by asad »

Hello,

I've been trying to compile iv and nrn (5.7.159) on a sunos/sparc machine for some time now. IV was a hassle but eventually I was able to compile it. nrn on the other hand is still giving me problems. It fails during 'make' for nrniv with the following message:
make[2]: Entering directory `/afs/nada.kth.se/misc/sans/neuron/src/nrn-5.7/src/nrniv'
/bin/bash ../../libtool --mode=link g++ -g -O2 -o nrniv nvkludge.o ../ivoc/ivocmain.o ../oc/modlreg.o ../nrnoc/libnrnoc.la ../oc/liboc.la libnrniv.la ../ivoc/libivoc.la ../gnu/libneuron_gnu.la ../scopmath/libscopmath.la ../sparse13/libsparse13.la ../sundials/libsundials.la ../memacs/libmemacs.la ../mesch/libmeschach.la /misc/sans/neuron/iv/iv-17/sunOS-sparc/sparc/lib/libIVhines.la -L/pkg/gnu-libs/1.1/os/lib -lreadline -lcurses ../nrnjava/libnrnjava.la -L/pkg/jdk/1.4.1_01/os/jre/lib/sparc -L/pkg/jdk/1.4.1_01/os/jre/lib/sparc/server -ljvm -lpthread -R /pkg/jdk/1.4.1_01/os/jre/lib/sparc -R /pkg/jdk/1.4.1_01/os/jre/lib/sparc/server -lm
g++ -g -O2 -o .libs/nrniv nvkludge.o ../ivoc/ivocmain.o ../oc/modlreg.o ../nrnoc/.libs/libnrnoc.so ../oc/.libs/liboc.so -L/usr/openwin/lib -lX11 ./.libs/libnrniv.so -L/var/tmp/fjo/sparc-sun-solaris2.8/libstdc++-v3/src -L/var/tmp/fjo/sparc-sun-solaris2.8/libstdc++-v3/src/.libs -L/var/tmp/fjo/gcc ../ivoc/.libs/libivoc.so ../gnu/.libs/libneuron_gnu.so ../scopmath/.libs/libscopmath.so ../sparse13/.libs/libsparse13.so ../sundials/.libs/libsundials.so ../memacs/.libs/libmemacs.so ../mesch/.libs/libmeschach.so /misc/sans/neuron/iv/iv-17/sunOS-sparc/sparc/lib/libIVhines.so -L/pkg/gnu-libs/1.1/os/lib -lreadline -lcurses ../nrnjava/.libs/libnrnjava.so /pkg/gcc/3.2.1/os/lib/libstdc++.so -L/pkg/jdk/1.4.1_01/os/jre/lib/sparc -L/pkg/jdk/1.4.1_01/os/jre/lib/sparc/server -ljvm -lpthread -lm -Wl,-R -Wl,/misc/sans/neuron/nrn/5.7/sunOS-sparc/sparc/lib -Wl,-R -Wl,/misc/sans/neuron/iv/iv-17/sunOS-sparc/sparc/lib -Wl,-R -Wl,/pkg/gcc/3.2.1/os/lib -Wl,-R -Wl,/pkg/jdk/1.4.1_01/os/jre/lib/sparc -Wl,-R -Wl,/pkg/jdk/1.4.1_01/os/jre/lib/sparc/server
ld: warning: file /pkg/gcc/3.2.1/os/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/../../../libstdc++.so: linked to /pkg/gcc/3.2.1/os/lib/libstdc++.so: attempted multiple inclusion of file
Undefined first referenced
symbol in file
.LLC219 ../sundials/.libs/libsundials.so
ld: fatal: Symbol referencing errors. No output written to .libs/nrniv
collect2: ld returned 1 exit status
make[2]: *** [nrniv] Error 1
I have traced this back to a warning that appears during compilation (make) of sundials:
make[5]: Entering directory `/afs/nada.kth.se/misc/sans/neuron/src/nrn-5.7/src/sundials'
/bin/bash ../../libtool --mode=link gcc -g -O2 -o libsundials.la -rpath /misc/sans/neuron/nrn/5.7/sunOS-sparc/sparc/lib shared/*.lo cvodes/*.lo ida/*.lo -lm
mkdir .libs
gcc -shared -Wl,-h -Wl,libsundials.so.0 -o .libs/libsundials.so.0.0.0 shared/.libs/band.o shared/.libs/dense.o shared/.libs/fnvector_serial.o shared/.libs/iterative.o shared/.libs/nvector.o shared/.libs/nvector_serial.o shared/.libs/smalldense.o shared/.libs/spgmr.o shared/.libs/sundialsmath.o cvodes/.libs/cvband.o cvodes/.libs/cvbandpre.o cvodes/.libs/cvbbdpre.o cvodes/.libs/cvdense.o cvodes/.libs/cvdiag.o cvodes/.libs/cvodea.o cvodes/.libs/cvodes.o cvodes/.libs/cvodesio.o cvodes/.libs/cvspgmr.o ida/.libs/ida.o ida/.libs/idaband.o ida/.libs/idabbdpre.o ida/.libs/idadense.o ida/.libs/idaic.o ida/.libs/idaio.o ida/.libs/idaspgmr.o -lm -lc
ld: warning: relocation error: R_SPARC_32: file cvodes/.libs/cvodes.o: symbol .LLC219:
external symbolic relocation against non-allocatable section .stab;
cannot be processed at runtime: relocation ignored
(cd .libs && rm -f libsundials.so.0 && ln -s libsundials.so.0.0.0 libsundials.so.0)
Does anyone know what this means? Or better yet, how to fix it? Output from uname -a and gcc -v are:

SunOS my.nada.kth.se 5.9 Generic_118558-05 sun4u sparc SUNW,Ultra-4

and

Reading specs from /pkg/gcc/3.2.1/os/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: /pkg/gcc/src/3.2.1/gcc-3.2.1/configure --prefix=/pkg/gcc/3.2.1/os
Thread model: posix
gcc version 3.2.1

Thanks,

Asad Rustum
hines
Site Admin
Posts: 1687
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

The first step is to try again with the alpha version at
http://www.neuron.yale.edu/ftp/neuron/v ... .12.tar.gz
There have been a number of configuration updates so that it compiles on gcc4.0.0 on mac os x 4. That may help with gcc3.2.2 on the sparc.
The next step is to try configuring with the environment variables
CFLAGS=-g
CXXFLAGS=-g
to turn off the -O2 optimization. It is surprizing how often the gcc compilers are temporarily broken for a particular machine.
The last step, if you are not behind a firewall, is to give me a temporary guest account so I can try to fix the problem on that environment.
asad

Post by asad »

Splendid! It works! Just for the record, I didn't download the alpha version, I just followed your recomendations with the optimization flags.

Thank you.
Post Reply