Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264772 - net-analyzer/net-snmp-5.4.2.1: use of host ld rather than target ld when building
Summary: net-analyzer/net-snmp-5.4.2.1: use of host ld rather than target ld when buil...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Netmon Herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 16:12 UTC by Chris Verges
Modified: 2012-10-04 16:04 UTC (History)
0 users

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


Attachments
Build log (build.log,270.14 KB, text/plain)
2009-04-03 16:13 UTC, Chris Verges
Details
Environment log (environment,128.79 KB, text/plain)
2009-04-03 16:13 UTC, Chris Verges
Details
aclocal log (aclocal-10943.out,583 bytes, text/plain)
2009-04-03 16:14 UTC, Chris Verges
Details
autoconf log (autoconf-10943.out,585 bytes, text/plain)
2009-04-03 16:14 UTC, Chris Verges
Details
autoheader log (autoheader-10943.out,1.28 KB, text/plain)
2009-04-03 16:14 UTC, Chris Verges
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Verges 2009-04-03 16:12:56 UTC
When attempting to cross compile net-analyzer/net-snmp-5.4.2.1 on an x86 host for an arm-unknown-linux-gnu target, the net-snmp build fails due to the x86 ld linker being used rather than the arm ld linked.

Reproducible: Always

Steps to Reproduce:
0. emerge crossdev crossdev-wrappers
1. crossdev --target arm-unknown-linux-gnu
2. emerge-wrappers --init
3. xmerge -av net-snmp
Actual Results:  
make[2]: Entering directory `/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store'
cp default_store.pm ../blib/lib/NetSNMP/default_store.pm
AutoSplitting ../blib/lib/NetSNMP/default_store.pm (../blib/lib/auto/NetSNMP/default_store)
/usr/bin/perl5.8.8 /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -prototypes -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  default_store.xs > default_store.xsc && mv default_store.xsc default_store.c
i486-pc-linux-gnu-gcc -c   -I../../include -pipe -O2 -Ulinux -Dlinux=linux -I. -I/usr/include -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -mtune=i686 -pipe   -DVERSION=\"5.04021\" -DXS_VERSION=\"5.04021\" -fPIC "-I/usr/lib/perl5/5.8.8/i486-linux/CORE"   default_store.c
Running Mkbootstrap for NetSNMP::default_store ()
chmod 644 default_store.bs
rm -f ../blib/arch/auto/NetSNMP/default_store/default_store.so
i486-pc-linux-gnu-gcc  -shared -L/usr/local/lib -L/usr/arm-unknown-linux-gnu/usr/lib -L/usr/arm-unknown-linux-gnu/lib -lrt default_store.o  -o ../blib/arch/auto/NetSNMP/default_store/default_store.so  \
           -L/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store/../../snmplib/.libs -L/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store/../../snmplib -L/usr/arm-unknown-linux-gnu/usr/lib -L/usr/arm-unknown-linux-gnu/lib -lrt -L/usr/lib -lnetsnmp      \

/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.a when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.a when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.a when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/usr/lib/librt.a when searching for -lrt
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store/../../snmplib/.libs/libnetsnmp.so when searching for -lnetsnmp
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: skipping incompatible /usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store/../../snmplib/.libs/libnetsnmp.a when searching for -lnetsnmp
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: cannot find -lnetsnmp
collect2: ld returned 1 exit status
make[2]: *** [../blib/arch/auto/NetSNMP/default_store/default_store.so] Error 1
make[2]: Leaving directory `/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl/default_store'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/work/net-snmp-5.4.2.1/perl'
make: *** [perlmodules] Error 1
 *
 * ERROR: net-analyzer/net-snmp-5.4.2.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3444:  Called die
 * The specific snippet of code:
 *       emake -j1 || die "emake failed";
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/temp/build.log'.
 * The ebuild environment file is located at '/usr/arm-unknown-linux-gnu/tmp/portage/net-analyzer/net-snmp-5.4.2.1/temp/environment'.

Expected Results:  
net-snmp builds successfully
Comment 1 Chris Verges 2009-04-03 16:13:28 UTC
Created attachment 187202 [details]
Build log
Comment 2 Chris Verges 2009-04-03 16:13:45 UTC
Created attachment 187203 [details]
Environment log
Comment 3 Chris Verges 2009-04-03 16:14:04 UTC
Created attachment 187205 [details]
aclocal log
Comment 4 Chris Verges 2009-04-03 16:14:16 UTC
Created attachment 187207 [details]
autoconf log
Comment 5 Chris Verges 2009-04-03 16:14:28 UTC
Created attachment 187209 [details]
autoheader log
Comment 6 Chris Verges 2009-04-03 16:15:59 UTC
I am able to build other packages successfully in my toolchain using the crossdev-wrappers, including php and openssl.
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2009-04-04 17:27:36 UTC
Please post your "emerge --info".
Comment 8 Chris Verges 2009-04-04 17:29:50 UTC
# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-Intel-R-_Xeon-R-_CPU_E5410_@_2.33GHz-with-glibc2.0
Timestamp of tree: Sun, 29 Mar 2009 17:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/terminfo /etc/udev/rules.d"
CTARGET="arm-unknown-linux-gnu"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.arcticnetwork.ca/source/ http://gentoo.llarian.net/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.its.uidaho.edu/pub/gentoo/ http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS





# xmerge --info
Portage 2.1.6.7 (embedded, gcc-4.3.3, unavailable, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-Intel-R-_Xeon-R-_CPU_E5410_@_2.33GHz-with-glibc2.0
Timestamp of tree: Sun, 29 Mar 2009 17:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="arm"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/arm-unknown-linux-gnu/usr/include/ -I/usr/arm-unknown-linux-gnu/include/"
CHOST="arm-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo /etc/udev/rules.d"
CTARGET="arm-unknown-linux-gnu"
CXXFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/arm-unknown-linux-gnu/usr/include/ -I/usr/arm-unknown-linux-gnu/include/"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-L/usr/arm-unknown-linux-gnu/usr/lib -L/usr/arm-unknown-linux-gnu/lib -lrt"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/arm-unknown-linux-gnu/packages/"
PORTAGE_CONFIGROOT="/usr/arm-unknown-linux-gnu/"
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="/usr/arm-unknown-linux-gnu/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="arm bindist kdrive make-symlinks minimal multicall zlib" INPUT_DEVICES="evdev keyboard mouse touchscreen" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev dummy"
Unset:  CPPFLAGS, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 SpanKY gentoo-dev 2010-02-02 16:57:08 UTC
your CFLAGS and LDFLAGS are screwed up ... remove that -I/-L/-l cruft.

probably a bug in the perl build, not really snmp itself.  try USE=-perl.
Comment 10 Chris Verges 2010-02-02 17:02:52 UTC
(In reply to comment #9)
> your CFLAGS and LDFLAGS are screwed up ... remove that -I/-L/-l cruft.
> 
> probably a bug in the perl build, not really snmp itself.  try USE=-perl.

Hi Spanky,

Thanks for your reply.  Due to the various cross compiling problems that we experienced, we eventually moved on to OpenEmbedded and BitBake.  That unfortunately means that I no longer have the build host available to test on.  Hopefully this archived thread will help someone else if they experience the problem.

Again, appreciate the help!

Chris