[C++-sig] How to compile Boost.Python for 32bit on 64bit Linux

Philipp Münzel mail at philippmuenzel.de
Tue Oct 5 17:48:19 CEST 2010


Nevermind, got the python build problem solved.
Apparently, I have to specify CFLAGS=-m32 instead of OPT=-m32 on my
platform.

Now I have a working 32bit installation of pyhton under /opt/pym32/

I now created a file named user-config.jam with the following content:

using python : : /opt/pym32/bin/python ;

as in the link posted by Charles.
But the build still fails mentioning
"In file included from /usr/include/python2.6/Python.h:58:0,"
so obviously the user-config.jam isn't being observed.

Oh well, I just wanted to give boost.python a try and now I'm again
spending a whole afternoon figuring out the different platform nightmares :(

Philipp



On 10/05/2010 05:24 PM, Stefan Seefeld wrote:
>  On 10/05/2010 11:07 AM, Philipp Münzel wrote:
>> Hi Charles,
>>
>> thanks for the fast answer!
>> So I downloaded python 2.7 source and did:
>>
>> OPT=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/pym32
>> make
>>
>> Unfortunately, the build fails:
>>
>> /bin/sh: line 1: 23704 Segmentation fault      CC='gcc -pthread'
>> LDSHARED='gcc -pthread -shared' LDFLAGS='-m32' OPT='-DNDEBUG -m32'
>> ./python -E ./setup.py build
>> make: *** [sharedmods] Error 139
>>
>> Any thoughts?
> 
> I think you should bring this up on a more suitable forum, such as a
> Python mailing list.
> 
>     Stefan
> 



More information about the Cplusplus-sig mailing list