Comments (7)
It looks like you're using the system version of python. First, it's important that build-python and cross-python be the exact same version, 3.6.5 in your case. Second, the version of Python that came with the system has distro-specific patches can cause incompatibilities between build-python and host-python. I highly recommend that you build Python 3.6.5 for your workstation from the same source used to build the version on the Raspberry Pi, and run crossenv using that.
from crossenv.
Meanwhile I've update host-python to 3.5.10 to be on the safe side, but that results in the same error. So I will now compile my own python 3.5.10 on host as well.
from crossenv.
Build-python and host-python are now identical. Now I get this error:
[tgeulig@sw-dev](master)> PYTHONSTARTUP= PYTHONHOME=/opt/python-3.6.10 PYTHONPATH=/opt/python-3.6.10/lib64/python3.6/lib-dynload /opt/python-3.6.10/bin/python3 -m crossenv /nentec/work/geulig/NENUX/nenux.git/user/python/build/python venv
WARNING: CC is a compound command (arm-pgc-linux-gnueabi-gcc -mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include -I/nentec/work/geulig/NENUX/nenux.git/include -O1 -pipe -fno-common -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include)
WARNING: This can cause issues for modules that don't expect it.
WARNING: Consider setting CC='arm-pgc-linux-gnueabi-gcc' and CFLAGS='-mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include -I/nentec/work/geulig/NENUX/nenux.git/include -O1 -pipe -fno-common -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include'
WARNING: CXX is a compound command (arm-pgc-linux-gnueabi-g++ -mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include -I/nentec/work/geulig/NENUX/nenux.git/include)
WARNING: This can cause issues for modules that don't expect it.
WARNING: Consider setting CXX='arm-pgc-linux-gnueabi-g++' and CXXFLAGS='-mlittle-endian -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/include -I/nentec/work/geulig/NENUX/nenux.git/linux-4.19.x/arch/arm/mach-bcm/include -I/nentec/work/geulig/NENUX/nenux.git/include'
ERROR: Command '['/home/nentec/work/geulig/NENUX/nenux.git/user/python_modules/venv/build/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
If I run the last command directly, I get:
[tgeulig@sw-dev](master)> /home/nentec/work/geulig/NENUX/nenux.git/user/python_modules/venv/build/bin/python3 -Im ensurepip --upgrade --default-pip
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File "/opt/python-3.6.10/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/python-3.6.10/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/python-3.6.10/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/opt/python-3.6.10/lib/python3.6/ensurepip/__init__.py", line 5, in <module>
import tempfile
File "/opt/python-3.6.10/lib/python3.6/tempfile.py", line 45, in <module>
from random import Random as _Random
File "/opt/python-3.6.10/lib/python3.6/random.py", line 42, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ModuleNotFoundError: No module named 'math'
I'm not sure how build-python is supposed to find its modules here ...
(using crossenv 0.7 now BTW)
from crossenv.
It sounds like lib-dynload
is missing somehow. It should have been installed to /opt/python-3.6.10/lib/python3.6/lib-dynload
when you ran make install
. Can you verify that it's there? What arguments did you use with configure/make/make install?
from crossenv.
"/opt/python-3.6.10/lib/python3.6/lib-dynload/" isn't there, but "/opt/python-3.6.10/lib64/python3.6/lib-dynload/" is.
Complie:
./configure --prefix=/opt/python-3.6.10 --disable-shared --disable-ipv6 --enable-unicode=ucs4 --without-doc-strings
make
make install
from crossenv.
I'm unable to reproduce that when I build Python with those arguments in an openSUSE Leap Docker image. I get /opt/python-3.6.10/lib/python3.6/lib-dynload
as expected. If I rename it to /opt/python-3.6.10/lib64/python3.6/lib-dynload
, I get the same error you are seeing.
I don't know what's causing it to install incorrectly, but a quick fix:
ln -s /opt/python-3.6.10/lib64/python3.6/lib-dynload /opt/python-3.6.10/lib/python3.6/lib-dynload
from crossenv.
Thank you for your help, with this symbolic link I am finally able to compile some modules.
I don't know, why the link is necessary, but as it seems to be an issue of my environment, I am closing this issue.
from crossenv.
Related Issues (20)
- paramiko crosscompile issue HOT 2
- Help cross-compiling grpcio HOT 2
- PyPy does not define 'HOST_GNU_TYPE' HOT 5
- Broken in 3.11rc2 HOT 2
- Allow passing host_project_base directly
- Support musllinux tags HOT 5
- Compatibility problems with `importlib.metadata` and `pypa/build` HOT 2
- LIBRARY_PATH ignored
- Not working HOT 4
- problems on older python versions
- ModuleNotFoundError: No module named '_sysconfigdata__aarch64-linux-android'
- _get_sysconfig_name() replacement may fail if called with arguments. HOT 1
- Python.h: No such file or directory HOT 1
- Building wheel for bcrypt did not run successfully HOT 3
- cryptography: error: can't find Rust compiler HOT 2
- Use Pyinstaller inside crossenv for cross packaging HOT 1
- Are there any plans to make this work with BSD? HOT 2
- Sane default bitness for 32-bit on 64-bit hosts HOT 1
- python3.10 & setuptools [wip report] HOT 3
- pip failed to install numpy when version>1.17.5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crossenv.