Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

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

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


sergiomb at sapo

Nov 23, 2009, 9:39 AM

Post #1 of 5 (294 views)
Permalink
[repost please help me] python setup.py build for 32-bits on x86_64 machine

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,

--
http://mail.python.org/mailman/listinfo/python-list


deets at nospam

Nov 23, 2009, 10:10 AM

Post #2 of 5 (227 views)
Permalink
Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine [In reply to]

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
--
http://mail.python.org/mailman/listinfo/python-list


sergiomb at sapo

Nov 23, 2009, 10:50 AM

Post #3 of 5 (227 views)
Permalink
Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine [In reply to]

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

--
http://mail.python.org/mailman/listinfo/python-list


deets at nospam

Nov 23, 2009, 2:04 PM

Post #4 of 5 (223 views)
Permalink
Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine [In reply to]

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
--
http://mail.python.org/mailman/listinfo/python-list


sergiomb at sapo

Nov 23, 2009, 6:44 PM

Post #5 of 5 (219 views)
Permalink
Re: [repost please help me] python setup.py build for 32-bits on x86_64 machine [In reply to]

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,

--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.