Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128480 - Patch for gimp-print-4.2.7's failure to compile with --as-needed
Summary: Patch for gimp-print-4.2.7's failure to compile with --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Printing Team
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2006-04-02 01:02 UTC by Mike Auty (RETIRED)
Modified: 2006-04-23 03:23 UTC (History)
1 user (show)

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

gimp-print-4.2.7-as-needed.patch (gimp-print-4.2.7-as-needed.patch,844 bytes, patch)
2006-04-02 01:03 UTC, Mike Auty (RETIRED)
Details | Diff
gimp-print-4.2.7-as-needed.patch (patches (gimp-print-4.2.7-as-needed.patch,840 bytes, patch)
2006-04-03 11:31 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2006-04-02 01:02:39 UTC
The libraries at one point in the gimp-print-4.2.7 build script aren't specified in the correct order for using --as-needed, and as such -lm is removed even though it's needed by a library later on.  This patch will fix the problem (a similar patch is already in place for gimp-print-5.0.0_rc2, but gimp itself still requires this version of gimp-print).

Patch to follow.
Comment 1 Mike Auty (RETIRED) gentoo-dev 2006-04-02 01:03:23 UTC
Created attachment 83698 [details, diff]
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-02 05:54:24 UTC
Use latest ~arch, that's already fixed, for now it's not the case to use --as-needed on arch. Also, we have already enough trouble with the need of re-autotooling gimp-print 5 that I don't think it's worth trying to get 4 working, too.
Comment 3 Mike Auty (RETIRED) gentoo-dev 2006-04-02 06:00:37 UTC
I am using the latest ~x86.  That includes gimp-2.2.10, which has a dependency on =gimp-print-4.2*.  I've also supplied the patch, which whilst I can't vouch for others, seems to allow compilation for me.  However, since I've already got this in my local overlay, I'm quite happy for it not to go any further, I'll leave the decision up to you...
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-02 06:09:31 UTC
The problem is that the patch is for a file when iirc gimp-print uses, and that might lead to problems.

Anyway that's up to the printing herd, not to me, I was just suggesting.
Comment 5 Mike Auty (RETIRED) gentoo-dev 2006-04-02 06:14:01 UTC
As far as I can tell, gimp-print-4.2.7 has already had autotools run over it, and the ebuild does not rerun them, so correctly won't fix the problems without another autotooling.  Since I just wanted something to get it to compile correctly, I manually hacked up the to fix it.  Very dirty I agree, but I don't know how to do it any cleaner?  I'm going through my other packages (apr-util with gdbm support, epiphany, gdm, etc) trying to fix them up too, so if there's a nicer way of doing it, do please let me know...

Thanks!  5:)
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-02 06:24:40 UTC
Take a look at .

Usually when you have automake-based projects you should patch rather than This because if then something else comes that requires to change or configure.{in,ac} and then re-runs autotools, the changes to .in are lost.
Also there are cases in which the autotools gets fooled up when you modify the .in but not the .am.
Comment 7 Mike Auty (RETIRED) gentoo-dev 2006-04-02 06:27:44 UTC
Ok, that's great.  Thanks very much for the pointer.  I'll give it a look and hopefully post let dirty hacks to fix up the --as-needed problems I've been encountering!  5:)
Comment 8 Mike Auty (RETIRED) gentoo-dev 2006-04-03 11:31:40 UTC
Created attachment 83825 [details, diff]
gimp-print-4.2.7-as-needed.patch (patches

Ok, so this is an almost identical patch, except it applies to rather than  Don't forget to eautomake somewhere in the ebuild...
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-23 03:17:05 UTC
Gah I'm wasting quite a bit of time to get this working.

I'll do the dirty trick of the year (editing both .am and .in), hoping that it will work.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-23 03:23:42 UTC
Okay committed with double patching, seems to work, I hope so, if it regenerates autotools it will hurt, badly...