Summary: | [patch for dbus-1.4.x branch] Move $(DBUS_TEST_LIBS) as first in Makefile.am for -Wl,--as-needed compability | ||
---|---|---|---|
Product: | dbus | Reporter: | Samuli Suominen <ssuominen> |
Component: | core | Assignee: | Thiago Macieira <thiago> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop-bugs, reavertm, xake |
Version: | 1.4.x | Keywords: | NEEDINFO, patch |
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Fix issue
git 0001-Fix-ordering-and-missing-DBUS_TEST_LIBS-for-LDFLAGS-.patch Fix building of test suite with -Wl,--as-needed |
Description
Samuli Suominen
2009-08-05 10:39:59 UTC
Patch looks good. Could you make this a Git commit, please? Created attachment 28383 [details] [review] git I take it you meant this? I'm not that familiar with git since none of the projects i'm involved use it yet heh :-) Yes, that's what I meant. A patch like this allows us to keep the attribution to you. I'll apply it. But if you happen to see this email before I do, can you make the commit message more suitable? The first line in the commit subject, then you have a longer body explaining the change. Created attachment 28390 [details] [review] 0001-Fix-ordering-and-missing-DBUS_TEST_LIBS-for-LDFLAGS-.patch Was this ever commited? No, sorry. Need to run the tests to confirm this is ok. (In reply to comment #6) > Need to run the tests to confirm this is ok. It's been applied in Gentoo's Portage since I've posted it here, and there has been no bug reports about failing tests since... If that counts for anything :) Created attachment 38786 [details] [review] Fix building of test suite with -Wl,--as-needed Still a problem in released 1.4.0, fails test suite with our default LDFLAGS which include -Wl,--as-needed Maciej Mrozowski <reavertm@gentoo.org> forwardported the patch from 1.3.0 to 1.4.0 Sorry but ping, 1.4.1 got released and it's still failing to build. The patch here still applies. On Debian unstable with gcc 4.4.5-10, ld 2.20.1-system.20100303 and libtool 2.2.6b-2, both of these configurations seem to work fine: ./configure --enable-maintainer-mode LDFLAGS=-Wl,--as-needed ./configure --enable-maintainer-mode LDFLAGS=-Wl,--as-needed,--no-add-needed The link line you pasted comes out like: libtool: link: gcc -g -O2 -Werror -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -fno-common -Wno-unused -Wno-sign-compare -Wno-pointer-sign -fno-strict-aliasing -Wl,--as-needed -o dbus-test dbus-test-main.o -Wl,--export-dynamic ./.libs/libdbus-internal.a -lpthread -lrt and libdbus-internal.la correctly contains: # Libraries that this one depends upon. dependency_libs=' -lpthread -lrt' What do you get in dependency_libs on Gentoo? libtool is meant to sort this out automatically when there are .la files present. (In reply to comment #10) > On Debian unstable with gcc 4.4.5-10, ld 2.20.1-system.20100303 and libtool > 2.2.6b-2, both of these configurations seem to work fine: > ./configure --enable-maintainer-mode LDFLAGS=-Wl,--as-needed > ./configure --enable-maintainer-mode LDFLAGS=-Wl,--as-needed,--no-add-needed It might work outside of Debian's and Gentoo's package manager because by default, upstream libtool is ignoring -Wl,--as-needed: http://bugs.debian.org/347650 http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/ELT-patches/as-needed/2.2.6?revision=1.1&view=markup You'd need to run this with Debian patch to libtool's ltmain.sh, or from inside Gentoo's Portage to get properly patched libtool to not ignore asneeded... still fails with 1.4.6 Some test results from today: This patch is not required anymore for dbus-1.5.12 and git. The Makefile.am's no longer have the problematic DBUS_TEST_LIBS at all, hence the problem is gone as well. So, this patch is only required for dbus-1.4 branch. (In reply to comment #13) > Some test results from today: > > This patch is not required anymore for dbus-1.5.12 and git. Thanks for re-testing. I'm going to release a new-stable dbus-1.6 branch shortly (1.5.x fixes some threading bugs in a way that's too intrusive for 1.4), at which point I'll stop caring about minor issues in 1.4, so I'm going to consider this fixed. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.