Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456256 - dev-libs/libical - armv7a-hardfloat-linux-gnueabi-ld: /usr/lib/libpthread.a: could not read symbols: File format not recognized
Summary: dev-libs/libical - armv7a-hardfloat-linux-gnueabi-ld: /usr/lib/libpthread.a: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-02-09 03:39 UTC by nikarul
Modified: 2015-09-08 10:18 UTC (History)
1 user (show)

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


Attachments
Build log (build.log,3.39 KB, text/plain)
2013-02-09 03:39 UTC, nikarul
Details
build.log (build.log,66.80 KB, text/plain)
2013-02-09 18:52 UTC, nikarul
Details
Workaround for ebuild (patch) (libical-0.48.ebuild.patch,258 bytes, patch)
2013-02-12 02:26 UTC, nikarul
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nikarul 2013-02-09 03:39:20 UTC
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
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-09 17:57:23 UTC
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?
Comment 2 nikarul 2013-02-09 18:52:31 UTC
Created attachment 338428 [details]
build.log
Comment 3 nikarul 2013-02-10 01:53:38 UTC
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.
Comment 4 nikarul 2013-02-12 02:26:18 UTC
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.
Comment 5 Vince C. 2015-04-14 16:15:55 UTC
I have the same issue cross-compiling libical (on which bluez depends) for armv7a-hardfloat-linux-gnueabi. Shall I attach my build log, too?
Comment 6 Vince C. 2015-04-20 07:22:35 UTC
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.
Comment 7 Vince C. 2015-09-08 10:15:36 UTC
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.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2015-09-08 10:18:28 UTC
Thanks for the feedback, I guess we can assume it's fixed in libical-1.0.1 then.