Host-machine: x86_64 Target-machine: armv7-a Target directory: /usr/armv7a-hardfloat-linux-gnueabi/ Expected installation directory: /usr/armv7a-hardfloat-linux-gnueabi/usr/lib/python3.4/site-packages/portage /usr/armv7a-hardfloat-linux-gnueabi/usr/lib/python2.7/site-packages/portage Current installation directory: /usr/armv7a-hardfloat-linux-gnueabi/usr/lib64/python3.4/site-packages/portage /usr/armv7a-hardfloat-linux-gnueabi/usr/lib64/python2.7/site-packages/portage Executing emerge inside the arm chroot failes with error: emerge Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/emerge", line 41, in <module> import portage ImportError: No module named 'portage' Reproducible: Always
Created attachment 443872 [details] install.log of portage install part of merging portage
Created attachment 443874 [details] make.conf /usr/armv7a-hardfloat-linux-gnueabi/etc/portage/make.conf
The portage ebuild uses the distutils-r1 eclass, and I believe that the lib64 part of the installation path originates from the PYTHON_SITEDIR variable which is set by the python-utils-r1 eclass. @python Am I right that python-utils-r1 eclass does not support cross-compiling?
I doubt anyone of us has any clue. Cross-compilation is only supported by a few people in Gentoo, and is hard to get right. I'd say this could be PEBKAC as well -- wrong setup that results in $(get_libdir) returning lib64.
In the python-utils-r1 eclass, PYTHON_SITEDIR is assigned as follows: PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') || die Thhe get_libdir never enters into the picture, so the cross-compile support would have to be in distutils.sysconfig library, if anywhere.
(In reply to Michał Górny from comment #4) > I'd say this could be PEBKAC > as well -- wrong setup that results in $(get_libdir) returning lib64. Thanks for this analysis. I'm not the only one: http://superuser.com/questions/1038509/why-does-portage-complain-for-lack-of-a-portage-python-module (2nd answer)
This was reported months ago in bug 582194. I don't see any obvious/simple solution.
*** This bug has been marked as a duplicate of bug 582194 ***