Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226927 - sys-libs/libkudzu: append-ldflags is used to pass libraries
Summary: sys-libs/libkudzu: append-ldflags is used to pass libraries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: append-ldflags-libs
  Show dependency tree
 
Reported: 2008-06-14 18:26 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2008-10-31 16:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-14 18:26:06 UTC
I've made append-ldflags throw a warning when libraries are passed through it
to link them in.

The reason is that LDFLAGS should _not_ be used for libraries, as it has to be
positioned before the list of objects to link together, while libraries should
go after.

This mistake in commandline is what causes as-needed to either fail or not
apply at all (if LDFLAGS are put at the end).

Please fix your package not to pass libraries through LDFLAGS.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-02 22:13:59 UTC
A possible solution, though I didn't test it yet (what requires libkudzu?).

Index: libkudzu-1.2.57.1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libkudzu/libkudzu-1.2.57.1.ebuild,v
retrieving revision 1.10
diff -u -B -r1.10 libkudzu-1.2.57.1.ebuild
--- libkudzu-1.2.57.1.ebuild    29 Feb 2008 01:34:03 -0000      1.10
+++ libkudzu-1.2.57.1.ebuild    2 Sep 2008 22:10:37 -0000
@@ -33,7 +33,7 @@
 src_compile() {
        if use zlib
        then
-               append-ldflags -lz
+               perl -pi -e 's| -lpci| -lz -lpci|g' Makefile
        elif built_with_use --missing false sys-apps/pciutils zlib
        then
                die "You need to build with USE=zlib to match sys-apps/pcituils"
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-09-02 22:40:52 UTC
I think hwsetup uses it. Also, use sed for that kind of thing instead of perl:

sed -i 's| -lpci| -lz -lpci|g' Makefile
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-02 22:44:49 UTC
(In reply to comment #2)
> I think hwsetup uses it. Also, use sed for that kind of thing instead of perl:
> 
> sed -i 's| -lpci| -lz -lpci|g' Makefile

There is another use of perl instead of said in the very same ebuild, so I assumed that was intended to assure independence from sed.

I posted a similar patch to the related hwsetup bug #226923.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-31 16:17:12 UTC
I've committed my patch anyway. If Diego ever files a QA bug report for using perl instead of sed, we'll know what to do. :)