libtool
[Top][All Lists]
Advanced

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

Re: shared library depending on static library on Solaris


From: Ralf Wildenhues
Subject: Re: shared library depending on static library on Solaris
Date: Tue, 7 Jun 2005 09:34:41 +0200
User-agent: Mutt/1.4.1i

Hi Sven,

I am very sorry it took me so long to look at this.

* Sven Verdoolaege wrote on Tue, May 10, 2005 at 06:16:52PM CEST:
> I wrote a library called barvinok 
> (http://www.kotnet.org/~skimo//barvinok/barvinok-0.15.tar.gz)
> which uses a static library called ntl.
> 
> In configure.in, I simply do
> 
> AC_CHECK_LIB(ntl, main,[],[
>     AC_MSG_ERROR(Need ntl)
> ])
> 
> so -lntl ends up in LIBS.
> 
> Now, what I would assume that would happen is
> that libtool would notice that ntl is a static
> library and not link it into the shared barvinok
> library, but instead add -lntl to dependency_libs.
> Unfortunately, on Solaris, libtool does try to
> link in ntl in the shared library itself,
> resulting in relocation errors.
> 
> /bin/sh ./libtool --mode=link g++  -g -O2 -L/home/sven/loop//lib 
> -L/home/sven/loop//lib  -o libbarvinok.la -rpath /home/sven/loop//lib 
> -version-info 8:0:4 ev_operations.lo genfun.lo util.lo barvinok.lo  -lntl 
> -lpolylibgmp -lgmp 
*snip*
> Text relocation remains                         referenced
>     against symbol                  offset      in file
> <unknown>                           0x148       
> /home/sven/loop//lib/libntl.a(tools.o)
> [..many more symbols..]
> 
> This happens with both libtool 1.5.8 and 1.5.16.

Acknowledged.

> Is there a problem with my assumptions or with libtool ?

This is a bug in libtool, I believe.
deplibs_check_method may not be pass_all on your system.

> billie$ uname -a
> SunOS billie 5.8 Generic_117350-24 sun4u sparc

Unfortunately, I still don't know enough about Solaris to fix this right
away without breaking other uses.

Regards,
Ralf




reply via email to

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