I'm reporting this bug because the package in summary fails to build 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
Created attachment 244509 [details] Build log
gcc -o lvmrun -lm -ldl core/main.o core/stats.o <another-objects>... core/dynamic.o: In function `dynamic_close': dynamic.c:(.text+0x62): undefined reference to `dlclose' <other dl libs>... primfloat.c:(.text+0x271): undefined reference to `sqrt' core/primfloat.o: In function `fp_pow': <other math functions>... collect2: ld returned 1 exit status make[1]: *** [lvmrun] Error 1 Moving libraries after objects in command line should fix it. I wonder why i can't reproduce it. Does --as-needed force proper link order or it's just a consequence you've got the failure?
> I wonder why i can't reproduce it. Oh nevermind, it really disregards --as-needed.
Forced a--as-needed is sidestepping the fact that the package is ignoring LDFLAGS ;) And yes, --as-needed require proper linking order to be respected.
(In reply to comment #4) > Forced --as-needed is sidestepping the fact that the package is ignoring > LDFLAGS ;) I was confused by faulty assumption helium respecting LDFLAGS. Realized the real problem right after 'Commit' button. Sorry. > And yes, --as-needed require proper linking order to be respected. Hm... Nice feature :] Committed the fix to the tree. Fix forces 'lvmrun' (C program) to respect CFLAGS and LDFLAGS. It will fix the breakage, but will not fix LDFLAGS ignorance for haskell-built binaries (a common problem for all haskell binaries, bug #333217): * QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * /usr/lib/helium/bin/helium * /usr/lib/helium/bin/texthint The haskell and ghc teams still need to work out canonical solution for all haskell built binaries how to deal with external CFLAGS/LDFLAGS Resolving as FIXED. Thank you for the report and explanation, Diego!