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

  • Thread starter Sérgio Monteiro Basto
  • Start date
S

Sérgio Monteiro Basto

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,
 
D

Diez B. Roggisch

Sérgio Monteiro Basto said:
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
 
S

Sérgio Monteiro Basto

Diez B. Roggisch wrote:

Hi, Thanks,
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 ?
 
D

Diez B. Roggisch

Sérgio Monteiro Basto said:
Diez B. Roggisch wrote:

Hi, Thanks,
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
 
S

Sérgio Monteiro Basto

Diez said:
Ok, next try:

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

What does that yield?
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top