FS#55600 - [libxslt] xslt-config produce a warning with --cflags

Attached to Project: Arch Linux
Opened by romain (romainhk) - Tuesday, 12 September 2017, 17:50 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 15 September 2017, 00:22 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Hi.
I've just discovered a strange warning with /usr/bin/xslt-config which impact dm.xmlsec.binding installation through pip.

> xslt-config --cflags

/usr/bin/xslt-config: line 96: --cflags : command not found


And installing dm.xmlsec.binding fail directly:

> pip2 install dm.xmlsec.binding

Collecting dm.xmlsec.binding==1.3.3 (from python-saml)
Using cached dm.xmlsec.binding-1.3.3.tar.gz
Complete output from command python setup.py egg_info:
Error: cannot get XMLSec1 pre-processor and compiler flags; do you have the `libxmlsec1` development package installed?

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OrrqDE/dm.xmlsec.binding/


In fact, setup.py of dm.xmlsec.binding use "xmlsec1-config --cflags". But because the return of xmlsec1-config is badly parsed in the setup, it fails because of the warning.
Deeper, xmlsec1-config call /usr/bin/xslt-config to find this values. And at line 94 and 96 in /usr/bin/xslt-config, we can see: ` --cflags` ; which is not a valid bash command, giving the warning.
I tried to directly correct those two lines (`xml2-config --cflags`) and it worked perfectly.

By comparing with libxslt source file ( https://github.com/GNOME/libxslt/blob/master/xslt-config.in ), we can see that @XML_CONFIG@ has been replaced with nothing.
I think something went wrong with this variable in the last build process :)


Additional info:
* impacted version 1.1.30-1, not 1.1.29


Steps to reproduce:

> pip install dm.xmlsec.binding

or

> xslt-config --cflags
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Friday, 15 September 2017, 00:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  libxslt 1.1.30-2
Comment by Eli Schwartz (eschwartz) - Wednesday, 13 September 2017, 01:07 GMT
Caused by: https://git.gnome.org/browse/libxslt/commit/configure.in?id=abf537ebb2296cd3ae89989a17b0e1b5c79db107

I am not sure which insane world people live in that they actually use "==" in bash given that it has no purpose. But the author of that patch clearly didn't realize that that was a bashism.

This patch only works, although obviously not as expected, on systems where /bin/sh is a bash shell. (This confused me at first, as I use dash as /bin/sh.) In that case, by using pkg-config to find the xml2 config, configure no longer knows how to replace @XML_CONFIG@ with the path to /usr/bin/xml2-config

I suppose one could argue that on any system which has pkg-config to follow that configure path, one should use `pkg-config libxslt --cflags` in preference to ugly hacky scripts like xslt-config. On the other hand, one could also argue that generating broken scripts is bad, regardless of how hacky and unadvised this is...

I've referenced this bug at https://bugzilla.gnome.org/show_bug.cgi?id=778549 which was where this change was proposed.

Loading...