[Box Backup-dev] Missing libs when building on Solaris
Martin Ebourne
boxbackup-dev at fluffy.co.uk
Wed Feb 1 20:07:35 GMT 2006
On Wed, 2006-02-01 at 18:54 +0100, Stefan Norlin wrote:
> > Are you compiling with gcc on Solaris? And are you using the Sun linker
> > or GNU ld? Certainly on linux with GNU ld the .so dependencies are
> > followed automatically.
>
> gcc, yes, but using SUN's ld (/usr/ccs/bin/ld).
>
> On sunfreeware it says for binutils that "sometime using Sun ld is better".
> I do not know exactly how to interpret that.
Sun ld can be better on Solaris than GNU ld for C programs.
You should always use GNU ld with g++ for C++ programs though. The GNU
toolchain and the Solaris toolchain have different ideas on how to
implement templates and if you mix & match you can end up with huge
libraries and executables due to duplication of templates.
> Anyway, I tried to remove the AC_SEARCH lines again, install
> binutils and use GNU ld. bootstrap, configure and compile.
>
> Same problem. Those symbols were not resolved. The nsl and socket
> libs were not added.
Are you sure it was using GNU ld? You generally have to recompile gcc to
tell it which linker to use (there's a --with-gnu-ld option to
configure). It usually hardcodes the location of the linker and doesn't
rely on your path. There's a --print-somethingorother option you can
give to gcc to get it to report what it will use.
Cheers,
Martin.
More information about the Boxbackup-dev
mailing list