Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328289 - dev-libs/libtommath-0.41 does not cross-compile - .libs/bn_error.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status
Summary: dev-libs/libtommath-0.41 does not cross-compile - .libs/bn_error.o: could not...
Status: RESOLVED DUPLICATE of bug 376643
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 18:16 UTC by NickNill
Modified: 2011-07-28 10:03 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NickNill 2010-07-14 18:16:47 UTC
There is a bug in package|ebuild. when i compile it with armv5te-iwmmxt-linux-gnueabi crosscompiler i found that libtool try to use i686 ld, not arm.


Reproducible: Always

Steps to Reproduce:
1. build libtommath with crosscompiler

Actual Results:  
libtool --mode=link --tag=CC armv5te-iwmmxt-linux-gnueabi-gcc  *.lo -o libtommath.la -rpath /usr/lib -version-info 0:41
libtool: link: i686-pc-linux-gnu-gcc -shared  .libs/bncore.o .libs/bn_error.o .libs/bn_fast_mp_invmod.o .libs/bn_fast_mp_montgomery_reduce.o .libs/bn_fast_s_mp_mul_digs.o .libs/bn_fast_s_mp_mul_high_digs.o .libs/bn_fast_s_mp_sqr.o .libs/bn_mp_2expt.o .libs/bn_mp_abs.o .libs/bn_mp_add_d.o .libs/bn_mp_add.o .libs/bn_mp_addmod.o .libs/bn_mp_and.o .libs/bn_mp_clamp.o .libs/bn_mp_clear.o .libs/bn_mp_clear_multi.o .libs/bn_mp_cmp_d.o .libs/bn_mp_cmp.o .libs/bn_mp_cmp_mag.o .libs/bn_mp_cnt_lsb.o .libs/bn_mp_copy.o .libs/bn_mp_count_bits.o .libs/bn_mp_div_2d.o .libs/bn_mp_div_2.o .libs/bn_mp_div_3.o .libs/bn_mp_div_d.o .libs/bn_mp_div.o .libs/bn_mp_dr_is_modulus.o .libs/bn_mp_dr_reduce.o .libs/bn_mp_dr_setup.o .libs/bn_mp_exch.o .libs/bn_mp_expt_d.o .libs/bn_mp_exptmod_fast.o .libs/bn_mp_exptmod.o .libs/bn_mp_exteuclid.o .libs/bn_mp_fread.o .libs/bn_mp_fwrite.o .libs/bn_mp_gcd.o .libs/bn_mp_get_int.o .libs/bn_mp_grow.o .libs/bn_mp_init_copy.o .libs/bn_mp_init.o .libs/bn_mp_init_multi.o .libs/bn_mp_init_set_int.o .libs/bn_mp_init_set.o .libs/bn_mp_init_size.o .libs/bn_mp_invmod.o .libs/bn_mp_invmod_slow.o .libs/bn_mp_is_square.o .libs/bn_mp_jacobi.o .libs/bn_mp_karatsuba_mul.o .libs/bn_mp_karatsuba_sqr.o .libs/bn_mp_lcm.o .libs/bn_mp_lshd.o .libs/bn_mp_mod_2d.o .libs/bn_mp_mod_d.o .libs/bn_mp_mod.o .libs/bn_mp_montgomery_calc_normalization.o .libs/bn_mp_montgomery_reduce.o .libs/bn_mp_montgomery_setup.o .libs/bn_mp_mul_2d.o .libs/bn_mp_mul_2.o .libs/bn_mp_mul_d.o .libs/bn_mp_mul.o .libs/bn_mp_mulmod.o .libs/bn_mp_neg.o .libs/bn_mp_n_root.o .libs/bn_mp_or.o .libs/bn_mp_prime_fermat.o .libs/bn_mp_prime_is_divisible.o .libs/bn_mp_prime_is_prime.o .libs/bn_mp_prime_miller_rabin.o .libs/bn_mp_prime_next_prime.o .libs/bn_mp_prime_rabin_miller_trials.o .libs/bn_mp_prime_random_ex.o .libs/bn_mp_radix_size.o .libs/bn_mp_radix_smap.o .libs/bn_mp_rand.o .libs/bn_mp_read_radix.o .libs/bn_mp_read_signed_bin.o .libs/bn_mp_read_unsigned_bin.o .libs/bn_mp_reduce_2k_l.o .libs/bn_mp_reduce_2k.o .libs/bn_mp_reduce_2k_setup_l.o .libs/bn_mp_reduce_2k_setup.o .libs/bn_mp_reduce_is_2k_l.o .libs/bn_mp_reduce_is_2k.o .libs/bn_mp_reduce.o .libs/bn_mp_reduce_setup.o .libs/bn_mp_rshd.o .libs/bn_mp_set_int.o .libs/bn_mp_set.o .libs/bn_mp_shrink.o .libs/bn_mp_signed_bin_size.o .libs/bn_mp_sqr.o .libs/bn_mp_sqrmod.o .libs/bn_mp_sqrt.o .libs/bn_mp_sub_d.o .libs/bn_mp_sub.o .libs/bn_mp_submod.o .libs/bn_mp_toom_mul.o .libs/bn_mp_toom_sqr.o .libs/bn_mp_toradix.o .libs/bn_mp_toradix_n.o .libs/bn_mp_to_signed_bin.o .libs/bn_mp_to_signed_bin_n.o .libs/bn_mp_to_unsigned_bin.o .libs/bn_mp_to_unsigned_bin_n.o .libs/bn_mp_unsigned_bin_size.o .libs/bn_mp_xor.o .libs/bn_mp_zero.o .libs/bn_prime_tab.o .libs/bn_reverse.o .libs/bn_s_mp_add.o .libs/bn_s_mp_exptmod.o .libs/bn_s_mp_mul_digs.o .libs/bn_s_mp_mul_high_digs.o .libs/bn_s_mp_sqr.o .libs/bn_s_mp_sub.o      -Wl,-soname -Wl,libtommath.so.0 -o .libs/libtommath.so.0.0.41
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: .libs/bn_error.o: Relocations in generic ELF (EM: 40)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: .libs/bn_error.o: Relocations in generic ELF (EM: 40)
.libs/bn_error.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [libtommath.la] Ошибка 1
 * ERROR: dev-libs/libtommath-0.41 failed:
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 2226:  Called die
 * The specific snippet of code:
 *       emake CC=$(tc-getCC) -f makefile.shared IGNORE_SPEED=1 LIBPATH="${EPREFIX}/usr/$(get_libdir)" || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-libs/libtommath-0.41',
 * the complete build log and the output of 'emerge -pqv =dev-libs/libtommath-0.41'.
 * The complete build log is located at '/var/tmp/portage/dev-libs/libtommath-0.41/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libtommath-0.41/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/libtommath-0.41/work/libtommath-0.41'

>>> Failed to emerge dev-libs/libtommath-0.41 for /usr/armv5te-iwmmxt-linux-gnueabi/, Log file:

>>>  '/var/tmp/portage/dev-libs/libtommath-0.41/temp/build.log'



Portage 2.1.8.3 (embedded, gcc-4.4.4, unavailable, 2.6.34-ARCH i686)
=================================================================
System uname: Linux-2.6.34-ARCH-i686-Intel-R-_Celeron-R-_D_CPU_3.06GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 14 Jul 2010 16:30:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.4-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe -mtune=iwmmxt -mcpu=xscale"
CHOST="armv5te-iwmmxt-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d"
CXXFLAGS="-Os -pipe -mtune=iwmxt -mcpu=xscale"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS=""
LINGUAS="en ru"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/usr/armv5te-iwmmxt-linux-gnueabi/"
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://rsync.gentoo.org/gentoo-portage"
USE="kdrive minimal mktemp modules multicall nls pam ssh zlib" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="fbdev" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Johannes Krude 2010-07-19 09:08:06 UTC
The same if crosscompiling for mipsel-softfloat-linux-uclibc

Portage 2.1.8.3 (uclibc/mips, gcc-4.4.4, uclibc-0.9.30.1-r1, 2.6.32-tuxonice-dax x86_64)
=================================================================
System uname: Linux-2.6.32-tuxonice-dax-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 17 Jul 2010 17:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r2, 3.1.1-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6-r1, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc:       4.3.1, 4.4.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="mips ~mips"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=mips32"
CHOST="mipsel-softfloat-linux-uclibc"
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/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=mips32"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests autoconfig buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en mn"
MAKEOPTS="-j1"
PKGDIR="/usr/mipsel-softfloat-linux-uclibc/packages"
PORTAGE_CONFIGROOT="/usr/mipsel-softfloat-linux-uclibc/"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="bash-completion cli cracklib crypt cxx dri ipv6 kdrive mips modules mudflap ncurses openmp otr pcre readline reflection session spell spl tcpd uclibc unicode zlib" 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 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" ELIBC="uclibc" INPUT_DEVICES="keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en mn" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="dummy fbdev 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 2 Andrey Batyiev 2010-08-09 14:14:48 UTC
i think this is libtool issue and filled bug #331489
Comment 3 Ryan Hope 2010-12-09 16:44:09 UTC
I am getting this too with an arm toolchain
Comment 4 Tim Harder gentoo-dev 2011-06-10 01:03:59 UTC
Is this still an issue with the latest libtool and libtommath versions in the tree (I just added 0.42.0 to CVS).
Comment 5 Pacho Ramos gentoo-dev 2011-07-28 10:03:26 UTC
bug 376643 contains a fix

*** This bug has been marked as a duplicate of bug 376643 ***