Boost logo

Boost-Build :

Subject: Re: [Boost-build] specifying libraries on the link line, was "incorrect library names embedded on hp-ux ia64"
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-06-12 02:24:21


On Thursday 11 June 2009 Jim Gallagher wrote:

> Volodya,
>
> I have been experimenting, and I have some more info to share. Back to
> my example
> with libfoo, libbar and libbaz, where libbar depends on libfoo and
> libbaz depends
> on libbar.
>
> The link line generated by boost-build did not work:
> aCC -AA -b -g -Wl,+h,libbaz.so -o "bin/acc/debug/libbaz.so"
> "bin/acc/debug/baz.o" "../bar/bin/acc/debug/libbar.so"
> "../foo/bin/acc/debug/libfoo.so"
> ld: Can't find dependent library "libfoo.so"
> Fatal error.
>
>
> Rearranging for a manual test does not work either:
> aCC -AA -b -g -Wl,+h,libbaz.so -o "bin/acc/debug/libbaz.so"
> "bin/acc/debug/baz.o" "../foo/bin/acc/debug/libfoo.so"
> "../bar/bin/acc/debug/libbar.so"
> ld: Can't find dependent library "libfoo.so"
> Fatal error.
>
>
> However, if I add a search path using -L, it will find libfoo:
> aCC -AA -b -g -Wl,+h,libbaz.so -o "bin/acc/debug/libbaz.so"
> "bin/acc/debug/baz.o" -L../foo/bin/acc/debug
> "../bar/bin/acc/debug/libbar.so"
>
> So, it appears that on hp-ux, we must use the typical -L linker search
> mechanism. Is this something that I may be able to fix with some
> guidance, or do you think it is pretty involved? I am very much a
> novice regarding much of what is happening under the hood.

Can you try the attached patch? (If it does not apply for some reason,
both actions are modified by adding:

         -L"$(RPATH_LINK)"

and there's a new flag setting.

At the same time, can you lookup two things in docs:

1. Is there an option to set rpath encoded in the libraries --
that is the path there libraries will be searched at runtime.
I notice your dump of binaries include it, so it must be
possible to specify it as well.

2. Is there an option to separately control where linker looks
for dependency shared libraries. It's called "rpath-link" in
Linux, maybe same for ACC.

Thanks,
Volodya

 




Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk