app-misc/cwiid-0.6.00_rc3 fails to build with --as-needed
Status: Abandoned
Brought to you by:
willy_wolff
app-misc/cwiid-0.6.00_rc3 from pd-overlay fails to build due to incorrect linking order, when we have "-Wl,--as-needed" in our LDFLAGS. The solution is quite simple, and is based on:
http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap2_sect6
See the attached patch.
fix-lib-link-order.patch
cwiid-0.6.00_rc3.ebuild
ebuild_changes.patch
Additionally, the ebuild didn't have src_install(), so nothing was being installed.
I've fixed that, and I've just attached the fixed ebuild (that works for me).
Also attached the diff between the current and the fixed ebuild.
I have applied your change. But are you sure for the patch?
The patch works for me. It just changes the order of the parameters, and thus fixes a linking error at the linking stage. If you wanna reproduce the issue, just add "-Wl,--as-needed" to your LDFLAGS and try compiling.
Finally, it also removes a call to 'ldconfig', which fixes a sandbox violation.
So... Yeah, I'm quite sure about my fixes. :)
Your patch doesn't work for me.
Did you have a /etc/ld.so.cache~ ? This file have sandbox violation.
No, I don't have the backup /etc/ld.so.cache~
But I remember I had a sandbox violation on /etc/ld.so.cache because it tried to run "ldconfig" at the end of the install stage. So, one of the sed-patches removes that call from the Makefile, solving this issue.
About the patch itself... (assuming you are talking about fix-lib-link-order.patch) It's weird that it didn't work for you. Anyway, all I did was moving $(LDLIBS) parameter to AFTER the $(OBJECTS) parameter, exactly as described in the official gentoo documentation I linked above.
Feel free to re-make this patch