Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362945 - dev-lang/python cross-compiling - Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
Summary: dev-lang/python cross-compiling - Include/pyport.h:243:13: error: #error "Thi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 371009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-10 20:29 UTC by Patrick
Modified: 2013-03-19 04:04 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,867 bytes, text/plain)
2011-04-10 20:30 UTC, Patrick
Details
build.log (build.log,66.71 KB, text/plain)
2011-04-10 20:38 UTC, Patrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick 2011-04-10 20:29:57 UTC
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
Comment 1 Patrick 2011-04-10 20:30:39 UTC
Created attachment 269383 [details]
build.log
Comment 2 Patrick 2011-04-10 20:38:54 UTC
Created attachment 269385 [details]
build.log

Previous attachment was wrong build log.
Comment 3 Bertrand Jacquin 2011-10-02 20:58:04 UTC
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
Comment 4 Wim Muskee 2011-11-18 11:55:19 UTC
(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.
Comment 5 Arseny Solokha 2012-07-06 06:37:29 UTC
It hit me when cross-compiling for i586-nptl-linux-gnu. The proposed workaround works well, though.
Comment 6 Arun Raghavan (RETIRED) gentoo-dev 2012-12-26 12:24:45 UTC
Not specific to ARM or 2.7.1. Happens with i686-pc-linux-gnu with 3.2.3-r2 as well.
Comment 7 Eldad Zack 2012-12-29 17:01:08 UTC
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."
Comment 8 SpanKY gentoo-dev 2013-03-19 04:03:52 UTC
*** Bug 371009 has been marked as a duplicate of this bug. ***