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 560073 - Poor linking against convenience libs
Poor linking against convenience libs
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.24.x
Other Mac OS
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-09 21:32 UTC by Daniel Macks
Modified: 2008-12-05 12:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
link to local libs by explicit name (1.71 KB, patch)
2008-11-09 21:35 UTC, Daniel Macks
committed Details | Review

Description Daniel Macks 2008-11-09 21:32:05 UTC
Kinda risky to link against local convenience libs via -l and -L paths. If the lib doesn't get built first, linker crashes without providing useful info to user. And you're also at risk of not getting the -L order perfect, allowing "some other libFOO" to be found instead of the one from the immediately adjacent -L path. Better (and documentedly correct) to link directly to the lib by pathname instead.
Comment 1 Daniel Macks 2008-11-09 21:35:41 UTC
Created attachment 122286 [details] [review]
link to local libs by explicit name

Why is jpegutils/libeog-jpegutils.a built explicitly as a simple static lib instead of a libtool convenience library (the way libtoolbareditor is, for example)?
Comment 2 Daniel Macks 2008-11-09 21:39:46 UTC
As a bonus, I *think* specifying explicit pathnames sets the DEPENDENCIES automatically instead of requiring separate and explicit Makefile.am variables.
Comment 3 Felix Riemann 2008-12-05 11:53:10 UTC
(In reply to comment #1)
> Why is jpegutils/libeog-jpegutils.a built explicitly as a simple static lib
> instead of a libtool convenience library (the way libtoolbareditor is, for
> example)?
> 

This is a left-over from pre-eog-2.20 times which was not updated. Will check converting this over as well.
Comment 4 Felix Riemann 2008-12-05 12:39:30 UTC
(In reply to comment #2)
> As a bonus, I *think* specifying explicit pathnames sets the DEPENDENCIES
> automatically instead of requiring separate and explicit Makefile.am variables.
> 

Yup, you're right. After removing the DEPENDENCIES var from Makefile.am automake automatically used the _LIB vars. I've updated your patch (Thanks!) to take that into account for the trunk-based commit. The commit to stable is unchanged.

2008-12-05  Felix Riemann  <>

	* jpegutils/Makefile.am: Produce .la-file as well.
	* doc/reference/Makefile.am:
	* src/Makefile.am:
	Link to local convenience libs directly instead of using a
	library	search path to avoid linking to wrong libs. Let automake
	calculate the dependencies list. Remove now unneeded vars.
	Fixes bug #560073 (Daniel Macks, Felix Riemann).
-------------------------------------------------------------------------------
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.