Comments (12)
I'm having the same issue too when installing on a Red Hat 8 system with Python 3.9.12. Version 1.3.13 installs just fine
pip install xmlsec==1.3.14
Collecting xmlsec==1.3.14
Downloading xmlsec-1.3.14.tar.gz (68 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.9/68.9 kB 6.1 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting lxml>=3.8 (from xmlsec==1.3.14)
Using cached lxml-5.2.1-cp39-cp39-manylinux_2_28_x86_64.whl.metadata (3.4 kB)
Using cached lxml-5.2.1-cp39-cp39-manylinux_2_28_x86_64.whl (5.0 MB)
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xmlsec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [39 lines of output]
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-cpython-39/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-cpython-39/xmlsec
copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-cpython-39/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-cpython-39/xmlsec
copying src/xmlsec/py.typed -> build/lib.linux-x86_64-cpython-39/xmlsec
running build_ext
building 'xmlsec' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/tmp
creating build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2
creating build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b
creating build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.14 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/extlibs -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/venv/include -I/opt/python39/include/python3.9 -c /tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/constants.c -o build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.14 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/extlibs -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/venv/include -I/opt/python39/include/python3.9 -c /tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/ds.c -o build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/ds.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.14 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/extlibs -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/venv/include -I/opt/python39/include/python3.9 -c /tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/enc.c -o build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/enc.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/enc.c: In function ‘PyXmlSec_ClearReplacedNodes’:
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/enc.c:207:14: warning: assignment to ‘struct LxmlElement **’ from incompatible pointer type ‘PyXmlSec_LxmlElementPtr’ {aka ‘struct LxmlElement *’} [-Wincompatible-pointer-types]
elem = PyXmlSec_elementFactory(doc, n);
^
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.14 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/extlibs -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/venv/include -I/opt/python39/include/python3.9 -c /tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/exception.c -o build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/exception.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/exception.c: In function ‘PyXmlSec_ExchangeLastError’:
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/exception.c:76:9: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
int r;
^
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.14 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/extlibs -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-8vp3i0k9/overlay/lib/python3.9/site-packages/lxml/includes/__pycache__ -I/venv/include -I/opt/python39/include/python3.9 -c /tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/keys.c -o build/temp.linux-x86_64-cpython-39/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/keys.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/keys.c: In function ‘PyXmlSec_KeyFromEngine’:
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/keys.c:218:65: error: ‘xmlSecKeyDataFormatEngine’ undeclared (first use in this function); did you mean ‘xmlSecKeyDataFormat’?
key->handle = xmlSecCryptoAppKeyLoad(engine_and_key_id, xmlSecKeyDataFormatEngine, NULL, xmlSecCryptoAppGetDefaultPwdCallback(), (void*)engine_and_key_id);
^~~~~~~~~~~~~~~~~~~~~~~~~
xmlSecKeyDataFormat
/tmp/pip-install-khokr2w2/xmlsec_ba08e5441ebd4063854e30606f4e9b9b/src/keys.c:218:65: note: each undeclared identifier is reported only once for each function it appears in
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install pyproject.toml-based projects
from python-xmlsec.
@mxamin
Here are the details:
OS: Debian GNU/Linux 11
xmlsec1 version: 1.2.31
libxml2 version: libxml2-dev:arm64 (2.9.10+dfsg-6.7+deb11u4)
from python-xmlsec.
@mxamin
Here are my details:
- OS version and distribution:
Red Hat Enterprise Linux 8.9 (Ootpa)
- xmlsec1 library version:
1.2.25-4.el8
- libxml2 version:
2.9.7-18.el8_9
from python-xmlsec.
@mxamin
OS: Ubuntu 20.04.6 LTS
xmlsec1_1.2.28-2_amd64
libxml2_2.9.10+dfsg-5_amd64
from python-xmlsec.
From the discussion here #284 it seems some code was copy pasted without the necessary context.
from python-xmlsec.
I can confirm that this broke my build as well. ubuntu 22.04 on GHA.
from python-xmlsec.
I can confirm my python project build is broken as well.
Using the docker image: python:3.11-slim-bullseye.
from python-xmlsec.
Thanks for the update, xmlsec1 (C library) introduced breaking changes in v1.3.x which made it hard to support old and new version at the same time. I'll note this issue and hopefully we can fix it in the new release.
@corneauf @jplrank @fram-sse @shamanthb Can you provide the following information so we can debug easier:
- OS version and distribution
- xmlsec1 library version
- libxml2 version
from python-xmlsec.
Having same issue in latest installation
Python version: (3.11.6 (main, Oct 27 2023, 00:08:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)])
Operation System: (Rocky Linux 8.8 (Green Obsidian))
xmlsec1 version: 1.2.25
libxml2 version: 2.9.7
from python-xmlsec.
For the latest release there are now binary wheels uploaded to pypi for xmlsec. These wheels are compatible with lxml > 5.0.
If you are able to install both xmlsec and lxml from wheels you should be able to install the latest version.
from python-xmlsec.
The problem here is that we are not currently compatible with these older libxmlsec1 versions.
If you are able to build against a newer version of libxmlsec1 or use the wheel, which is built against the latest version, then the new release should work.
from python-xmlsec.
Considering that older libxmlsec1 versions do have security issues, and will likely be deprecated, this may resolve itself on its own
from python-xmlsec.
Related Issues (20)
- Time to fork python-xmlsec? HOT 7
- Not able to install xmlsec for Python2 in Mac OS. HOT 2
- lxml 5.0.0 incompatibility - Arithmetic exception HOT 8
- xmlsec 1.3.3 incompatability HOT 3
- setup.py fails with older versions of xmlsec1 HOT 1
- Spurious Heal overflows with Python 3.11 HOT 1
- Find a safer way to integrate with lxml HOT 5
- Release the new version HOT 30
- "Fatal Python error: Segmentation fault" in CI HOT 4
- 1.3.14-rc1: build fails HOT 2
- Planning the next release HOT 11
- provide binary wheels for Linux compatible with lxml HOT 14
- Issues with importing xmlsec. HOT 1
- Latest release break HOT 1
- “lxml & xmlsec libxml2 library version mismatch” error under uWSGI HOT 10
- 1.13.13 wheel for linux
- 1.3.14: build fails with `-Wincompatible-pointer-types` HOT 2
- Facing the xmlsec Error: (100, 'lxml & xmlsec libxml2 library version mismatch') HOT 1
- Add changelog
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-xmlsec.