Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to build and install with pip #274

Closed
catbyte-io opened this issue Dec 8, 2023 · 7 comments
Closed

Failure to build and install with pip #274

catbyte-io opened this issue Dec 8, 2023 · 7 comments

Comments

@catbyte-io
Copy link

xmlsec fails to build with command pip install xmlsec or pip install python3-saml in virtual environment in codespaces docker container.

Python version: Python 3.12

virtual environment: venv

My distribution version:
VERSION="22.04.3 LTS (Jammy Jellyfish)"

requested versions:
xmlsec 1.3.13
libxmlsec1 1.2.33-1build2
libxml2 2.9.13+dfsg-1ubuntu0.3

pkg-config --cflags xmlsec1 output:

-D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2

Error message:

Collecting python3-saml
  Downloading python3_saml-1.16.0-py3-none-any.whl.metadata (1.3 kB)
Collecting lxml!=4.7.0,>=4.6.5 (from python3-saml)
  Downloading lxml-4.9.3-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (3.8 kB)
Collecting isodate>=0.6.1 (from python3-saml)
  Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 3.4 MB/s eta 0:00:00
Collecting xmlsec>=1.3.9 (from python3-saml)
  Downloading xmlsec-1.3.13.tar.gz (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.6/64.6 kB 16.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting six (from isodate>=0.6.1->python3-saml)
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading python3_saml-1.16.0-py3-none-any.whl (76 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.2/76.2 kB 223.7 MB/s eta 0:00:00
Downloading lxml-4.9.3-cp312-cp312-manylinux_2_28_x86_64.whl (8.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 180.3 MB/s eta 0:00:00
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
  ╰─> [28 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-312
      creating build/lib.linux-x86_64-cpython-312/xmlsec
      copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-cpython-312/xmlsec
      copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-cpython-312/xmlsec
      copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-cpython-312/xmlsec
      copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-cpython-312/xmlsec
      copying src/xmlsec/py.typed -> build/lib.linux-x86_64-cpython-312/xmlsec
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      building 'xmlsec' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/tmp
      creating build/temp.linux-x86_64-cpython-312/tmp/pip-install-xv3vt6eb
      creating build/temp.linux-x86_64-cpython-312/tmp/pip-install-xv3vt6eb/xmlsec_6c89e061ef61437b88afa49c2c65fd06
      creating build/temp.linux-x86_64-cpython-312/tmp/pip-install-xv3vt6eb/xmlsec_6c89e061ef61437b88afa49c2c65fd06/src
      clang -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -ferror-limit=1 -gdwarf-4 -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-gnu-folding-constant -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wshadow -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.13 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-76x9tw6b/overlay/lib/python3.12/site-packages/lxml/includes/extlibs -I/workspaces/github/Catbyte/.venv/include -I/usr/local/include/python3.12 -c /tmp/pip-install-xv3vt6eb/xmlsec_6c89e061ef61437b88afa49c2c65fd06/src/constants.c -o build/temp.linux-x86_64-cpython-312/tmp/pip-install-xv3vt6eb/xmlsec_6c89e061ef61437b88afa49c2c65fd06/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
      /tmp/pip-install-xv3vt6eb/xmlsec_6c89e061ef61437b88afa49c2c65fd06/src/constants.c:83:10: error: missing field 'get' initializer [-Werror,-Wmissing-field-initializers]
          {NULL} /* Sentinel */
               ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      2 errors generated.
      error: command '/usr/bin/clang' 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
@mymy47
Copy link

mymy47 commented Feb 7, 2024

I uploaded here for Python 3.12:

https://github.com/mymy47/python-builds-for-windows/releases

@gabrielakuhn
Copy link

@catbyte-io any hint here? Did you manage to solve it?

@mxamin
Copy link
Collaborator

mxamin commented Mar 6, 2024

I guess it's related to #254 which the fix has already been merged. You just have to wait for the next release.
You can also find the workaround solution in the comments if you don't want to wait :)

@catbyte-io
Copy link
Author

@gabrielakuhn, The issue was experienced when I was installing to pip in a .venv environment in Codespaces. However, when I spin up my docker containers within the environment, there are no issues. Since I don't have a need to run it in only a .venv environment, the issue can be closed unless anyone wants to investigate further. Thank you everyone.

@oussjarrousse
Copy link

@mxamin any estimated time of arrival for the next release? An rough estimate would be very helpful. Thanks

@mxamin
Copy link
Collaborator

mxamin commented Mar 22, 2024

@mxamin any estimated time of arrival for the next release? An rough estimate would be very helpful. Thanks

I don't have an ETA. You can follow #284 for the upcoming release.

@mxamin
Copy link
Collaborator

mxamin commented Apr 18, 2024

Apparantly the new release is not fully compatible with old xmlsec1 versions (1.2.x). We already have a issue to handle it probably in the next release (#314), so I'm closing this one

@mxamin mxamin closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants