In a python testframework we interface with a tcl API for spirent testcenter through Tkinter. This spirent testcenter API is only available in 32 bit, which means that our tcl interpreter needs to be 32 bit. We steer the tcl API using Tkinter from python. (I am aware recently a python driver was released for testcenter, but this is also 32 bit only.) Because Tkinter is integrated in python, the python installation also needs to be 32 bit.
I would like to run this framework on a CentOS x86_64 workstation. I have managed to install the testcenter driver, ActiveTcl and python all in 32 bit and this works. However, the testframework is also dependent on a number of python packages (e.g. numpy), which also need to be built in 32 bit to be able to use them. I cannot figure out how to build these packages in 32 bit however. I have tried passing compiler option -m32 to the distutils build command (i.e. python setup.py build) but this is happily ignored. There seems to be a -p option to pass the platform, but this only works on windows. I have also looked into using a 32 bit only compiler but distutils seems to have a static list of available compilers, and only the intel compiler (i.e. commercial...) is 32 bit only I believe.
Does anybody have a brilliant idea on how to build python modules in 32 bit on a 64 bit linux architecture, or how to build python itself in 64 bit so that the package installation is easy, yet integrate tcl/tk in 32 bit?
Cheers.
Wim
To build modules the way you're trying to do, you need to set CFLAGS=-m32 and LDFLAGS=-m32 before attempting to compile the module.
For example:
CFLAGS=-m32 LDFLAGS=-m32 python setup.py install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With