List Info

Thread: Re: Boost Python with BBv2 on AIX




Re: Boost Python with BBv2 on AIX
country flaguser name
United States
2007-05-10 08:12:23
on Wed May 09 2007, Christopher Cambly
<ccambly-AT-ca.ibm.com> wrote:

> In boost 1.33.1, in the file tools/build/v1/python.jam,
there was a
> section specific to AIX that provided a link option
specifying an
> import list.
>
>     else if $(OS) = AIX
>     {
>         PYTHON_PROPERTIES
>           +=
<*><*><linkflags>"-Wl,-bI:$(PYTHON_LI
B_PATH)/python.exp"
>            
<*><*><find-library>pthreads ;
>     }
>
> There is no equivalent in the python.jam from Boost
Build V2.  

Yep.  Someone (you?) contacted me a while back claiming that
if I
would just pass the right flag to the linker, I could get
AIX to
behave like any other Unix platform and I wouldn't need
these special
shenanigans.  He promised me a patch, but, well, I never got
it.

Unfortunately, these messages seem to have disappeared from
my
electronic record :(

> I have been experimenting with different combinations
to produce a similar behavior from BBv2.  
>  This is what I came up with, and appears to work.  
>
>         # On AIX we need Boost.Python and Python
extensions to import symbols from the python
> interpreter
>         # since libraries opened with dlopen() do not
inherit symbols from the Python
> interpreter itself
>        if $(target-os) = aix
>         {
>            alias python_for_extensions
>                         :
>                         : $(target-requirements)
>                         :
>                         : $(usage-requirements)
<linkflags>-bI:$(libraries[1])/python.exp
>                         ;
>         }
>
> I initially tried "$(usage-requirements)
<linkflags>-Wl,-bI:$(libraries)/python.exp"  but
that
> gave me
> " -bI:/usr/lib/python.exp
-bI:/usr/lib/python2.4/config/python.exp "

Yeah, nasty.  Volodya, is there a way to embed a comma in a
feature
value?

> However, $(usage-requirements)
> <linkflags>-bI:$(libraries[1])/python.exp gave me
what I wanted
> which is -bI:/usr/lib/python2.4/config/python.exp.
>
> Unfortunately, I am all that comfortable with the new
build system
> and hoping for some suggestions

Submit your patch to the tracker at svn.boost.org?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-cons
ulting.com

Don't Miss BoostCon 2007! ==> http://www.boostcon.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Boost Python with BBv2 on AIX
country flaguser name
Russian Federation
2007-05-10 11:23:23
David Abrahams wrote:

>> I initially tried "$(usage-requirements)
>>
<linkflags>-Wl,-bI:$(libraries)/python.exp"  but
that gave me
>> " -bI:/usr/lib/python.exp
-bI:/usr/lib/python2.4/config/python.exp "
> 
> Yeah, nasty.  Volodya, is there a way to embed a comma
in a feature
> value?

I'm not aware of any special handing of comma, except on
command line.
And if 'libraries' have 2 elements, I'd expect two options
to linker
to be passed.

Christopher, is it really that -Wl, disappears?

- Volodya


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Boost Python with BBv2 on AIX
country flaguser name
United States
2007-05-11 11:54:23

>
> on Wed May 09 2007, Christopher Cambly <ccambly-AT-ca.ibm.com> wrote:
>;
> > In boost 1.33.1, in the file tools/build/v1/python.jam, there was a
> > section specific to AIX that provided a link option specifying an
> > import list.
&gt; >
>; >     else if $(OS) = AIX
> >     {
> >         PYTHON_PROPERTIES
&gt; >           += <*>&lt;*><;linkflags&gt;"-Wl,-bI:$(PYTHON_LIB_PATH)/python.exp"
> >             <*>&lt;*><;find-library>pthreads ;
&gt; >     }
> >
>; > There is no equivalent in the python.jam from Boost Build V2.  ;
>
> Yep.  Someone (you?) contacted me a while back claiming that if I
> would just pass the right flag to the linker, I could get AIX to
> behave like any other Unix platform and I wouldn't need these special
> shenanigans.  He promised me a patch, but, well, I never got it.
>
> Unfortunately, these messages seem to have disappeared from my
> electronic record :(

The patches for building Boost.Python correctly for use with runtime linking were
included as a subset of the larger patch submission we made for building
Boost-1.34 with the XL compiler.  Unfortunately, these patches did not make
it into the Boost-1.34 release.  I can re-submit these patches to
the tracker at svn.boost.org.

The real issue is that Python itself for AIX is not configured for the use of runtime linking.
If it were, this would eliminating the need for the import list making AIX more like other
unix platforms. Unfortunately, all existing Python builds currently require the use of
the import list for Boost.Python and Python extensions on AIX. (I believe Apache had similar
issues initially with their modules and has since switched to runtime linking).

I have experimented with building Python with runtime linking enabled and have used it
successfully with Boost.Python built without requiring the use of import lists.

>
> --
> Dave Abrahams
> Boost Consulting
> http://www.boost-consulting.com
>
> Don't Miss BoostCon 2007! ==> http://www.boostcon.com
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.
> org/mailman/listinfo.cgi/boost-build

Chris Cambly
XL C++ Compiler Development
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )