Problem with libstdc++ when building SWIG on Solaris 8

Tom Loredo loredo@astro.cornell.edu
Mon May 5 18:52:00 GMT 2003


[crossposted to Solaris group---not sure if this is a Solaris
or gcc/libstdc++ problem!]

Hi folks-

I'm trying to build SWIG 1.3.19 on an Ultra 10 that was just upgraded to
Solaris 8.  "make" chugs along fine until the following link error:


g++ -I../Source/Include          -I../Source/DOH                 -I../Source/Preprocessor       
-I../Source/Swig                -I../Source/Modules           
-DSWIG_LIB=\"/home/laplace/lib/swig1.3\"         -DLIBDIR=\"/home/laplace/lib\" 
-DRELEASE_SUFFIX=\"\" -fPIC    -o eswig  CParse/cscanner.o CParse/parser.o  CParse/templ.o
CParse/util.o DOH/base.o  DOH/file.o DOH/fio.o DOH/hash.o  DOH/list.o DOH/memory.o DOH/string.o 
DOH/void.o Modules/allocate.o  Modules/browser.o Modules/chicken.o  Modules/contract.o
Modules/csharp.o  Modules/emit.o Modules/guile.o  Modules/java.o Modules/lang.o  Modules/main.o
Modules/module.o  Modules/mzscheme.o Modules/ocaml.o  Modules/overload.o Modules/perl5.o 
Modules/php4.o Modules/pike.o  Modules/python.o Modules/ruby.o  Modules/s-exp.o Modules/swigmain.o 
Modules/tcl8.o Modules/typepass.o  Modules/xml.o Preprocessor/cpp.o  Preprocessor/expr.o
Swig/cwrap.o  Swig/error.o Swig/fragment.o  Swig/getopt.o Swig/include.o  Swig/misc.o Swig/naming.!
o Swig/parms.o  Swig/scanner.o Swig/stype.o  Swig/symbol.o Swig/tree.o  Swig/typemap.o
Swig/typesys.o  Swig/warn.o Swig/wrapfunc.o  -ldl
/usr/local/lib/libstdc++.so: undefined reference to `pow@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `sinh@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `cosh@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `sqrt@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `tan@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `sin@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `cos@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `log@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `log10@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `atan2@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `tanh@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `copysign@SUNW_1.1'
/usr/local/lib/libstdc++.so: undefined reference to `exp@SUNW_1.1'
collect2: ld returned 1 exit status


It appears ld is not finding some math libraries.  Changing to the SWIG
"Source" directory and trying to run that g++ command by hand, but adding
"-lm" or "-lsunmath" reproduces the error.  I've verified that
/usr/local/opt/SUNWspro/lib is among the load paths.

Any hints on what might be wrong and how to fix it?  The SWIG folks
tell me they do most of their development on Solaris 8 and that
it should build out of the box, indicating there may be a problem
with our installation.  They also note that the functions referenced
above are not used by SWIG.  The only suggestion they could think of
was rebuilding gcc.  Does this sound right?  Perhaps there is a problem 
with our libstdc++?

Thanks,
Tom Loredo



More information about the Libstdc++ mailing list