Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610116 - dev-python/pyxattr fails install on crossdev: pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
Summary: dev-python/pyxattr fails install on crossdev: pyport.h:886:2: error: #error "...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 21:18 UTC by Kent Fredric (IRC: kent\n)
Modified: 2019-01-06 10:55 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cross-einfo (cross-einfo,4.22 KB, text/plain)
2017-02-20 21:18 UTC, Kent Fredric (IRC: kent\n)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2017-02-20 21:18:21 UTC
Created attachment 464460 [details]
cross-einfo

>>> 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
running build
running build_ext
building 'xattr' extension
creating /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
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="iustin@k1024.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,
                 from xattr.c:25:
/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.
Comment 1 Mike Gilbert gentoo-dev 2017-02-20 22:00:31 UTC
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.
Comment 2 Eduardo Barreto Alexandre 2017-02-24 20:08:03 UTC
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?
Comment 3 Mike Gilbert gentoo-dev 2017-02-24 21:45:03 UTC
(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.