When attempting to cross-build dev-lang/python-2.7.1-r1 the build fails very early on in the process with In file included from Include/Python.h:58:0, from ./Modules/python.c:3: Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" Reproducible: Always Steps to Reproduce: 1. emerge-wrapper --target=arm-none-linux-gnueabi python Actual Results: >>> Compiling source in /usr/arm-none-linux-gnueabi/tmp/portage/dev-lang/python-2.7.1-r1/work/Python-2.7.1 ... make -j3 EPYTHON=python2 arm-none-linux-gnueabi-gcc -c -fno-strict-aliasing -Os -pipe -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ -I/usr/arm-none-linux-gnueabi/include/ -fwrapv -DNDEBUG -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c arm-none-linux-gnueabi-gcc -c -fno-strict-aliasing -Os -pipe -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ -I/usr/arm-none-linux-gnueabi/include/ -fwrapv -DNDEBUG -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c arm-none-linux-gnueabi-gcc -c -fno-strict-aliasing -Os -pipe -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ -I/usr/arm-none-linux-gnueabi/include/ -fwrapv -DNDEBUG -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Parser/grammar1.o Parser/grammar1.c In file included from Include/Python.h:58:0, from ./Modules/python.c:3: Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"In file included from Include/Python.h:58:0, from Include/pgenheaders.h:10, from Parser/acceler.c:13: Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" In file included from Include/Python.h:58:0, from Parser/grammar1.c:4: Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" make: *** [Parser/grammar1.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [Parser/acceler.o] Error 1 make: *** [Modules/python.o] Error 1 emake failed emerge-wrapper --target arm-none-linux-gnueabi python --info Portage 2.1.9.44 (embedded, gcc-4.5.2, glibc-2.11.3-r0, 2.6.38-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.38-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-2.0.1 Timestamp of tree: Sun, 10 Apr 2011 10:30:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 4.1_p5 dev-java/java-config: 1.3.7-r1, 2.1.10 dev-lang/python: 2.4.4-r13, 2.5.2-r5, 2.6.4-r1, 3.1.1-r1 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.8.0-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.1-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.21 sys-devel/gcc: 4.1.2, 4.3.1-r1, 4.4.3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.81-r1 virtual/os-headers: 2.6.32 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="arm" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ -I/usr/arm-none-linux-gnueabi/include/" CHOST="arm-none-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-Os -pipe -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ -I/usr/arm-none-linux-gnueabi/include/" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo http://ftp.gtlib.cc.gatech.edu/pub/gentoo" LDFLAGS="-L/usr/arm-none-linux-gnueabi/lib -L/usr/arm-none-linux-gnueabi/usr/lib" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/usr/arm-none-linux-gnueabi/packages/" PORTAGE_CONFIGROOT="/usr/arm-none-linux-gnueabi/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/usr/arm-none-linux-gnueabi/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bindist embedded kdrive make-symlinks minimal modules multicall pcre zlib" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 269383 [details] build.log
Created attachment 269385 [details] build.log Previous attachment was wrong build log.
You need to override default autoconf assumption : # cat /usr/i586-alix-linux-gnu/etc/portage/env/dev-lang/python export ac_cv_have_long_long_format=yes
(In reply to comment #3) > You need to override default autoconf assumption : > > # cat /usr/i586-alix-linux-gnu/etc/portage/env/dev-lang/python > export ac_cv_have_long_long_format=yes Thanks, this worked for armv6j-unknown-linux-gnueabi cross-compile from i686. Also, I think this bug is a duplicate of #371009.
It hit me when cross-compiling for i586-nptl-linux-gnu. The proposed workaround works well, though.
Not specific to ARM or 2.7.1. Happens with i686-pc-linux-gnu with 3.2.3-r2 as well.
Triggered this while xcompiling to i686-linux-gnu. Used the fix suggested here in comment #3. I then get an additional error down the road: i686-linux-gnu-gcc -c -DNDEBUG -Os -pipe -fomit-frame-pointer -fwrapv -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c Python/ceval.c: In function ‘PyEval_EvalFrameEx’: Python/ceval.c:875:6: error: #error "Computed gotos are not supported on this compiler."
*** Bug 371009 has been marked as a duplicate of this bug. ***
should be all set now in the tree; thanks for the report! Commit message: Export ac_cv_have_long_long_format=yes when cross-compiling http://sources.gentoo.org/dev-lang/python/python-2.7.3-r2.ebuild?r1=1.14&r2=1.15 http://sources.gentoo.org/dev-lang/python/python-2.7.3-r3.ebuild?r1=1.11&r2=1.12 http://sources.gentoo.org/dev-lang/python/python-3.2.3-r1.ebuild?r1=1.11&r2=1.12 http://sources.gentoo.org/dev-lang/python/python-3.2.3-r2.ebuild?r1=1.11&r2=1.12 http://sources.gentoo.org/dev-lang/python/python-3.2.3.ebuild?r1=1.19&r2=1.20 http://sources.gentoo.org/dev-lang/python/python-3.3.0-r1.ebuild?r1=1.7&r2=1.8 http://sources.gentoo.org/dev-lang/python/python-3.3.0.ebuild?r1=1.5&r2=1.6