Boost logo

Boost-Build :

From: Andrej van der Zee (mavdzee_at_[hidden])
Date: 2008-06-28 11:38:30


Hi,

> Here's the code that affects this:
>
> if [ os.name ] != NT && [ os.name ] != OSF && [
> os.name ] != HPUX && [ os.name ] != AIX
> {
> # OSF does have an option called -soname but it
> doesn't seem to work as
> # expected, therefore it has been disabled.
> HAVE_SONAME = "" ;
> SONAME_OPTION = -h ;
> }
>
> Does commenting out the check for AIX make things
> work?
>

In the meantime I found a linker-option on AIX that
discards the path of a library in the loader section
of an *executable* that links against it: -bnoipath.
On execution, it means that the lib is loaded by means
of its hard-coded -blibpath and/or LIBPATH from the
environment. When the link-option is not specified it
defaults to -bipath, which means upon execution the
path in the lib's loader section is used.

On Linux, boost-build uses -soname that strips the
preceding path from the *library* itself and only
stores the soname in its loader section. Hence, only
the name will end up in the loader section of an
executable (like on AIX) and -rpath/-rpath-link and/or
LD_LIBRARY_PATH are used to find the lib during
load-time.

Thus, -soname and -bnoipath are very similar, but an
-soname-equivalent might be desirable. I just started
porting an application to AIX for the first time so I
lack AIX-experience, but as far as I can see the
-bnoipath is as close as it gets.

Is there any AIX expert that can confirm this?

Cheers,
Andrej

--- Vladimir Prus <ghost_at_[hidden]> wrote:

> On Friday 27 June 2008 13:15:23 Andrej van der Zee
> wrote:
>
>
> Hi Andrej,
>
> [CC for convenience, please reply on-list]
>
> >
> > I am having some problems linking on AIX with bjam
> > using toolset=gcc. In my project I have one
> executable
> > and one shared lib. Bjam generates the following
> > linker command for the executable:
> >
> > "g++" -o <all-object-files>
> >
>
"../util/bin/gcc-4.2.4/debug/threading-multi/libspeedo_util.so"
> > -lrt -g -Wl,-brtl -pthread
> > -Wl,-blibpath:/usr/lib/:/speedo/lib:/usr/local/lib
> >
> > Now this results in an executable that does NOT
> look
> > for libspeedo_util.so in any other directories
> than
> > the relative path
> > ../util/bin/gcc-4.2.4/debug/threading-multi!
> >
> > This is clearly not what I want.
>
> - Volodya
>

      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html


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