A similar problem to your last one, which I've fixed in a dozen packages or so by now (all passed upstream) is when libtool-using projects put libraries in LDFLAGS or linker flags (of the type which should apply to everything, i.e. not -R, -Wl,Bdynamic, or -Wl,--as-needed et al) in LIBS. Because libtool automatically forces LDFLAGS in front of the filename list in the link line and LIBS to the end of that list, mixing up LDFLAGS and LIBS assignments can easily lead to things that don't link. (This is especially common if you're using a wrapper around the compiler, or a modified specs file, to add flags like --as-needed by default, so that your shared library doesn't get linked because its symbols weren't needed if it was linked 'too early' by being put in LDFLAGS rather than LIBS. Using --as-needed works pretty much all the time otherwise and reduces relocations significantly for some projects: the only things it breaks that I've found are the testsuites for glibc, prelink, and libtool, all of which test peculiar edge cases like linking to shared libraries containing no needed symbols but with constructors: --as-needed eliminates those libraries and the test fails. Real code pretty much never does this, so the solution is to turn off the --as-needed wrappers for those projects' testsuites only.)
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds