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

Bug 249359

Summary: dev-libs/pslib: breaks with forced --as-needed
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: TeX project <tex>
Status: RESOLVED FIXED    
Severity: QA CC: printing
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: dev-php5/pecl-ps config.log
Patch to add a check for pow in libm.so to configure.in
Patch to pslib-0.4.1.ebuild to apply pslib-lm.patch and rebuild configure.in

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-30 11:24:42 UTC
I'm reporting this bug because the package in summary breaks when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-30 11:25:44 UTC
Created attachment 173856 [details]
dev-php5/pecl-ps config.log
Comment 2 Kevin Pyle 2009-01-22 03:38:18 UTC
Created attachment 179282 [details, diff]
Patch to add a check for pow in libm.so to configure.in

The root problem appears to be that libps.so calls pow(double, double), but does not link to libm.so.  This patch modifies configure.in to use AC_CHECK_LIB to check for pow in libm.so, and, if found, add -lm to the library line.

There is a stray assignment of -lm to an unused variable in one of the sub-Makefiles, but this configure change is preferred since it correctly handles systems where pow is part of libc.
Comment 3 Kevin Pyle 2009-01-22 03:41:01 UTC
Created attachment 179283 [details, diff]
Patch to pslib-0.4.1.ebuild to apply pslib-lm.patch and rebuild configure.in

Attachment #179282 [details, diff] is the first patch to an autotools file in this ebuild, so the ebuild will need to call eautoreconf to regenerate configure after the patch is applied.  This attachment modifies the ebuild to do so.
Comment 4 Alexis Ballier gentoo-dev 2009-02-08 11:15:56 UTC
fixed in 0.4.1-r1, thanks