Summary: | dev-libs/glib-1.2.10-r5: libraries to link to should not be passed through LDFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
Component: | New packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | QA | CC: | esigra, hardened |
Priority: | High | Keywords: | NeedPatch |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 226863 |
Description
Pacho Ramos
2009-02-07 10:06:27 UTC
as glib-1 is legacy, I hope you have a patch if you want this bug fixed. No, I don't, sorry :-( Are you sure that appending -ldl is needed? Well, I cannot check with *bsd but, at least, on amd64, it seems to build ok commenting the line. Anyway, feel free to close this if cannot be easily fixed I didn't say it's hard to fix (it's often easy to fix). Hopefully someone in team will find the time to fix this. I think that adding ‘-ldl’ is not necessary. See the following command and its output: # grep -rE '(dlerror|dlsym|dlclose|dlopen)' . | grep -vE '^\./(ltconfig|configure|ltmain\.sh|aclocal\.m4|ChangeLog|NEWS|configure\.in|gmodule/ChangeLog):' | cut -d : -f 1 | uniq ./gmodule/gmodule-dl.c Dynamic loading is only used in gmodule/gmodule-dl.c. When this file is linked, ‘-ldl’ (or ‘-ldld’ or so) is added to the linker flags (via G_MODULE_LIBS and libgmodule_la_LIBADD). See configure.in and gmodule/Makefile.am for details. /If/ ‘-ldl’ is needed, /but not/ added automagically, this is a bug in the detection of the necessary libraries for dynamic loading. Such a bug should be fixed in configure.in, and G_MODULE_LIBS should be set properly there. Please comment out the ‘-ldl’ line in the ebuild and test whether the package still compiles. If it does not, the detection code must be fixed in configure.in. You may want to have a look at LT_LIB_DLLOAD from libtool (in /usr/share/aclocal/ltdl.m4), which has some code that may be of interest. If glib did not have its own code to check for the necessary libraries, I would have inserted the libtool macro (but other code may need to be changed a bit). May be worth evaluation /if/ some system requires configure.in to be changed. I’m on x86, by the way. Maybe we could simply drop "-ldl" then :-/ Looks like this was added long time ago for hardened: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/glib/glib-1.2.10-r5.ebuild?r1=1.39&r2=1.40 , not sure the reasons (if still needed) Maybe it was because it gave issues with the bind_now ld flag (probably because of unused references to symbols in the library that would otherwise leave a broken ELF). Please make sure there are no references to any symbols in libdl in the final library before removing the flag. Since I don't have much knowledge about this, will wait for other team member opinion before touching anything (other option would probably append that flag only with USE "hardened") - append-ldflags $(dlopen_lib) + sed -i "/libglib_la_LDFLAGS/i libglib_la_LIBADD = $(dlopen_lib)" Makefile.am || die (from bug 467086) done in -r6 |