Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 128480

Summary: Patch for gimp-print-4.2.7's failure to compile with --as-needed
Product: Gentoo Linux Reporter: Mike Auty (RETIRED) <ikelos>
Component: Current packagesAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: minor CC: flameeyes
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: gimp-print-4.2.7-as-needed.patch
gimp-print-4.2.7-as-needed.patch (patches Makefile.am)

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]
gimp-print-4.2.7-as-needed.patch
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 Makefile.in file when iirc gimp-print uses Makefile.am, 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 Makefile.am won't fix the problems without another autotooling.  Since I just wanted something to get it to compile correctly, I manually hacked up the Makefile.in 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 http://www.gentoo.org/proj/en/qa/autofailure.xml .

Usually when you have automake-based projects you should patch Makefile.am rather than Makefile.in. This because if then something else comes that requires to change Makefile.am 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 Makefile.am)

Ok, so this is an almost identical patch, except it applies to Makefile.am rather than Makefile.in.  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...