Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432116 - net-analyzer/traceroute-2.0.18 when cross-compiling - ld: cannot find -lsupp
Summary: net-analyzer/traceroute-2.0.18 when cross-compiling - ld: cannot find -lsupp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-20 19:45 UTC by Dennis Schridde
Modified: 2016-02-19 01:59 UTC (History)
0 users

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


Attachments
build.log (build.log,4.55 KB, text/plain)
2012-08-20 19:46 UTC, Dennis Schridde
Details
Add -L../libsupp to LDFLAGS (traceroute-2.0.18-cross-compile.patch,1.00 KB, patch)
2012-08-21 15:39 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2012-08-20 19:45:27 UTC
powerpc64-unknown-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o traceroute mod-icmp.o time.o mod-tcpconn.o mod-raw.o poll.o extension.o csum.o mod-udp.o module.o traceroute.o as_lookups.o random.o mod-tcp.o  -lsupp -lm
/usr/libexec/gcc/powerpc64-unknown-linux-gnu/ld: cannot find -lsupp

libsupp.a was built just a few lines earlier — probably it should be ./libsupp.a instead of -lsupp.

Reproducible: Always




ROOT=/usr/powerpc64-unknown-linux-gnu:
Portage 2.2.0_alpha121 (default/linux/powerpc/ppc64/10.0/64bit-userland, gcc-4.6.3, glibc-2.15-r2, 2.6.18-308.11.1.el5 x86_64)
=================================================================
System uname: Linux-2.6.18-308.11.1.el5-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2352-with-gentoo-2.1
Timestamp of tree: Mon, 20 Aug 2012 11:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo local sunrise
ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -mcpu=cell -mabi=altivec"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O2 -mcpu=cell -mabi=altivec"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg --binpkg-respect-use --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-war
n unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
PKGDIR="/usr/powerpc64-unknown-linux-gnu/packages/"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/usr/powerpc64-unknown-linux-gnu/"
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="/var/tmp/portage-powerpc64-unknown-linux-gnu"
PORTDIR="/var/cache/portage/gentoo"
PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/sunrise"
[...]
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

ROOT=/:
Portage 2.2.0_alpha121 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.15-r2, 2.6.18-308.11.1.el5 x86_64)
=================================================================
System uname: Linux-2.6.18-308.11.1.el5-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2352-with-gentoo-2.1
Timestamp of tree: Mon, 20 Aug 2012 11:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo local sunrise
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=opteron-sse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O2 -march=opteron-sse3"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg --binpkg-respect-use --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-war
n unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfil
es.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
PORTDIR="/var/cache/portage/gentoo"
PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/sunrise"
[...]
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Dennis Schridde 2012-08-20 19:46:02 UTC
Created attachment 321798 [details]
build.log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-21 13:17:49 UTC
(In reply to comment #0)
> libsupp.a was built just a few lines earlier — probably it should be
> ./libsupp.a instead of -lsupp.

That should work regardless, and I see you have parallel make switched off, too.
Comment 3 Dennis Schridde 2012-08-21 13:45:27 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > libsupp.a was built just a few lines earlier — probably it should be
> > ./libsupp.a instead of -lsupp.
> That should work regardless
But then it would need -L., not?
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-21 13:52:19 UTC
Are you cross-compiling?
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-21 13:58:25 UTC
oops
Comment 6 Dennis Schridde 2012-08-21 14:43:08 UTC
(In reply to comment #4)
> Are you cross-compiling?
Yes, using emerge-wrapper/crossdev.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-21 15:30:44 UTC
PORTAGE_TMPDIR=/tmp \
  ROOT=/tmp/cross-root/ \
  CHOST=hppa2.0-unknown-linux-gnu \
  cross-emerge net-analyzer/traceroute

Ah yes, something like that.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-21 15:39:11 UTC
Created attachment 321876 [details, diff]
Add -L../libsupp to LDFLAGS

append-ldflags -L../libsupp should do it.
Comment 9 Dennis Schridde 2012-08-22 07:39:17 UTC
(In reply to comment #8)
> Created attachment 321876 [details, diff] [details, diff]
> Add -L../libsupp to LDFLAGS
> 
> append-ldflags -L../libsupp should do it.
It appears they try to do the same by setting LIBRARY_PATH in Make.rules:133

Maybe it would be possible to write a fix that upstream could accept by just patching out that ifneq $(gcc) test and reversing the order of -L and -l, i.e. so that the -L directives are added before $(_libs)?
Comment 10 SpanKY gentoo-dev 2016-02-19 01:59:10 UTC
e-mailed upstream and added the workaround:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a12c3e8288dfe7fb84e7d63b008a6b74770f655e