Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.web11.50.1620251430574636436 for ; Wed, 05 May 2021 14:50:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kCvgQ2Zv; spf=pass (domain: gmail.com, ip: 209.85.218.51, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f51.google.com with SMTP id n2so5152097ejy.7 for ; Wed, 05 May 2021 14:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ko2ZlzWw8hY4h6RyfQV366wHc0lIbTfTV9cqJ1KhLd8=; b=kCvgQ2ZvIrxjhZCFFtBchEYT1KWq9QQcPt5a2zHwR+HOMidtaWZkzQ0KoLJTG8hav7 /St/urPAnGq1vz4WNm8pUhVsDIR5GehzbvLS5gw20xG6ZLZqJ8WymgesG82/ZmA+Wm7S ttF5rUI4QU68OCUdKJcMwURpEyf9n8Y75QyCbTIAsfGJNXIagfE2l7aa3udiRmAhJxEU 3PV11FthtvqCvgUQUJAOSLxXer2XZi4e4bZoSCYwAozxhy+691ErcZ0Jga67LOhgdwzu 57RHs6H09mGyIzN19x+4nUAbj/nOEuMBCKmFZTZSzkFja30bVfNdGGrTDIEvFNRy8pMh KQkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ko2ZlzWw8hY4h6RyfQV366wHc0lIbTfTV9cqJ1KhLd8=; b=OtibSQqkVpzrbBj9xCFi2GXUyBZg0I08hpN//HedSI641+VNNsbsxFroUlk4dUfiGr /WUfqPDise/oTOfTKqba+FfBUZjf+6BnfN0aZzU0R3waum8cc2UkB+teyYIh1c55SFex btazmlg+BQP2OQp34+xKWIvlrCaP3RD/GaXD6XiVqLzsA8tzlcNmXXi62uudiqAuKIq7 vH32Q4/gYju3xByAi7aLWG3mokjIQVjRj+bibs01TD21tOBbLYjlJhXS5wQs22tB0kVX 9HWYrwZxTXzA7S0SrFVHbx+CVFqR67K5cBnnOLhMuSpJqcrMUaOiWbVJE1e5p3RLgipz 9Sjg== X-Gm-Message-State: AOAM533TlS3gCbGDQMi+rfT+V9g8ML98B+kNXD/N5mxwfbsdVAyhAMSo kaLEbmJ7rFOGVU4PwgysJ1utfD7cqjs= X-Google-Smtp-Source: ABdhPJz3S6vKR9ThxaZdwnasK3XQFas5URSdH7Vtk+IeevnKJenrwe21qfPXBMl6uVBurd3ABM6ZXA== X-Received: by 2002:a17:906:79a:: with SMTP id l26mr866882ejc.268.1620251429131; Wed, 05 May 2021 14:50:29 -0700 (PDT) Return-Path: Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id dk13sm211214edb.34.2021.05.05.14.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 14:50:28 -0700 (PDT) From: "Martin Jansa" X-Google-Original-From: Martin Jansa To: openembedded-devel@lists.openembedded.org Cc: Martin Jansa Subject: [meta-oe][RFC][PATCH] python3-m2crypto: restore m2crypto-0.26.4-gcc_macros.patch Date: Wed, 5 May 2021 23:50:26 +0200 Message-Id: <20210505215026.1339351-1-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable * m2crypto-0.26.4-gcc_macros.patch was dropped as unnecessary in the upgrade to 0.37.1 but for aarch64 it still seems to be needed at least in some setups otherwise swig fails with: http://errors.yoctoproject.org/Errors/Details/580206/ swig -python -py3 -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2cr= ypto/0.37.1-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../lib/aar= ch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-glibc/work/c= ortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot-native/usr/bin/= aarch64-oe-linux/../../lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/inc= lude-fixed -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37= .1-r0/recipe-sysroot/usr/lib/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-g= libc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/= include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-= r0/recipe-sysroot/usr/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/py= thon3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/includ= e/openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/cortex= a57-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -o SWIG/_m= 2crypto_wrap.c SWIG/_m2crypto.i TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recip= e-sysroot/usr/include/openssl/opensslconf.h:23: Error: Unable to find 'open= ssl/opensslconf-32.h' * if I drop the -includeall from swig call I get a bit more reasonable erro= r message: Preprocessing... /OE/build/oe-core/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37= .1-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:29: Error: CPP #erro= r ""Unknown __WORDSIZE detected"". Use the -cpperraswarn option to continue= swig processing. * gcc_macros.h is generated by do_configure_prepend, if this patch really isn't needed, then the do_configure_prepend should probably be dropped as well Signed-off-by: Martin Jansa --- .../0001-import-gcc_macros.h.patch | 59 +++++++++++++++++++ .../python/python3-m2crypto_0.37.1.bb | 1 + 2 files changed, 60 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-m2crypto/00= 01-import-gcc_macros.h.patch diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-impo= rt-gcc_macros.h.patch b/meta-python/recipes-devtools/python/python3-m2crypt= o/0001-import-gcc_macros.h.patch new file mode 100644 index 0000000000..3c6d584983 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-import-gcc_= macros.h.patch @@ -0,0 +1,59 @@ +From 1364722439a0a36e3f57119dd45de666d213888c Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 5 May 2021 21:34:35 +0000 +Subject: [PATCH] import gcc_macros.h + +* it was dropped as unnecessary in the upgrade to 0.37.1 but for + aarch64 it still seems to be needed at least in some setups + otherwise swig fails with: + http://errors.yoctoproject.org/Errors/Details/580206/ + swig -python -py3 -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2c= rypto/0.37.1-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../lib/aa= rch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-glibc/work/= cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot-native/usr/bin= /aarch64-oe-linux/../../lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/in= clude-fixed -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.3= 7.1-r0/recipe-sysroot/usr/lib/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-= glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr= /include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1= -r0/recipe-sysroot/usr/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/p= ython3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/inclu= de/openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/corte= xa57-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -o SWIG/_= m2crypto_wrap.c SWIG/_m2crypto.i + TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/reci= pe-sysroot/usr/include/openssl/opensslconf.h:23: Error: Unable to find 'ope= nssl/opensslconf-32.h' + +* if I drop the -includeall from swig call I get a bit more reasonable err= or message: + Preprocessing... + /OE/build/oe-core/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.3= 7.1-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:29: Error: CPP #err= or ""Unknown __WORDSIZE detected"". Use the -cpperraswarn option to continu= e swig processing. + +* maybe we need newer swig, the regenerated m2crypto.py shows + that it was generated with 4.0.2 before while meta-oe has 3.0.12 + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa +--- + SWIG/_m2crypto.i | 10 +- + 2 files changed, 737 insertions(+), 5 deletions(-) + create mode 100644 SWIG/gcc_macros.h + +diff --git a/SWIG/_m2crypto.i b/SWIG/_m2crypto.i +index e300a10..3d51c22 100644 +--- a/SWIG/_m2crypto.i ++++ b/SWIG/_m2crypto.i +@@ -8,6 +8,11 @@ + * + */ +=20 ++%import "gcc_macros.h" ++ ++%ignore WCHAR_MAX; ++%ignore WCHAR_MIN; ++ + %module(threads=3D1) m2crypto + /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere. + Disable threadallow as well, only enable it for operations likely to +@@ -15,10 +20,6 @@ + %nothreadblock; + %nothreadallow; +=20 +-#if SWIG_VERSION >=3D 0x030000 +-#define __WCHAR_MAX__ __WCHAR_MAX +-#define __WCHAR_MIN__ __WCHAR_MIN +-#endif + /* https://gitlab.com/m2crypto/m2crypto/issues/246 */ + %ignore WCHAR_MAX; + %ignore WCHAR_MIN; +@@ -103,4 +104,3 @@ static PyObject *x509_store_verify_cb_func; + %constant int encrypt =3D 1; + %constant int decrypt =3D 0; + #endif +-=20=20 diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb= b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb index 896d9d2cc4..84400da002 100644 --- a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb @@ -10,6 +10,7 @@ SRC_URI +=3D "file://0001-setup.py-link-in-sysroot-not-in= -host-directories.patch \ file://cross-compile-platform.patch \ file://0001-Allow-verify_cb_-to-be-called-with-ok-True.patch \ file://0001-Use-of-RSA_SSLV23_PADDING-has-been-deprecated.patc= h \ + file://0001-import-gcc_macros.h.patch \ " SRC_URI[sha256sum] =3D "e4e42f068b78ccbf113e5d0a72ae5f480f6c3ace4940b91e4f= ff5598cfff6fb3" =20 --=20 2.30.2