I have cross compiled python 2.7 and a lot of python packages on Ubuntu x86 for an Arm linux 3.2 host without a native compiler. I am trying to build the lxml package for the same host. In preparation I have built libxml2 and libxslt for the arm with no problem. The final step, building lxml, fails in the linker stage after compiling the cython generated code, with the error build/temp.linux-i686-2.7/src/lxml/lxml.etree.o: could not read symbols: File in wrong format The generated command line begins with gcc -pthread -.... whereas the compiler command is arm-linux-gnueabihf-gcc...... Clearly setup.py uses the correct compiler and is successfully compiles teh c code but then uses incorrect linker. Are there any suggestions how to get the setup.py script to use the correct linker. I have tried different options on the command line which is currently python setup.py build --verbose --static --build-platlib=arm-linux-gnueabihf- $CC is set to arm-linux-gnueabihf-gcc in the environment and the paths are setup. Thanks in advance. |
|
来自: dwlinux_gs > 《webservice3》