Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239110 - dev-lang/python-2.5.2 fails to crosscompile - checking for %zd printf() format support... configure: error: cannot run test program while cross compiling
Summary: dev-lang/python-2.5.2 fails to crosscompile - checking for %zd printf() forma...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on: 184308
Blocks:
  Show dependency tree
 
Reported: 2008-09-30 05:20 UTC by xeb
Modified: 2009-02-26 05:55 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,53.14 KB, text/plain)
2008-09-30 05:22 UTC, xeb
Details
Replace AC_TRY_RUN with AC_RUN_IFELSE with a crosscompile section (python-2.5.2-crosscompile.patch,664 bytes, patch)
2009-01-30 21:01 UTC, Daniel Gryniewicz (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xeb 2008-09-30 05:20:43 UTC
I try to crosscompile python-2.5.2-r7 to armv5te-softfloat-linux-gnueabi and it fails on configure stage:
ROOT=/usr/armv5te-softfloat-linux-gnueabi emerge-wrapper --target armv5te-softfloat-linux-gnueabi
............
checking for rl_callback_handler_install in -lreadline... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for broken nice()... no
checking for broken poll()... no
checking for struct tm.tm_zone... (cached) yes
checking for working tzset()... no
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... yes
checking for is_term_resized... yes
checking for resize_term... yes
checking for resizeterm... yes
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %zd printf() format support... configure: error: cannot run test program while cross compiling
See `config.log' for more details.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-lang/python-2.5.2-r7/work/Python-2.5.2/config.log
 *
 * ERROR: dev-lang/python-2.5.2-r7 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3417:  Called econf 'src_compile' 'src_compile' '--with-fpectl' '--enable-shared' '--disable-ipv6' '--infodir=${prefix}/share/info' '--mandir=${prefix}/share/man' '--with-libc='
 *               ebuild.sh, line  513:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/python-2.5.2-r7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-2.5.2-r7/temp/environment'.
 *




emerge --info
Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.7-r2, 2.6.26-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.26-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
Timestamp of tree: Tue, 30 Sep 2008 01:45:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -pipe -O2 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -msse3 -pipe -O2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.KOI8-R"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://server/gentoo-portage"
USE="X alsa amd64 arts berkdb bzip2 cli cracklib crypt dri gdbm gif gpm iconv isdnlog jpeg kdeenablefinal kdehiddenvisibility midi mmx mp3 mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre perl png pppd python readline reflection session spl sse sse2 ssl ssse3 sysfs tcpd vorbis xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="nv radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always
Comment 1 xeb 2008-09-30 05:22:39 UTC
Created attachment 166796 [details]
build.log
Comment 2 xeb 2008-09-30 05:23:56 UTC
same with python-2.5.2-r8
Comment 3 Marat Radchenko 2008-10-17 10:23:11 UTC
same error here
Comment 4 Ron Simpkin 2008-11-08 12:25:17 UTC
just thought I'd add a me too...
Comment 5 Tibor Vago 2008-12-28 22:18:48 UTC
I stucked too with this hmmm
Comment 6 Tibor Vago 2008-12-29 00:01:24 UTC
A workaround

/usr/portage/dev-lang/python/files/cross252.patch:
------------------------------------------------------------------------------
--- Python-2.5.2/configure.orig 2008-12-28 23:54:01.000000000 +0100
+++ Python-2.5.2/configure      2008-12-28 23:50:11.000000000 +0100
@@ -22495,7 +22495,7 @@

 { echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
 echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
+if test "$cross_compiling" = no; then
   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run test program while cross compiling
------------------------------------------------------------------------------


/usr/portage/dev-lang/python/python-2.5.2-r8.ebuild:
------------------------------------------------------------------------------
 . . .
        # set LDFLAGS so we link modules with -lpython2.5 correctly.
        # Needed on FreeBSD unless python2.5 is already installed.
        # Please query BSD team before removing this!
        append-ldflags "-L."

+       epatch "${FILESDIR}"/cross252.patch   # add this line to the ebuild
        econf \
                --with-fpectl \
                --enable-shared \
                `use_enable ipv6` \
 . . .
------------------------------------------------------------------------------
Comment 7 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-01-30 21:01:07 UTC
Created attachment 180317 [details, diff]
Replace AC_TRY_RUN with AC_RUN_IFELSE with a crosscompile section

This patch replaces the (failing) AC_TRY_RUN with AC_RUN_IFELSE, with a crosscompile section defaulting to the (presuambly) safer "no" answer.  This makes it compile for me.
Comment 8 Tibor Vago 2009-01-30 22:28:55 UTC
It works for me too with version 2.5.2-r8