FS#18333 - [fltk] hardcoded ldflags cause linking to fail
Attached to Project:
Arch Linux
Opened by Philipp (hollunder) - Monday, 15 February 2010, 01:42 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 06 March 2010, 01:40 GMT
Opened by Philipp (hollunder) - Monday, 15 February 2010, 01:42 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 06 March 2010, 01:40 GMT
|
Details
Description:
I know a number of fltk applications that fail to link anything due to the new ldflags. $ fltk-config --ldflags -Wl,-rpath,/usr/lib -Wl,--hash-style=gnu -Wl,--as-needed -lfltk -lXft -lpthread -ldl -lm -lXext -lX11 I found no way to temporarily change those ldflags for fltk, and thus no way to work around the breakage in PKGBUILDS. Information on the topic seems to be sparse, application developers usually don't know what the problem is and don't feel like spending a lot of time on it to accomodate a single distro. Additional info: * package version(s) fltk 1.1.9-3 Steps to reproduce: Try to build this for example: http://aur.archlinux.org/packages.php?ID=22764 |
This task depends upon
export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
export LDFLAGS="${LDFLAGS//,--as-needed}"
On the otherhand, many other distros use this LDFLAG and the problems is causes and their solutions are well know so fixes should be easy to find (despite the reporters assertion).
I have removed the LDFLAGS line in makepkg.conf, the flags in fltk-config remain and remain to get passed on.
One other fltk application I use (yoshimi) compiles fine, it simply doesn't call fltk-config. Is this the solution you suggest Allan?
export LDFLAGS="${LDFLAGS//,--as-needed}"
definitely doesn't work.
I found this for example: http://www.gentoo.org/proj/en/qa/asneeded.xml
but I know nothing about linking, so I'll have to try to get every single upstream dev to change this for every single app.
Gentoo doesn't use --as-needed by default according to that page, not sure how true the claim is that many distros use it.
I built it with the LDFLAGS line in makepkg.conf commented out and it showed:
-Wl,-rpath,/usr/lib -L/usr/lib64 -lfltk -lXft -lpthread -ldl -lm -lXext -lX11
And with this line active, as it probably was when the fltk package in extra was built:
-Wl,-rpath,/usr/lib -L/usr/lib64 -Wl,--hash-style=gnu -Wl,--as-needed -lfltk -lXft -lpthread -ldl -lm -lXext -lX11
So as I see it I could patch ever apps build system to make it work (if I knew how to do it) or suggest to every user to disable the line and rebuild fltk.
I tried to convince the author of non-sequencer, non-daw, non-mixer to fix this but he didn't like the idea.
Another app that fails to build because of this: tapiir