When attempting to cross-compile vim for ARM from amd64, the configure script does not seem to be able to find tgetent in ncurses. sys-libs/ncurses gets pulled into the dependency tree and installed before app-editors/vim-core, and Reproducible: Always Steps to Reproduce: 1. crossdev -S armv6j-hardfloat-linux-gnueabi 2. emerge vim (I also had to mask >sys-apps/coreutils-8.20 due to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12741) Actual Results: emerge fails during configure phase of app-editors/vim-core with the following: checking --with-tlib argument... empty: automatic terminal library selection checking for tgetent in -ltinfo... no checking for tgetent in -lncurses... yes ncurses library is not usable checking for tgetent in -ltermlib... no checking for tgetent in -ltermcap... no checking for tgetent in -lcurses... yes curses library is not usable no terminal library found checking for tgetent()... configure: error: NOT FOUND! You need to install a terminal library; for example ncurses. Or specify the name of the library with --with-tlib. Expected Results: autoconf should find the installed ncurses library and headers in /usr/armv6j-hardfloat-linux-gnueabi/ and successfully configure vim Portage 2.1.12.1 (arch/arm, gcc-4.6.3, unavailable, 3.9.2-gentoo x86_64) ================================================================= System uname: Linux-3.9.2-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.2 KiB Mem: 8176736 total, 1537624 free KiB Swap: 0 total, 0 free Timestamp of tree: Fri, 14 Jun 2013 06:30:01 +0000 ld GNU ld (GNU Binutils) 2.22 distcc 3.1 x86_64-pc-linux-gnu [enabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.4, 3.2.4 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6, 1.13.2 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3, 4.7.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo x-overlay dustin ACCEPT_KEYWORDS="arm" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O4 -pipe -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -fomit-frame-pointer" CHOST="armv6j-hardfloat-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-O4 -pipe -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -fomit-frame-pointer" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=y --jobs=4" FCFLAGS="-O2" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="" MAKEOPTS="-j9" PKGDIR="/var/cache/portage/binpkgs/embedded/arm/armv6j-hardfloat-linux-gnueabi" PORTAGE_CONFIGROOT="/home/dustin/rpi-build/configroot/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp/portage/armv6j-hardfloat-linux-gnueabi/" PORTDIR="/var/cache/portage/tree" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bindist cxx ipv6 minimal unicode zlib" ELIBC="glibc" KERNEL="linux" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 351010 [details] Build log
Created attachment 351012 [details] config.log
most likely the configure script has some dumb cross-compile logic: configure:10027: checking for tgetent in -lncurses configure:10052: armv6j-hardfloat-linux-gnueabi-gcc -o conftest -O4 -pipe -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -fomit-frame-pointer conftest.c -lncurses -lnsl >&5 configure:10052: $? = 0 configure:10062: result: yes configure:10101: result: ncurses library is not usable that really shouldn't have returned "not usable"
(In reply to SpanKY from comment #3) > most likely the configure script has some dumb cross-compile logic: > configure:10027: checking for tgetent in -lncurses > configure:10052: armv6j-hardfloat-linux-gnueabi-gcc -o conftest -O4 -pipe > -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s > -fomit-frame-pointer conftest.c -lncurses -lnsl >&5 > configure:10052: $? = 0 > configure:10062: result: yes > configure:10101: result: ncurses library is not usable > > that really shouldn't have returned "not usable" It does, the "not usable" comes from trying to run the conftest :( It is not really needed either, if you manage to build the conftest you are done. As a workaround you can use EXTRA_ECONF="--with-tlib=ncurses" emerge .....
--- a/src/configure.in +++ b/src/configure.in @@ -2958,7 +2958,7 @@ # include <stddef.h> #endif main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }], - res="OK", res="FAIL", res="FAIL") + res="OK", res="FAIL", res="OK") if test "$res" = "OK"; then break fi
Happened to stumble over this today... besides the odd behavior of the test being compile+run instead of just a compile test, why is auto-detection used instead at all of selecting the terminal library via use flags?
Typing fail... s/at all// :(
This should now be fixed in 7.4.430, please open a new bug if other cross-compile issues appear.
(In reply to mike@marineau.org from comment #6) > Happened to stumble over this today... besides the odd behavior of the test > being compile+run instead of just a compile test, why is auto-detection used > instead at all of selecting the terminal library via use flags? Now that vim works with the split out tinfo lib these days, not much. I might do that on the next bump since I forgot this time around. Feel free to open a bug with a patch if you want this faster.