Created attachment 464460 [details]
>>> Compiling source in /usr/arm-unknown-linux-gnueabi/tmp/portage/dev-python/pyxattr-0.6.0/work/pyxattr-0.6.0 ...
* python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
building 'xattr' extension
arm-unknown-linux-gnueabi-gcc -O2 -pipe -fomit-frame-pointer -fPIC -D_XATTR_VERSION="0.6.0" -D_XATTR_AUTHOR="Iustin Pop" -D_XATTR_EMAIL="firstname.lastname@example.org" -I/usr/include/python2.7 -c xattr.c -o /usr/arm-unknown-linux-gnueabi/tmp/portage/dev-python/pyxattr-0.6.0/work/pyxattr-0.6.0-python2_7/temp.linux-x86_64-2.7/xattr.o -Wall -Wsign-compare
cc1: warning: include location "/usr/include/python2.7" is unsafe for cross-compilation [-Wpoison-system-directories]
In file included from /usr/include/python2.7/Python.h:58:0,
/usr/include/python2.7/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
error: command 'arm-unknown-linux-gnueabi-gcc' failed with exit status 1
* USE: arm elibc_glibc kernel_linux python_targets_python2_7 python_targets_python3_4 userland_GNU
Happens with all versions.
Cross-compiling python packages is not generally expected to work.
In this case, the native Python.h file from /usr/lib/python2.7 is being used; for the cross compile to work, distutils would have to be smart enough to use the python headers installed in the sysroot environment.
I have the same problem, and is not that I want to install python in my crossdev toolchain, it that some packages demand it.
Is there any workaround to it?
(In reply to Eduardo Barreto Alexandre from comment #2)
> Is there any workaround to it?
Modify your USE flags so that pyxattr is not pulled into the depgraph.