xmlsec/python-xmlsec

Version mismatch from import

MaskedBelgian opened this issue · 0 comments

Hi,

I'm building a multi-stage docker image:

FROM python:3.7 AS python_builder

RUN apt-get update &&\
    apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl build-essential python3-dev gcc rustc libffi-dev

RUN mkdir -p /opt/pip

RUN pip3 install xmlsec==1.3.12 -t /opt/pip

FROM odoo:14.0

USER root

RUN apt-get update &&\
    apt-get install -y libxmlsec1-openssl

COPY --from=python_builder --chown=odoo:odoo /opt/pip /usr/lib/python3/dist-packages

USER odoo

This is what I get in the odoo container debian:buster-slim image:

Python 3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xmlsec
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
xmlsec.Error: (19, 'xmlsec library version mismatch.')

version of xmlsec: 1.3.12
version of libxmlsec1: 1.2.27-2
version of libxml2: 2.9.4+dfsg1-7+deb10u6

output from 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/usr/include/xmlsec1 -I/usr/include/libxml2

Thanks for the help