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
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
Created attachment 382888 [details] build log
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
Created attachment 382890 [details] emerge info
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.
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!