This is the mail archive of the
mailing list for the glibc project.
Re: libm.so vs libgcj.so
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sun, 18 May 2003 21:45:25 +0200
- Subject: Re: libm.so vs libgcj.so
- References: <200305181542.LAA12391@bromo.msbb.uc.edu>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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