Skip to content

Unable to install xmlsec: xmlSecTransformXsltId undeclared #172

@waranlogesh

Description

@waranlogesh

Version of xmlsec - 1.3.10

Version of libxmlsec1

libxmlsec1-dev/focal,now 1.2.28-2 amd64 [installed]
libxmlsec1-doc/focal 1.2.28-2 all
libxmlsec1-gcrypt/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-gnutls/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-nss/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-openssl/focal,now 1.2.28-2 amd64 [installed]
libxmlsec1/focal,now 1.2.28-2 amd64 [installed]

Version of libxml2

libxml2-dev/focal,now 2.9.10+dfsg-5 amd64 [installed]
libxml2-doc/focal 2.9.10+dfsg-5 all
libxml2-utils/focal 2.9.10+dfsg-5 amd64
libxml2/focal,now 2.9.10+dfsg-5 amd64 [installed,automatic]
python-libxml2-dbg/focal 2.9.10+dfsg-5 amd64
python-libxml2/focal 2.9.10+dfsg-5 amd64
python3-libxml2-dbg/focal 2.9.10+dfsg-5 amd64
python3-libxml2/focal 2.9.10+dfsg-5 amd64

Output from the command pkg-config --cflags xmlsec1

-D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2

pip error log

❯ pip install xmlsec
Collecting xmlsec
  Using cached xmlsec-1.3.10.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: lxml>=3.8 in ./.venv/lib/python3.6/site-packages (from xmlsec) (4.6.3)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/logesh/workspace/sentry/.venv/bin/python /home/logesh/workspace/sentry/.venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp4whsoa6o
       cwd: /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b
  Complete output (61 lines):
  running bdist_wheel
  running build
  running build_py
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    % (opt, underscore_opt))
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
    % (opt, underscore_opt))
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
    % (opt, underscore_opt))
  package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  running build_ext
  building 'xmlsec' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/tmp
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/ds.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/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 -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c: In function ‘PyXmlSec_KeyNameSet’:
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c:456:43: warning: passing argument 2 of ‘xmlSecKeySetName’ from incompatible pointer type [-Wincompatible-pointer-types]
    456 |         if (xmlSecKeySetName(key->handle, value) < 0) {
        |                                           ^~~~~
        |                                           |
        |                                           PyObject * {aka struct _object *}
  In file included from /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/openssl/app.h:16,
                   from /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/crypto.h:28,
                   from /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.h:16,
                   from /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c:11:
  /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/keys.h:195:73: note: expected ‘const xmlChar *’ {aka ‘const unsigned char *’} but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
    195 |                                                          const xmlChar* name);
        |                                                          ~~~~~~~~~~~~~~~^~~~
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/lxml.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/lxml.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  In file included from /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/lxml.c:13:
  /tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/etree_defs.h:266:14: warning: ‘lxml_unpack_xmldoc_capsule’ defined but not used [-Wunused-function]
    266 | static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) {
        |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/template.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/template.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 -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c: In function ‘PyXmlSec_ConstantsModule_Init’:
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:469:33: error: ‘xmlSecTransformXsltId’ undeclared (first use in this function); did you mean ‘xmlSecTransformXPathId’?
    469 |     tmp = PyXmlSec_TransformNew(xmlSec ## name ## Id); \
        |                                 ^~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:488:5: note: in expansion of macro ‘PYXMLSEC_ADD_TRANSFORM_CONSTANT’
    488 |     PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformXslt, "XSLT");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:469:33: note: each undeclared identifier is reported only once for each function it appears in
    469 |     tmp = PyXmlSec_TransformNew(xmlSec ## name ## Id); \
        |                                 ^~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:488:5: note: in expansion of macro ‘PYXMLSEC_ADD_TRANSFORM_CONSTANT’
    488 |     PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformXslt, "XSLT");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions