[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling with Sun Studio
From: |
John Swensen |
Subject: |
Re: compiling with Sun Studio |
Date: |
Wed, 29 Aug 2007 13:49:57 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
John W. Eaton wrote:
On 29-Aug-2007, Jim Langston wrote:
| > I think if you first built (using sunstudio) or installed a working GCC
| > 4.x, then things should compile fine. Does sunstudio use the Sun
| > compilers or the GNU compilers?
| Sun compilers, wanted to get on the latest and greatest, had a couple of
| other issues where GNU is happy (have gotten Octave compiled on
| Fedora) but the Sun compilers say its a no-no, and looking at the code,
| was true (ie. multiple defines).
Since I don't think many of us are using Sun's compilers to build
Octave, it would be helpful if you could report these problems with
sufficient detail so they could be fixed.
jwe
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?
John Swensen
- compiling with Sun Studio, Jim Langston, 2007/08/28
- compiling with Sun Studio, John W. Eaton, 2007/08/28
- Re: compiling with Sun Studio, Jim Langston, 2007/08/29
- Re: compiling with Sun Studio, John Swensen, 2007/08/29
- Re: compiling with Sun Studio, Jim Langston, 2007/08/29
- Re: compiling with Sun Studio, John W. Eaton, 2007/08/29
- Re: compiling with Sun Studio,
John Swensen <=
- Re: compiling with Sun Studio, John W. Eaton, 2007/08/29
- Re: compiling with Sun Studio, John Swensen, 2007/08/29
- Re: compiling with Sun Studio, John W. Eaton, 2007/08/29
- Re: compiling with Sun Studio, John Swensen, 2007/08/30
- Re: compiling with Sun Studio, John W. Eaton, 2007/08/29
- Re: compiling with Sun Studio, Jim Langston, 2007/08/29
- Re: compiling with Sun Studio, Jim Langston, 2007/08/30
- Re: compiling with Sun Studio, John Swensen, 2007/08/30
- Re: compiling with Sun Studio, Jim Langston, 2007/08/30