Created attachment 338368 [details] Build log When I attempt to cross compile dev-libs/libical for ARM on an AMD64 build machine, I get an error regarding an incompatible libpthread.so. It appears to be attempting to link the native libpthread.so instead of the library for the target platform. # armv7a-hardfloat-linux-gnueabi-emerge --info Portage 2.1.11.31 (!/usr/local/portage/profiles/beagle, gcc-4.7.2, unavailable, 3.7.4-gentoo x86_64) ================================================================= System uname: Linux-3.7.4-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.1 Timestamp of tree: Tue, 05 Feb 2013 14:15:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r2, 3.2.3-r2 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.6.3-r1, 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.3.6-r1, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo x-lostwoods MythTV-0-25-fixes sunrise steam-overlay kde x11 ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe -fomit-frame-pointer" CHOST="armv7a-hardfloat-linux-gnueabi" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-Os -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FCFLAGS="-Os -pipe" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-Os -pipe" GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo http://mirrors.cs.wmich.edu/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/" LDFLAGS="" MAKEOPTS="-j9" PKGDIR="/usr/armv7a-hardfloat-linux-gnueabi/packages/" PORTAGE_CONFIGROOT="/usr/armv7a-hardfloat-linux-gnueabi/" 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="/usr/armv7a-hardfloat-linux-gnueabi/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/lostwoods /usr/local/portage/armfixes /var/lib/layman/sunrise /var/lib/layman/kde" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bindist dbus kdrive make-symlinks minimal modules multicall ncurses qt3support ssl 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, USE_PYTHON
The build log you attached doesn't seem to suggest that - you terminated the build process it seems. Could you attach a complete build log, please?
Created attachment 338428 [details] build.log
Additional investigation revealed this is an issue with the make install step. It appears to be an issue with make DESTDIR=<dir> install and libtool attempting to relink the library with native libraries as a result. I found a discussion regarding this issue here: http://lists.gnu.org/archive/html/libtool/2010-02/msg00000.html It also appears not to be specific to libical, as I'm now seeing a similar issue attempting to cross compile gstreamer.
Created attachment 338656 [details, diff] Workaround for ebuild (patch) I found a work around for the issue, based on the information I found on this webpage: http://www.metastatic.org/text/libtool.html As shown in the attached patch, I changed the install part of the ebuild to modify the *.la files from libical to point at the install root used when packaging. This allows the build to succeed and since the ebuild does not install the *.la files, there's no issue with them being incorrect in the SYSROOT. I've only tried in a Portage overlay I use when cross compiling, so this may be undesirable (or even broken) for native builds.
I have the same issue cross-compiling libical (on which bluez depends) for armv7a-hardfloat-linux-gnueabi. Shall I attach my build log, too?
Just to mention nikarul's trick (from comment #4) did it although I recon it's just a workaround as from what I understand elibtoolize should take care of this issue.
Today I compiled libical-1.0.1 for the ARM target and it installed correctly. This is a WORKSFORME status as far as I'm concerned.
Thanks for the feedback, I guess we can assume it's fixed in libical-1.0.1 then.