Summary: | media-gfx/pngnq-1.0: fails with forced --as-needed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Hanno Böck <hanno> |
Status: | RESOLVED FIXED | ||
Severity: | QA | CC: | xarthisius |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://www.gentoo.org/proj/en/qa/asneeded.xml | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 129413 | ||
Attachments: |
Build log
adding patch to ebuild and running autotools fixing as-needed issues fixing as-needed issues |
Description
Diego Elio Pettenò (RETIRED)
2010-01-14 16:13:22 UTC
Created attachment 216510 [details]
Build log
Created attachment 216517 [details, diff]
adding patch to ebuild and running autotools
Created attachment 216518 [details, diff]
fixing as-needed issues
Thanks for your patch, though some questions, I don't understand all of it: -SUBDIRS = freegetopt src +SUBDIRS = src What's that supposed to do? Does it have to do anything with --as-needed? +AC_SEARCH_LIBS([gzopen],[z]) +AC_SEARCH_LIBS([pow],[m]) Same for this. Also, did you send your patch to the upstream developers? (In reply to comment #4) > -SUBDIRS = freegetopt src > +SUBDIRS = src Freegetopt dir is empty so it's not necessary. However if it wasn't it would bundle lib that is provided by core system packages. We should always use system-wide libraries in favour of bundled ones in order to prevent security issues. I've removed it from build system as a preemptive measure. > +AC_SEARCH_LIBS([gzopen],[z]) -lz was needlessly hardcoded in Makefile.am and in wrong place apart from that: rwpng.c:(.text+0xbe4): undefined reference to `zlibVersion' Maybe it would be better to change it to AC_SEARCH_LIBS([zlibVersion],[z]) instead of gzopen > +AC_SEARCH_LIBS([pow],[m]) pngcomp.c:(.text+0x251): undefined reference to `sqrt' AC_SEARCH_LIBS appends libs to LIBS variable, which is used in correct order during linking. That automatically fixes most as-needed issues. > Also, did you send your patch to the upstream developers? No, I didn't. The change to src/Makefile.am drops -Wall, --pedantic, and -std=gnu99. I can understand dropping -Wall, since most Gentoo users will not be reading the warnings. Did you intend to drop -std=gnu99 though? In gcc 4.3, the default is gnu89, with the note that it will be changed to gnu99 in a future release. Created attachment 216695 [details, diff] fixing as-needed issues (In reply to comment #6) > The change to src/Makefile.am drops -Wall, --pedantic, and -std=gnu99. Clearly that was my mistake. I thought that those flags are not necessary, which may not always be the case. Thanks for pointing that out. I've also corrected SEARCH_LIBS to look for func actually used by package instead of random ones. committed and sent upstream, thanks. |