python-xmlsec: Fails to build "lxml-version.h: No such file or directory"
Suddenly failed to build recently. Might be due to the new release of lxml that came out
#11 22.22 /tmp/pip-install-w06wmd73/xmlsec_b455cf60a688463dbc08380657687275/src/lxml.h:18:10: fatal error: lxml-version.h: No such file or directory
#11 22.22 18 | #include <lxml-version.h>
#11 22.22 | ^~~~~~~~~~~~~~~~
#11 22.22 compilation terminated.
#11 22.22 error: command 'gcc' failed with exit status 1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 15 (9 by maintainers)
Commits related to this issue
- :alien: Fix pinned lxml/xmlsec build lxml released a new version breaking the build of xmlsec (which used lxml as build tool and therefore pulls in a newer version of lxml than the pinned version. T... — committed to open-formulieren/open-forms by sergei-maertens 5 years ago
- :alien: Fix pinned lxml/xmlsec build lxml released a new version breaking the build of xmlsec (which used lxml as build tool and therefore pulls in a newer version of lxml than the pinned version. T... — committed to open-formulieren/open-forms by sergei-maertens 5 years ago
Thanks for notifying me. I looked through the build logs but couldn’t find any reason for this happening. Sadly, fluctuations in cosmic radiation aren’t reflected in the log output, however widespread their effect across all wheels may be.
I’ll remove the release.
I have a launchpad bug here https://bugs.launchpad.net/lxml/+bug/1954644
lxml 4.6.5 and 4.7 that came out within the last 20 hours cause this, as xmlsec does not have an upper version limit, and
the mentioned versions4.7.0 remove thelxml-version.hfile.To fix this, you can install xmlsec like this
The
lxml-version.hshould be created on installation (spot in setup script), but it’s not and it’s missing in the latestlxmlwheels. On the first sight, it looks like a (temporary)lxmlbug to me, so we can just yank the faulty versions fromlxmldependency range.Another workaround could be discarding
lxmlwheels for now, should you use those:I got that
C_INCLUDE_PATHfrom the lxml docs when installing on Mac (despite me installing on linux).I think the reason its needed is because lxml is declared as build dependency for xmlsec, so it downloads another copy during buiild, in which the latest version is downloaded?