While building a rootfs for my nslu2 project (using crossdev/xmerge) I found a build failure in app-misc/screen-4.0.3. The following built successfully using the armeb-... toolchain: uclibc ($SYSROOT != $ROOT), busybox, zlib, openssl, openssh, cracklib, shadow, openssh, db, ncurses. ### The error ### ... checking how to run the C preprocessor... armeb-softfloat-linux-uclibc-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether armeb-softfloat-linux-uclibc-gcc needs -traditional... no checking for library containing strerror... none required configure: error: cannot run test program while cross compiling See `config.log' for more details. ... ### End of error ### Most of the results returned by google basically bypass the configure script by making a 'config.cache' file with the proper key=value pairs defined in it. This doesn't seem like a proper solution. I think the appropriate solution is to fix the configure scripts to detect a crosscompile build and bypass the tests. With that being said, I will work on a patch to screen's configure scripts. In the mean time, does this mean no one has ever crosscompiled screen? Am I missing something? thx Reproducible: Always Steps to Reproduce: 1.xmerge --root /path/to/rootfs -av app-misc/screen 2. 3. xmerge --info Portage 2.1.3.9 (uclibc/arm/armeb, gcc-3.4.6, unavailable, 2.6.22-gentoo-r5 x86_64) ================================================================= System uname: 2.6.22-gentoo-r5 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz Timestamp of tree: Wed, 26 Sep 2007 13:00:01 +0000 app-shells/bash: 3.2_p17 dev-lang/python: 2.4.4-r5, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3, 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="arm" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe" CHOST="armeb-softfloat-linux-uclibc" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bitmap-fonts cli cracklib dri midi minimal mudflap ncurses nptlonly openmp pcre readline reflection session spl static symlink truetype-fonts type1-fonts uclibc xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="uclibc" INPUT_DEVICES="keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
*** Bug 193904 has been marked as a duplicate of this bug. ***
it is not arm specific at all, it's a bug in screen
I have also encoutered this problem while crosscompiling for mipsel-softfloat-linux-gnu architecture on August 2007. After studying the screen code I gave it up because I was tired by patching about third of all packages I wanted to compile. Your patch is welcome.
Created attachment 173051 [details, diff] This patch fixes cross-compilation. It was ported from OE
you can just copy/paste it to files dir and add # crosscompile patch if tc-is-cross-compiler ; then epatch "${FILESDIR}"/"${P}"-crosscompile.patch fi to your ebuild
Cross compile fix for common @console util. I'll push this.
Pushed to the tree 1.19. It appeared safe and there was no real reason to conditionally wrap the patch behind a cross compiler check.
app-misc/screen-4.4.0 has the same problem checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes configure: error: in `/var/tmp/portage/app-misc/screen-4.4.0/work/screen-4.4.0': configure: error: cannot run test program while cross compiling See `config.log' for more details !!! Please attach the following file when seeking support:
Created attachment 447302 [details] config.log
# armv6j-hardfloat-linux-gnueabi-emerge --info app-misc/screen Portage 2.3.1 (python 2.7.12-final-0, default/linux/arm/13.0/armv6j, gcc-5.4.0, glibc-2.23-r2, 4.7.4-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.7.4-gentoo-x86_64-Intel-R-_Celeron-R-_2957U_@_1.40GHz-with-gentoo-2.3 KiB Mem: 3967644 total, 1236044 free KiB Swap: 2097148 total, 2097124 free Timestamp of repository gentoo: Tue, 20 Sep 2016 08:30:01 +0000 sh bash 4.3_p46 ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 distcc 3.2rc1 x86_64-gentoo-linux-gnu [disabled] app-shells/bash: 4.3_p46::gentoo dev-lang/python: 3.4.5::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.21.7::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/binutils: 2.26.1::gentoo sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 local location: /usr/local/portage/overlay masters: gentoo proaudio gentoo-kodi-overlay priority: 0 gentoo-kodi-overlay location: /usr/local/portage/gentoo-kodi-overlay masters: gentoo priority: 1 proaudio location: /var/lib/layman/proaudio masters: gentoo priority: 50 xmw location: /var/lib/layman/xmw masters: gentoo priority: 50 ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="@FREE as-is freedist" CBUILD="x86_64-gentoo-linux-gnu" CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer" CHOST="armv6j-hardfloat-linux-gnueabi" CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer" DISTDIR="/data/raspi_root/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build=n --buildpkg" FCFLAGS="-O2 -pipe -march=armv6j" FEATURES="assume-digests binpkg-logs buildpkg candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=armv6j" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="fr_BE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5 -l2" PKGDIR="/data/raspi_root/var/portage/packages" PORTAGE_CONFIGROOT="/usr/armv6j-hardfloat-linux-gnueabi/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="arm bzip2 cli cracklib crypt cxx dri iconv modules ncurses nls nptl openmp pcre readline seccomp session sqlite ssl tcpd unicode xattr zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr nl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON z