This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libm.so vs libgcj.so


On Sun, May 18, 2003 at 11:42:18AM -0400, Jack Howarth wrote:
>    I hunting down incorrectly linked libraries in debian ppc sid
> which report undefined non-weak symbols. In the case of libt1.so.1
> I am puzzled however. The following symbols are picked up as
> undefined non-weak...
> 
> ldd -r /usr/lib/libt1.so.1
>         libc.so.6 => /lib/libc.so.6 (0x0fe80000)
>         /lib/ld.so.1 => /lib/ld.so.1 (0x08000000)
> undefined symbol: ceil  (/usr/lib/libt1.so.1)
> undefined symbol: floor (/usr/lib/libt1.so.1)
> undefined symbol: cos   (/usr/lib/libt1.so.1)
> undefined symbol: sin   (/usr/lib/libt1.so.1)
> 
> which suggests either linking against /lib/libm-2.3.2.so or
> /usr/lib/libgcj.so.4.0.0. In the case of libm.so however
> these symbols are weak...
> 
>  nm -D /lib/libm-2.3.2.so | grep ceil
> 0fe09458 W ceil
> 
> whereas they aren't weak in libgcj.so...
> 
> nm -D /usr/lib/libgcj.so.4.0.0 | grep ceil
> 00410090 T ceil
> 
> I am a bit puzzled at why they are weak in libm.so and if
> I should be recommending a linkage on -lgcj rather than
> -lm instead. Which is more correct here?

In the very unlikely case libt1 is a Java library you should link against
-lgcj (but then, gcj frontend should take care of it).
Otherwise certainly -lm.
I wonder why libgcj.so unconditionally exports various math functions
though.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]