Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 519836

Summary: sys-apps/sandbox-2.6-r1 - wrappers.c:(.text.get_dlsym+0x44): undefined reference to `dlvsym'
Product: Portage Development Reporter: Jacob Martin <foontala>
Component: SandboxAssignee: Sandbox Maintainers <sandbox>
Status: RESOLVED NEEDINFO    
Severity: normal CC: foontala
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
emerge info

Description Jacob Martin 2014-08-13 16:23:42 UTC
Whenever I try to emerge sandbox-2.6-r1, it errors out with undefined references to functions contained in libdl.

.
.
.

*** Warning: Linking the shared library libsandbox.la against the
*** static library ../libsbutil/.libs/libsbutil.a is not portable!
.libs/libsandbox_la-wrappers.o: In function `get_dlsym':
wrappers.c:(.text.get_dlsym+0x44): undefined reference to `dlvsym'
wrappers.c:(.text.get_dlsym+0x69): undefined reference to `dlopen'
wrappers.c:(.text.get_dlsym+0x90): undefined reference to `dlsym'
wrappers.c:(.text.get_dlsym+0xbd): undefined reference to `dlerror'
wrappers.c:(.text.get_dlsym+0xfc): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
make[2]: *** [libsandbox.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
.
.
.

I do have libdl on my system, and the configure step of the emerge shows that some of these functions are indeed found:

.
.
.
checking for library containing dlopen... checking for stackoverflow_install_handler in -lsigsegv... (cached) false
checking for __sync_lock_test_and_set... none required
checking for dlvsym... yes
checking for va_copy... va_copy
checking for library containing dlopen... yes
checking truncate argument type... off_t
checking for RTLD_NEXT... none required
checking for dlvsym... yes
.
.
.


I have tried recompiling glibc (currently have [2.17:2.2]), but that didn't work.

Is this a bug or have I somehow messed up something?  This is a very old gentoo system which I have been upgrading over many years, so perhaps there was some problem.

Reproducible: Always

Steps to Reproduce:
emerge sandbox
Actual Results:  
didn't compile

Expected Results:  
compile
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-13 23:02:25 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Jacob Martin 2014-08-14 13:27:06 UTC
Created attachment 382888 [details]
build log
Comment 3 Jacob Martin 2014-08-14 13:27:52 UTC
Sorry, rookie mistake.  The build logs for sandbox are attached for after emerging the newest version of glibc:

sys-libs/glibc-2.19-r1:2.2
Comment 4 Jacob Martin 2014-08-14 13:28:36 UTC
Created attachment 382890 [details]
emerge info
Comment 5 SpanKY gentoo-dev 2014-08-20 15:37:35 UTC
your compiler settings are terrible and plain broken (-l flags should never be in there).  please reset to sane values (like -O2 -pipe) and retry building.
Comment 6 Jacob Martin 2014-09-04 13:21:37 UTC
Thanks for sharing your expertise, with -O2 -pipe, it works like a charm!

Apparently one of the flags messes things up quite a bit, but I'm not sure which one.  Feel free to close the bug. 

Thank you again!