linker warnings on Mac OS X

Bryce McKinlay mckinlay@redhat.com
Thu Jul 8 18:55:00 GMT 2004


John Gabriele wrote:

> The last lines of output in my terminal window give a bunch of
> linker warnings:
>
> [snip]
> /usr/local/gcj/lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/../../../ 
> libgcj.dylib(libgcj.5.0.0.dylib-master.o) definition of _copysign
> /usr/lib/libSystem.dylib(copysign.o) definition of _copysign
>
> Are these serious? The executable built and seems to work fine.


Not serious. These are math library functions that are provided both by 
Darwin's math library, which are also provided by a math library 
included in libjava. Its arguably a bug that libjava's implementation is 
still used when your system already has them, because the system 
implementations may be more efficient (optimized for PowerPC etc). The 
reason you get the warnings on Darwin and not Linux stems from 
differences between the mach-o binary format used there and the ELF 
format used on other systems.

> By the way, looking in my /usr/local/gcj/bin directory, I see no "ar"  
> tool.
> Hmm... no "ld" either. Why are they missing? 

These tools are the system's linker, they are not part of GCC.

Regards

Bryce



More information about the Java mailing list