[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libltdl fails to link under Solaris
From: |
Steve Williams |
Subject: |
libltdl fails to link under Solaris |
Date: |
Sun, 18 Aug 2002 21:00:50 -0700 |
Hi,
I was trying to build libtool-1.4.2 under Solaris using the GCC 3.1
compiler, which is configured to use /usr/ccs/bin/ld and /usr/ccs/bin/as.
I configured the distribution with no additional options and invoked make,
the build failed with the following linker error:
/bin/sh ./libtool --mode=link gcc -g -O2 -o libltdl.la -rpath
/usr/local/lib -no-undefined -version-info 4:0:1 ltdl.lo -ldl
rm -fr .libs/libltdl.la .libs/libltdl.* .libs/libltdl.*
/usr/ccs/bin/ld -G -z defs -h libltdl.so.3 -o .libs/libltdl.so.3.1.0
ltdl.lo -ldl -lc
Undefined first referenced
symbol in file
__eprintf ltdl.lo
ld: fatal: Symbol referencing errors. No output written to
.libs/libltdl.so.3.1.0
I have traced this to be caused by the use of assert and the internal gcc
implementation of assert being __eprintf, which is in libgcc.a.
After that I tried the following configure command:
LIBS=`gcc --print-libgcc-file-name` ./configure
This worked, but produced the following warning:
/bin/sh ./libtool --mode=link gcc -g -O2 -o libltdl.la -rpath
/telos/source/S8S_BUILD/lib -no-undefined -version-info 4:0:1 ltdl.lo -ldl
/telos/source/S8S_BUILD/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.1/libgcc.a
*** Warning: Linking the shared library libltdl.la against the
*** static library
/telos/source/S8S_BUILD/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.1/libgcc.a
is not portable!
rm -fr .libs/libltdl.la .libs/libltdl.* .libs/libltdl.*
/usr/ccs/bin/ld -G -z defs -h libltdl.so.3 -o .libs/libltdl.so.3.1.0
ltdl.lo -ldl
/telos/source/S8S_BUILD/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.1/libgcc.a
-lc
I am also concerned, because I use these libraries in C++ libraries, and I
do not want to use a static libgcc.a, which can break exceptions.
I found a bug thread regarding GCC version < 3 and the solaris linker, but
cannot find anything regarding version 3 and the solaris linker.
Is linking with libgcc.a the right thing to do, or will this cause me
problems with C++ exceptions in the future?
Thanks
Steve Williams
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libltdl fails to link under Solaris,
Steve Williams <=