Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-06-28 06:13:01


On Saturday 28 June 2008 14:02:51 Andrej van der Zee wrote:
>
> >
> > 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?
>
> Actualy, some while ago somebody posted a patch for
> gcc.jam to work on AIX, because on AIX the native
> linker HAS to be invoked. I am not sure, but I thought
> the patch was added to the trunk (I didn't check it).

If you mean this:

        http://www.nabble.com/Patch:-use-correct-linker-options-on-AIX-gcc-builds-td17397812.html

then it's in trunk.

> In the meanwhile I found out that AIX needs an extra
> linker option that tells the linker not to use the
> whole path of the library, but only the name of the
> library (as is standard with how it works on Linux).

Well, I don't think so. On Linux, if you link to a/b/c.so, then:

  - If the header of c.so has soname set, it's how the reference to c.so is
    written in resulting binary, otherwise
  - a/b/c.so is used.

I don't know of any option to strip the path; if it exists, it's surely not
on by default.

> The option is "-Wl,-bnoipath". I added this to my
> local boost-branch and everything works as expected
> again.

I don't think this is right appraoch -- does your AIX has working support
for specifying sonames for shared libraries?

- 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