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 464567 - Bad -L usage
Bad -L usage
Status: RESOLVED FIXED
Product: passepartout
Classification: Deprecated
Component: Default
0.7.x
Other Mac OS
: Normal normal
: ---
Assigned To: passepartout-maint
passepartout-maint
Depends on:
Blocks:
 
 
Reported: 2007-08-08 03:56 UTC by Daniel Macks
Modified: 2009-04-30 09:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Direct paths instead of -l and local -L (1.72 KB, patch)
2007-08-08 04:43 UTC, Daniel Macks
none Details | Review
libtoolize the whole project (9.03 KB, patch)
2007-08-09 03:52 UTC, Daniel Macks
none Details | Review
fully libtoolize (11.08 KB, patch)
2007-08-10 23:48 UTC, Daniel Macks
none Details | Review

Description Daniel Macks 2007-08-08 03:56:09 UTC
Similar to Bug #464517, there are local -L being passed after global ones, so installed libraries can interfere. There's a general solution for this one, which is to pass explicit paths to the libraries instead of passing -l and relying on the -L ordering. And it's even easier than that...by using libtool convenience libs instead of .a libs, you get automatic dependency tracking when you link.
Comment 1 Daniel Macks 2007-08-08 04:14:14 UTC
Looks like there might be a bit of hackery in getting C++ convenience libs linked correctly, but anyway at least you can use parallel constructs for _DEPENDENCIES and _LDADD (I see there are some places where .a are linked but are not listed as dependencies, which can be a problem for parallel-build systems).
Comment 2 Daniel Macks 2007-08-08 04:43:10 UTC
Created attachment 93258 [details] [review]
Direct paths instead of -l and local -L
Comment 3 Sven Herzberg 2007-08-08 22:06:48 UTC
Your point is good. Though I think, we should target the problem at a larger level. In my opinion we should just start using libtool to create the libraries, libtool produces nice linker scripts (the .la files) for the created libraries, so we don't have to worry about anything.

Regarding the parallel build issue: that's a completely different thing. Please read this: http://miller.emu.id.au/pmiller/books/rmch/

I only build new projects in a non-recursive way since I read that document.
Comment 4 Daniel Macks 2007-08-09 03:52:38 UTC
Created attachment 93332 [details] [review]
libtoolize the whole project

Alright, bullet is bitten, passepartout is switched to libtool (patch against SVN trunk). More flag simplification will be coming tonite/tomorrow...
Comment 5 Daniel Macks 2007-08-10 23:48:22 UTC
Created attachment 93462 [details] [review]
fully libtoolize

With few exceptions (documented internally) all libs link to the other libs that supply symbols that they use, rather than linking each as a stand-alone with undefined symbols and then relying on the binary to link against them all. I had to do some shuffling of the build order so that libs build before things try to link against them and to avoid some circular build-order messes (maybe there's a way to force this with _LIBADD paths instead of relying on SUBDIRS ordering)? I also removed -I for src/ because it is included automatically by automake (it's the dir containing the autoconf .h file).
Comment 6 Sven Herzberg 2009-04-29 08:27:17 UTC
(In reply to comment #5)
> I also removed -I for src/ because it is included automatically by
> automake (it's the dir containing the autoconf .h file).

In the situation "builddir != srcdir", you'll run into issues. We need $(top_srcdir)/src in the include path, automake will add $(top_builddir)/src for defines.h. So we have to stick with both.

I'll split the patch into several parts and commit them today.
Comment 7 Sven Herzberg 2009-04-30 09:53:50 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

I decided to split up the patch (and do some things differently), but in the end, everything should be fine now.