[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

-z defs ld flag breaks gnome-settings-daemon



Hi,

I spent my whole week-end performing regression tests to find out what
was preventing the GNOME settings daemon from working properly on the
IA-64 platform (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537572).
It's noteworthy that this problem is still present in current Debian
Testing.

To summarize testing, the problem wasn't due to a code change in the
GNOME settings daemon itself, but to the -z defs flag passed to ld by
the debian/rules script of the gnome-settings-daemon source package.

Starting with gnome-settings-daemon-2.24.1-1, the following line was
added in the debian/rules script:

LDFLAGS += -Wl,-O1 -Wl,-z,defs -Wl,--warn-unresolved-symbols -Wl,--as-needed.

Simply removing -Wl,-z,defs from the debian/rules script of the
current gnome-settings-daemon-2.30.2-2 produces a working binary: no
more CPU eating and everything related to GNOME settings is working
properly back again :-)

>From what I can read in the ld manpage, the -z defs flag is related to
undefined symbols. But my knowledge is too limited to understand
further. Does this mean that, with this -z defs passed to ld,
undefined symbols are removed from the gnome-settings-daemon binary,
breaking something with communicating shared libraries looking for the
removed symbols?

Now, questions are:
- should I file a bug report against ld (in short, are all packages
built with -z defs flag broken, revealing something bad with ld, maybe
limited to the IA-64 platform only)?
- should I send a patch to the gnome-settings-daemon package
maintainer(s) in order to remove the offending flag from the
debian/rules script? I imagine that all architectures will
unfortunately be impacted by this change, so probably not the right
way to fix it
- BTW, is this issue specific to IA-64 and does it reveal something
more serious and not limited to the GNOME settings daemon?

Cheers,

     Émeric


Reply to: