libtool
[Top][All Lists]
Advanced

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

Using libtool for linking


From: Jason Curl
Subject: Using libtool for linking
Date: Fri, 17 Aug 2007 03:29:35 +0200
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Hello,

I've been testing my library now on various platforms and have come across something else that I didn't expect.

I have a system that supports shared libraries (Solaris 9). As part of some checks for 'getopt_long' I check if it exists in 'libiberty' if I can't find it in the standard system. It's there in libiberty. Now the problem occurs because there's only "libiberty.a" and no "libiberty.so.x.y.z" file.

Shouldn't AC_CHECK_LIB support shared/static libraries too? Or should libtool see that there's no shared library and statically link it somehow into my library that will become shared?

Aside all this, any ideas how to work around the problem besides "configure --disable-shared"? or knowing if the library is shared or not and then changing the behaviour maybe somehow?


/bin/bash ../../libtool --tag=CC --mode=link gcc -DSYSCONFDIR=\"/usr/local/etc\" -O2 -Wall -version-info 0:0:0 -lnsl -lsocket -o liblogger.la -rpath /usr/local/lib console.lo file.lo output.lo profile.lo queue.lo serial.lo strfunc.lo tcpip.lo ipcproto.lo db gmsg.lo appframework.lo confopts.lo netif.lo ether_ntoa.lo getline.lo strnlen.lo timersub.lo timeradd.lo -liberty gcc -shared -Wl,-h -Wl,liblogger.so.0 -o .libs/liblogger.so.0.0.0 .libs/console.o .libs/file.o .libs/output.o .libs/profile.o .libs /queue.o .libs/serial.o .libs/strfunc.o .libs/tcpip.o .libs/ipcproto.o .libs/dbgmsg.o .libs/appframework.o .libs/confopts.o .libs/ne tif.o .libs/ether_ntoa.o .libs/getline.o .libs/strnlen.o .libs/timersub.o .libs/timeradd.o -lnsl -lsocket -liberty -lc
Text relocation remains                         referenced
   against symbol                  offset      in file
optopt 0x5f8 /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.0/../../../libiberty.a(getopt.o) optopt 0x600 /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.0/../../../libiberty.a(getopt.o) optopt 0x8d0 /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.0/../../../libiberty.a(getopt.o) optopt 0x8d8 /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.0/../../../libiberty.a(getopt.o)


Thanks,
Jason.




reply via email to

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