help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling with Sun Studio


From: John W. Eaton
Subject: Re: compiling with Sun Studio
Date: Wed, 29 Aug 2007 14:22:49 -0400

On 29-Aug-2007, John Swensen wrote:

| Here are the errors I am seeing.  I am not 100% sure where the GCC4 
| compiler we have came from.  But here is the --version information
| gcc (GCC) 4.0.2
| Copyright (C) 2005 Free Software Foundation, Inc.
| This is free software; see the source for copying conditions.  There is NO
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
| 
| The compilation error I get is as follows:
| make[2]: Entering directory `/home/jpswensen/src/octave/src'
| making defaults.h from defaults.h.in
| defaults.h is unchanged
| making oct-conf.h from oct-conf.h.in
| oct-conf.h is unchanged
| g++ -I/opt/csw/include -I. -I.. -I../liboctave -I../src 
| -I../libcruft/misc   -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast 
| -g -O2 -rdynamic \
|         -L..  -fPIC -L/opt/csw/lib -o octave \
|         main.o  \
|         -L../liboctave -L../libcruft -L../src -R 
| /opt/lab/octave/cvs_20070827/lib/octave-2.9.13+ \
|         -loctinterp -loctave  -lcruft    \
|              \
|             \
|          -lreadline  -lncurses -ldl -lz -lm  -R/opt/csw/gcc4/lib 
| -L/opt/csw/gcc4/lib -L/usr/ccs/lib -L/usr/lib -L/opt/csw/lib 
| -L/opt/csw/gcc4/lib/gcc/sparc-sun-solaris2.8/4.0.2 -L/usr/ccs/bin 
| -L/opt/csw/gcc4/lib/gcc/sparc-sun-solaris2.8/4.0.2/../../.. -lz 
| -lgfortranbegin -lgfortran -lm -lgcc_s
| g++: unrecognized option `-rdynamic'
| ld: fatal: file /opt/csw/lib/libgcc_s.so: version `GCC_4.0.0' does not 
| exist:
|         required by file ../src/liboctinterp.so
| ld: fatal: File processing errors. No output written to octave
| collect2: ld returned 1 exit status
| make[2]: *** [octave] Error 1
| make[2]: Leaving directory `/home/jpswensen/src/octave/src'
| make[1]: *** [src] Error 2
| make[1]: Leaving directory `/home/jpswensen/src/octave'
| make: *** [all] Error 2
| 
| The strange thing about this is that the libgcc_s.so that is in 
| /opt/csw/lib does not correspond to the GCC4 compiler.  The libgcc_s.so 
| that corresponds to GCC4 is in /opt/csw/gcc4/lib.  I am not quite sure 
| why it is using the wrong one.  I am by no means a autotools guru, so I 
| am not sure if it is something with how things got configured.  In order 
| to make the build process use the GCC4 tools, I simply added them to my 
| PATH in front of everything else.  I did add LDFLAGS=-L/opt/csw/lib to 
| the configure line in order to get libreadline included properly.  Maybe 
| I need to use LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib" toforce it to 
| use the right libgcc_s.so.  I was under the impression that it should 
| always use the libgcc_s.so that corresponds the 
| <path_of_the_compiler>/../lib/libgcc_s.so.
| 
| Any suggestions?

What is the definition of FLIBS in Makeconf?  I'm guessing it is

   -lgfortranbegin -lgfortran -lm -lgcc_s

Why does it include -lgcc_s?  I think Octave is using the autoconf
macros for determining what Fortran libraries to use, so that might be
a place to start.  Also, how did "-L/opt/csw/lib" end up in the link
flags, and why is the gcc_s library installed there?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]