Skip to content

import xmlsec fails on python 3.8/3.9, macOS Big Sur 11.0.1 and M1 chip #163

Open
@tesh-raichandani

Description

@tesh-raichandani
xmlsec version: 1.3.9
libxmlsec1 version: 1.2.31
libxml2 version: 2.9.10_2
(venv) tesh$ pkg-config --cflags xmlsec1
-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/opt/homebrew/Cellar/libxmlsec1/1.2.31/include/xmlsec1 -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/openssl@1.1/include/openssl

It installs fine but fails when importing.

In [1]: import xmlsec
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-43dd76db73dd> in <module>
----> 1 import xmlsec

ImportError: dlopen(/Users/tesh/rescale/venv3.9/lib/python3.9/site-packages/xmlsec.cpython-39-darwin.so, 2): Symbol not found: _xmlSecDSigNs
  Referenced from: /Users/tesh/rescale/venv3.9/lib/python3.9/site-packages/xmlsec.cpython-39-darwin.so
  Expected in: flat namespace
 in /Users/tesh/rescale/venv3.9/lib/python3.9/site-packages/xmlsec.cpython-39-darwin.so

Python 3.8 and 3.9

$ file $(which python)
/Users/tesh/rescale/venv/bin/python: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/Users/tesh/rescale/venv/bin/python (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Users/tesh/rescale/venv/bin/python (for architecture arm64):	Mach-O 64-bit executable arm64
$ file $(which python)
/Users/tesh/rescale/venv3.9/bin/python: Mach-O 64-bit executable x86_64
$ otool -L /Users/tesh/rescale/venv3.9/lib/python3.9/site-packages/xmlsec.cpython-39-darwin.so
/Users/tesh/rescale/venv3.9/lib/python3.9/site-packages/xmlsec.cpython-39-darwin.so:
	/usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.26.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
	/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 66.1.0)

Will really appreciate any help.

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