libtool
[Top][All Lists]
Advanced

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

Shared libraries build on Linux, not on Solaris 10 (gcc)


From: Jason Curl
Subject: Shared libraries build on Linux, not on Solaris 10 (gcc)
Date: Fri, 17 Aug 2007 00:05:44 +0200
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Hello,

I've just switched over to using libtool instead of using static libraries. I've installed autoconf-2.61, automake-1.10 and libtool-1.5.24.

The library builds fine under Linux, but won't link under Solaris Sparc 2.10.

/bin/bash ../../libtool --tag=CC --mode=link /opt/sfw/bin/gcc -DSYSCONFDIR=\"/usr/local/etc\" -O0 -g -Wall -version-info 0:0:0 -lnsl -lsocket -lcurses -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 dbgmsg.lo appframework.lo confopts.lo netif.lo ether_ntoa.lo getline.lo strnlen.lo timersub.lo timeradd.lo /opt/sfw/bin/gcc -shared .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/netif.o .libs/ether_ntoa.o .libs/getline.o .libs/strnlen.o .libs/timersub.o .libs/timeradd.o -lnsl -lsocket -lcurses -lc -Wl,-soname -Wl,liblogger.so.0 -o .libs/liblogger.so.0.0.0
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file liblogger.so.0: open failed: No such file or directory
ld: fatal: File processing errors. No output written to .libs/liblogger.so.0.0.0
collect2: ld returned 1 exit status
gmake[3]: *** [liblogger.la] Error 1
gmake[3]: Leaving directory `/net/jupiter/home/projects/LX2005.886/build/sol/liblogger/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/net/jupiter/home/projects/LX2005.886/build/sol/liblogger/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/net/jupiter/home/projects/LX2005.886/build/sol/liblogger'
gmake: *** [all-recursive] Error 1

So I play around a little with the options.

1. Remove -wl,-soname
ganymede:jcurl:src$ /opt/sfw/bin/gcc -shared .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/netif.o .libs/ether_ntoa.o .libs/getline.o .libs/strnlen.o .libs/timersub.o .libs/timeradd.o -Wl,liblogger.so.0 -o .libs/liblogger.so.0.0.0 -lnsl -lsocket -lcurses -lc
ld: fatal: file liblogger.so.0: open failed: No such file or directory
ld: fatal: File processing errors. No output written to .libs/liblogger.so.0.0.0
collect2: ld returned 1 exit status
ganymede:jcurl:src$

2. Remove -Wl,liblogger.so.0
ganymede:jcurl:src$ /opt/sfw/bin/gcc -shared .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/netif.o .libs/ether_ntoa.o .libs/getline.o .libs/strnlen.o .libs/timersub.o .libs/timeradd.o -Wl,-soname -o .libs/liblogger.so.0.0.0 -lnsl -lsocket -lcurses -lc
ld: warning: option -o appears more than once, first setting taken

3. Remove them all - no warnings/errors emitted.

Ideas? Is this a bug?

Thanks,
Jason.




reply via email to

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