After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563806 - reduce unused direct dependencies
reduce unused direct dependencies
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2008-12-09 04:55 UTC by Matthias Clasen
Modified: 2009-06-01 03:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.42 KB, patch)
2008-12-09 04:56 UTC, Matthias Clasen
none Details | Review
additional patch (289 bytes, patch)
2008-12-10 05:13 UTC, Li Yuan
none Details | Review
patch (1.65 KB, patch)
2008-12-12 07:30 UTC, Li Yuan
committed Details | Review
Propagate -L for x11 (376 bytes, patch)
2009-05-28 17:00 UTC, Daniel Macks
accepted-commit_now Details | Review

Description Matthias Clasen 2008-12-09 04:55:34 UTC
ldd reports

[mclasen@matthiasc devel]$ ldd -u -r /usr/lib/libcspi.so.0
Unused direct dependencies:
	
	/usr/lib/libXtst.so.6
	/lib/libgmodule-2.0.so.0
	/lib/libgthread-2.0.so.0
	/lib/librt.so.1
	/usr/lib/libSM.so.6
	/usr/lib/libICE.so.6
	/lib/libpthread.so.0

and similar for libspi and registryd. Here is a patch that reduces this overhead. It doesn't entirely eliminate it.
Comment 1 Matthias Clasen 2008-12-09 04:56:08 UTC
Created attachment 124238 [details] [review]
patch
Comment 2 Li Yuan 2008-12-10 05:13:47 UTC
Created attachment 124321 [details] [review]
additional patch

accerciser can not be started after applying the patch. This patch can fix the problem.
Comment 3 Matthias Clasen 2008-12-10 06:48:26 UTC
That will probably add libSM and libICE back as unused direct deps of libatk-bridge.so.

You probably want to change

        X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"

in configure.in to 
       
        X_LIBS="$X_LIBS -lX11" 

Comment 4 Li Yuan 2008-12-12 07:30:16 UTC
Created attachment 124492 [details] [review]
patch
Comment 5 Daniel Macks 2009-05-28 16:52:22 UTC
Xtst detection is broken by the Comment #4 patch (as released in at-spi-1.26.0), which makes at-spi unbuildable for me (and probably most others with X11 libs installed somewhere other than the standard ld search paths):

config.log reports:

configure:15035: checking for X
configure:15275: result: libraries /usr/X11R6/lib, headers /usr/X11R6/include
[...]
configure:17411: checking for XTestFakeKeyEvent in -lXtst
configure:17446: gcc -o conftest -Os -I/sw/lib/fontconfig2/include -I/sw/include -L/sw/lib/fontconfig2/lib -L/sw/lib conftest.c -lXtst -lX11 -lXext  >&5
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: can't locate file for: -lXtst

and X_LIBS correctly (for me) contains "-L/usr/X11R6/lib -lX11"

The patch removed the line:

	LIBS="$LIBS $X_LIBS"

just prior to the Xtst test, so the -L flag needed to find this x11 component is no longer passed. Maybe configure should distinguish x11ish lib linking -l flags, which can lead to unused dependencies, from lib searching -L flags, which have no harmful effect. After AC_PATH_XTRA, X_LIBS contains -L flags and then configure adds -lX11 to X_LIBS. Easiest solution is to add X_LIBS to LIBS prior to adding -lX11 to X_LIBS. That way all future lib tests get the -L flag, but no additional lib-linking is propagated.
Comment 6 Daniel Macks 2009-05-28 17:00:13 UTC
Created attachment 135503 [details] [review]
Propagate -L for x11