-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross compile for my target board #18
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. |
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 ? |
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 ( |
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. |
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:
|
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
ifeq (${TARGET_CPU}, PPC_e5500)
ifeq (${TARGET_CPU_BIT},)
$(info TARGET_CPU_BIT must be 32BIT/64BIT)
$(warning TARGET_CPU_BIT not specified, assuming 32BIT)
TARGET_CPU_BIT = 32BIT
endif
TARGET_ARCH = powerpc
COMPILER_TYPE = gcc
ifeq (${TARGET_CPU_BIT}, 32BIT)
#TARGET_CPU_BIT = 32BIT
CROSS_COMPILE_PATH = ${PPC_e5500_CC_BASE_DIR}/usr/bin/powerpc-fsl-linux:${PPC_e5500_CC_BASE_DIR}/usr/bin
CROSS_COMPILE = powerpc-fsl-linux-
HOST = powerpc-fsl-linux
CC_SYSROOT = ${PPC_e5500_CC_BASE_DIR}/../ppce5500-fsl-linux
COMMON_CFLAGS += -m32 -mhard-float -mcpu=e5500
COMMON_CFLAGS += --sysroot=${CC_SYSROOT}
Regards
Shubham Mishra
The text was updated successfully, but these errors were encountered: