Cross compile for my target board #133
-
Hi I need the pycryptodome/lxml package for the following architecture of my target board. The target board does not have internet access so I cannot directly install pycryptodome/lxml on it. I need a method to compile it on my ubuntu 64 bit pc and then transfer it on my board. Following describes the toolchain I am using and the architecture of the target board. I cant find a .whl file or anything else for this architecture. Can I solve this problem using crossenv and how? PPC_e5500_CC_BASE_DIR := /opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux Regards |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Building a wheel for an embedded platform is an intended use case for crossenv. While I haven't tested this on a powerpc target yet, if you have successfully compiled Python for this board, then crossenv should work. |
Beta Was this translation helpful? Give feedback.
-
I installed the python-docx package using crossenv. The names of the .so files have "cpython-36m-powerpc-linux-gnu" written in them because I cross compiled them. For eg: the name of _raw_ecb.so is written as _raw_ecb.cpython-36m-powerpc-linux-gnu.so . So will it cause problem because I think code would try to find _raw_ecb.so and not "_raw_ecb.cpython-36m-powerpc-linux-gnu.so". Will I have to remove "cpython-36m-powerpc-linux-gnu" from every .so file name ? |
Beta Was this translation helpful? Give feedback.
-
No, I don't think you'll need to rename anything, and those file names are a good sign that everything is working. What your seeing is a PEP3149 ABI-tagged .so file, which was introduced in Python 3.2. Python will produce the long name by default and prefers that on import, but it will still fall back to the shorter version ( |
Beta Was this translation helpful? Give feedback.
-
I am trying to cross compile lxml package for my board which has following coniguration: PPC_e5500_CC_BASE_DIR := /opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux My pc has ubuntu 16.04 64bit OS. I am using the crossenv package for this purpose (https://pypi.org/project/crossenv/). But I am getting the following error when installing lxml. (cross) p@OptiPlex-5050:~/Desktop$ pip install lxml
Building lxml version 4.5.0. warning Cannot determine current byte order, assuming big-endian.^~~~~~~ Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? error: command 'powerpc-fsl-linux-gcc' failed with exit status 1 Command "/home/prateek/Desktop/v/cross/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-nr9hop30/lxml/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-qq5739wi-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/prateek/Desktop/v/cross/include/site/python3.6/lxml" failed with error code 1 in /tmp/pip-build-nr9hop30/lxml/ Then I tried installing libxml2 and got the following error: (cross) p@OptiPlex-5050:~/Desktop$ pip install libxml2 If possible, please help me in resolving this issue. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Libxml2 is a C library that the lxml uses, along with libxslt. Lxml requires both to build and to run. You will need to do the following:
|
Beta Was this translation helpful? Give feedback.
Libxml2 is a C library that the lxml uses, along with libxslt. Lxml requires both to build and to run. You will need to do the following:
--env
when buildin…