After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766669 - tests/plugins: xmlsoft_org_xslt_testplugin.la needs -no-undefined
tests/plugins: xmlsoft_org_xslt_testplugin.la needs -no-undefined
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-19 15:03 UTC by Michael Haubenwallner
Modified: 2016-07-13 13:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add WIN32_EXTRA_LDFLAGS to tests/plugins/Makefile.am (694 bytes, patch)
2016-05-19 15:03 UTC, Michael Haubenwallner
none Details | Review
(alternative) Unconditionally use -no-undefined for libtool libs (2.62 KB, patch)
2016-05-19 15:12 UTC, Michael Haubenwallner
none Details | Review

Description Michael Haubenwallner 2016-05-19 15:03:25 UTC
Created attachment 328209 [details] [review]
add WIN32_EXTRA_LDFLAGS to tests/plugins/Makefile.am

Attached patch fixes this compilation problem with Cygwin:

  CCLD   xmlsoft_org_xslt_testplugin.la
libtool:   error: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified
Makefile:350: recipe for target 'xmlsoft_org_xslt_testplugin.la' failed
make[3]: *** [xmlsoft_org_xslt_testplugin.la] Error 1

Thanks!
Comment 1 Michael Haubenwallner 2016-05-19 15:12:29 UTC
Created attachment 328210 [details] [review]
(alternative) Unconditionally use -no-undefined for libtool libs

Actually I'm wondering why to add -no-undefined for win32-based platforms only, while the libs do not require undefined symbols on any platform. What do I miss?
Comment 2 Nick Wellnhofer 2016-07-13 11:38:04 UTC
Fixed with the following commit:

https://git.gnome.org/browse/libxslt/commit/?id=2fbf5b1f440534a46b7b440a487768620cfb039c

Adding -no-undefined unconditionally seems like a good idea, but I don't want to risk breaking the build for other platforms.

I also wonder libtool requires -no-undefined on Cygwin. If there aren't any undefined symbols, linking should succeed even without -no-undefined.
Comment 3 Michael Haubenwallner 2016-07-13 13:14:08 UTC
Well, Cygwin actually _does_ apply a patch to add the -no-undefined flag, and I'm wondering they haven't filed that already.

Without the -no-undefined flag, libtool assumes the library _has_ undefined symbols, and does not even try to link a shared library on platforms known to break with.

Instead, library maintainers really should flag -no-undefined always, to unhide undefined-symbol-bugs even on platforms that support them.

But agreed, adding -no-undefined by micro version bump is risky - but minor version bump should be fine though.

Anyway, thanks!