Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 364003 - sys-devel/crossdev: some vars are setup with invalid -L/-I paths
Summary: sys-devel/crossdev: some vars are setup with invalid -L/-I paths
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
: 481104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-18 09:32 UTC by Joerg Faschingbauer
Modified: 2014-10-26 04:16 UTC (History)
2 users (show)

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


Attachments
ebuild log file (sys-apps:iproute2-2.6.37:20110418-090641.log,44.10 KB, text/plain)
2011-04-18 09:37 UTC, Joerg Faschingbauer
Details
Patch against toplevel Makefile (iproute2-2.6.37-cross-build-libutil-conflict.patch,409 bytes, patch)
2011-04-18 09:39 UTC, Joerg Faschingbauer
Details | Diff
ebuild 2.6.37-r1 to apply the patch (iproute2-2.6.37-r1.ebuild,2.76 KB, text/plain)
2011-04-18 09:40 UTC, Joerg Faschingbauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Faschingbauer 2011-04-18 09:32:56 UTC
(This sounds like #347489, it's just that there the user had put -L... in make.conf.)

The emerge wrapper script appears to initialize the package's LDLIBS with "-L/usr/armv5te-unknown-linux-gnueabi/lib -L/usr/armv5te-unknown-linux-gnueabi/usr/lib". (There's glibc's libutil in /lib.) The package has an internal library (archive) of the same name libutil.a in its lib subdirectory. That library is *appended* to LDLIBS by the package. It is never found by the linker though, of course, leading to unresolved symbols,

ss.c:(.text+0xaf4): undefined reference to `__get_user_hz'
... many more ...

Reproducible: Always

Steps to Reproduce:
crossdev --target armv5te-unknown-linux-gnueabi
export CHOST=armv5te-unknown-linux-gnueabi
export ROOT=/usr/armv5te-unknown-linux-gnueabi
export PORTAGE_CONFIGROOT=/usr/armv5te-unknown-linux-gnueabi
emerge-wrapper --init
# merge a couple of packages, don't remember exactly
armv5te-unknown-linux-gnueabi-emerge sys-apps/iproute2

Actual Results:  
armv5te-unknown-linux-gnueabi-gcc -L/usr/armv5te-unknown-linux-gnueabi/lib -L/usr/armv5te-unknown-linux-gnueabi/usr/lib  ss.o ssfilter.o  -lresolv -L../lib -lnetlink -lutil -o ss
ss.o: In function `get_user_hz':
ss.c:(.text+0xaf4): undefined reference to `__get_user_hz'
ss.c:(.text+0xb08): undefined reference to `__iproute2_user_hz_internal'
ss.o: In function `resolve_service':
ss.c:(.text+0x1514): undefined reference to `inet_proto_n2a'
ss.o: In function `formatted_print':
ss.c:(.text+0x166c): undefined reference to `format_host'
ss.c:(.text+0x168c): undefined reference to `format_host'
ss.o: In function `inet2_addr_match':
ss.c:(.text+0x1718): undefined reference to `inet_addr_match'
ss.c:(.text+0x1794): undefined reference to `inet_addr_match'
ss.o: In function `parse_hostcond':
ss.c:(.text+0x2ebc): undefined reference to `get_integer'
ss.c:(.text+0x2f20): undefined reference to `ll_proto_a2n'
ss.c:(.text+0x2fcc): undefined reference to `get_integer'
ss.c:(.text+0x3024): undefined reference to `get_u32'
ss.c:(.text+0x3158): undefined reference to `get_integer'
ss.c:(.text+0x3300): undefined reference to `get_prefix_1'
ss.o: In function `packet_show':
ss.c:(.text+0x3cb4): undefined reference to `ll_proto_n2a'
ss.o: In function `main':
ss.c:(.text+0x4fe4): undefined reference to `incomplete_command'
collect2: ld returned 1 exit status


Expected Results:  
Clean build

(log, info, and patch attached)
Comment 1 Joerg Faschingbauer 2011-04-18 09:33:57 UTC
Portage 2.1.9.42 (embedded, gcc-4.5.2, glibc-2.13-r2, 2.6.36-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r8-x86_64-Intel-R-_Core-TM-_i5_CPU_M_430_@_2.27GHz-with-gentoo-1.12.14
Timestamp of tree: Sun, 17 Apr 2011 10:30:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
virtual/os-headers:  0
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/armv5te-unknown-linux-gnueabi/usr/include/ -I/usr/armv5te-unknown-linux-gnueabi/include/"
CHOST="armv5te-unknown-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/armv5te-unknown-linux-gnueabi/usr/include/ -I/usr/armv5te-unknown-linux-gnueabi/include/"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ rsync://gd.tuwien.ac.at/opsys/linux/gentoo/"
LDFLAGS="-L/usr/armv5te-unknown-linux-gnueabi/lib -L/usr/armv5te-unknown-linux-gnueabi/usr/lib"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/armv5te-unknown-linux-gnueabi/packages/"
PORTAGE_CONFIGROOT="/usr/armv5te-unknown-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="/usr/armv5te-unknown-linux-gnueabi/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="arm bindist kdrive make-symlinks minimal modules multicall 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
Comment 2 Joerg Faschingbauer 2011-04-18 09:35:24 UTC
ebuild is sys-apps/iproute2-2.6.37. applies to sys-apps/iproute2-2.6.35-r2 likewise.
Comment 3 Joerg Faschingbauer 2011-04-18 09:37:12 UTC
Created attachment 270355 [details]
ebuild log file
Comment 4 Joerg Faschingbauer 2011-04-18 09:39:27 UTC
Created attachment 270357 [details, diff]
Patch against toplevel Makefile

rather than adding internal static libraries with -L and their basenames, add them by their file names.
Comment 5 Joerg Faschingbauer 2011-04-18 09:40:16 UTC
Created attachment 270359 [details]
ebuild 2.6.37-r1 to apply the patch
Comment 6 SpanKY gentoo-dev 2011-04-18 15:02:00 UTC
there should be no sysroot -L/-I paths in any crossdev wrappers
Comment 8 SpanKY gentoo-dev 2014-10-26 03:22:12 UTC
*** Bug 481104 has been marked as a duplicate of this bug. ***
Comment 9 Luke-Jr 2014-10-26 04:16:58 UTC
(In reply to SpanKY from comment #7)
> http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commitdiff;
> h=af354f0cb593a818d203580e94d098ab3c0657e9

You do realise git.overlays.gentoo.org has been down for months, right?
Is there another source to see this commit?