Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [repost please help me] python setup.py build for 32-bits on x86_64 machine

Reply
Thread Tools

[repost please help me] python setup.py build for 32-bits on x86_64 machine

 
 
Sérgio Monteiro Basto
Guest
Posts: n/a
 
      11-23-2009
Hi,
I am in x86_64 arch , but I need
compile things on 32 bits with
python setup.py build

Can't change the fact that distutils creates x86_64
directories:
build/temp.linux-x86_64-2.3/

Also if I try with a python compile in 32bits and installed
in system .

how I force distutils build to 32-bits on x86_64 arch?

Thanks in advance,

 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      11-23-2009
Sérgio Monteiro Basto wrote:

> Hi,
> I am in x86_64 arch , but I need
> compile things on 32 bits with
> python setup.py build
>
> Can't change the fact that distutils creates x86_64
> directories:
> build/temp.linux-x86_64-2.3/
>
> Also if I try with a python compile in 32bits and installed
> in system .


I doubt that. Distutils will always build based on the architecture of the
interpreter you used when building an external module.

Are you sure that the python you used to build the extension was the right
one? What does

<your-32-bit-python> -c "from distutils.util import get_platform; print
get_platform()"

return?

Diez
 
Reply With Quote
 
 
 
 
Sérgio Monteiro Basto
Guest
Posts: n/a
 
      11-23-2009
Diez B. Roggisch wrote:

Hi, Thanks,
> Sérgio Monteiro Basto wrote:
>
>> Hi,
>> I am in x86_64 arch , but I need
>> compile things on 32 bits with
>> python setup.py build
>>
>> Can't change the fact that distutils creates x86_64
>> directories:
>> build/temp.linux-x86_64-2.3/
>>
>> Also if I try with a python compile in 32bits and installed
>> in system .

>
> I doubt that. Distutils will always build based on the architecture of the
> interpreter you used when building an external module.
>
> Are you sure that the python you used to build the extension was the right
> one? What does
>
> <your-32-bit-python> -c "from distutils.util import get_platform; print
> get_platform()"

python32 -c "from distutils.util import get_platform; print get_platform()"
linux-x86_64

ldd ~/bin/python32
linux-gate.so.1 => (0xffffe000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00326000)
libdl.so.2 => /lib/libdl.so.2 (0x0033f000)
libutil.so.1 => /lib/libutil.so.1 (0x006b3000)
libm.so.6 => /lib/libm.so.6 (0x00345000)
libc.so.6 => /lib/libc.so.6 (0x001e0000)
/lib/ld-linux.so.2 (0x001c2000)

this a python 2.3, that's make any difference ?



>
> return?
>
> Diez


 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      11-23-2009
Sérgio Monteiro Basto schrieb:
> Diez B. Roggisch wrote:
>
> Hi, Thanks,
>> Sérgio Monteiro Basto wrote:
>>
>>> Hi,
>>> I am in x86_64 arch , but I need
>>> compile things on 32 bits with
>>> python setup.py build
>>>
>>> Can't change the fact that distutils creates x86_64
>>> directories:
>>> build/temp.linux-x86_64-2.3/
>>>
>>> Also if I try with a python compile in 32bits and installed
>>> in system .

>> I doubt that. Distutils will always build based on the architecture of the
>> interpreter you used when building an external module.
>>
>> Are you sure that the python you used to build the extension was the right
>> one? What does
>>
>> <your-32-bit-python> -c "from distutils.util import get_platform; print
>> get_platform()"

> python32 -c "from distutils.util import get_platform; print get_platform()"
> linux-x86_64
>
> ldd ~/bin/python32
> linux-gate.so.1 => (0xffffe000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x00326000)
> libdl.so.2 => /lib/libdl.so.2 (0x0033f000)
> libutil.so.1 => /lib/libutil.so.1 (0x006b3000)
> libm.so.6 => /lib/libm.so.6 (0x00345000)
> libc.so.6 => /lib/libc.so.6 (0x001e0000)
> /lib/ld-linux.so.2 (0x001c2000)
>
> this a python 2.3, that's make any difference ?


Ok, next try:

import distutils
print distutils.sysconfig.get_config_var('SIZEOF_VOID_P' )

What does that yield?

Diez

Diez
 
Reply With Quote
 
Sérgio Monteiro Basto
Guest
Posts: n/a
 
      11-24-2009
Diez B. Roggisch wrote:

> Sérgio Monteiro Basto schrieb:
>> Diez B. Roggisch wrote:
>>
>> Hi, Thanks,
>>> Sérgio Monteiro Basto wrote:
>>>
>>>> Hi,
>>>> I am in x86_64 arch , but I need
>>>> compile things on 32 bits with
>>>> python setup.py build
>>>>
>>>> Can't change the fact that distutils creates x86_64
>>>> directories:
>>>> build/temp.linux-x86_64-2.3/
>>>>
>>>> Also if I try with a python compile in 32bits and installed
>>>> in system .
>>> I doubt that. Distutils will always build based on the architecture of
>>> the interpreter you used when building an external module.
>>>
>>> Are you sure that the python you used to build the extension was the
>>> right one? What does
>>>
>>> <your-32-bit-python> -c "from distutils.util import get_platform; print
>>> get_platform()"

>> python32 -c "from distutils.util import get_platform; print
>> get_platform()" linux-x86_64
>>
>> ldd ~/bin/python32
>>linux-gate.so.1 => (0xffffe000)
>>libpthread.so.0 => /lib/libpthread.so.0 (0x00326000)
>>libdl.so.2 => /lib/libdl.so.2 (0x0033f000)
>>libutil.so.1 => /lib/libutil.so.1 (0x006b3000)
>>libm.so.6 => /lib/libm.so.6 (0x00345000)
>>libc.so.6 => /lib/libc.so.6 (0x001e0000)
>>/lib/ld-linux.so.2 (0x001c2000)
>>
>> this a python 2.3, that's make any difference ?

>
> Ok, next try:
>
> import distutils
> print distutils.sysconfig.get_config_var('SIZEOF_VOID_P' )
>
> What does that yield?


>>> import distutils.sysconfig
>>> print distutils.sysconfig.get_config_var('SIZEOF_VOID_P' )

None

Thanks, I found the problem, python doesn't have devel stuff like
config/Makefile. A complete python3.5 with config/Makefile solved the
problem .

"distutils gets its compiler options from Python's Makefile", and I don't
have config/Makefile correctly build ...

Big thanks,

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
python setup.py build 32-bits on x86_64 machine Sérgio Monteiro Basto Python 1 11-29-2009 03:52 PM
Install from source on a x86_64 machine Christopher Taylor Python 4 10-19-2006 02:13 PM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
How to build ASP.NET projects on a separate build machine? Vagif Abilov ASP .Net 2 07-07-2004 04:34 PM



Advertisments