python3-m2crypto: Pass correct ABI defines to swig
PATCH 1/1 python3-m2crypto: Pass correct ABI defines to swig
This ensures that WORDSIZE is as per the target, currenrly this does not get it right for cross compiling, and OE uses multilib headers by default which means if WORDSIZE is wrong it will go on to include wtong headers due to these artificial stubs
Fixes
swig -python -py3 -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/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/include-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-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/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/cortexa57-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/recipe-sysroot/usr/include/openssl/opensslconf.h:23: Error: Unable to find 'openssl/opensslconf-32.h'
--- .../recipes-devtools/python/python3-m2crypto_0.37.1.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +3 -1
@@ -33,7 +33,9 @@ DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" SWIG_FEATURES_x86 = "-D__i386__" SWIG_FEATURES_x32 = "-D__ILP32__" -SWIG_FEATURES ?= "-D__${HOST_ARCH}__" + +SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']}" + export SWIG_FEATURES # Get around a problem with swig, but only if the
Signature · 1 line
2.31.1
Thanks, this works in my setup (qemuarm64 + oe-core default) as well.
Can you drop most of do_configure_prepend with this? (Also small typo in commit message 'currenrly' and 'wtong')
Quoted 49 lines · Khem Raj
This ensures that WORDSIZE is as per the target, currenrly this does not get it right for cross compiling, and OE uses multilib headers by default which means if WORDSIZE is wrong it will go on to include wtong headers due to these artificial stubs
Fixes
swig -python -py3(quoted diff) +0
-7-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/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/include-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-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/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdirTOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -o
SWIG/_m2crypto_wrap.cSWIG/_m2crypto.i
TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:23:
Error: Unable to find 'openssl/opensslconf-32.h'Signed-off-by Khem Raj <[email protected]>Cc Martin Jansa <[email protected]>--- .../recipes-devtools/python/python3-m2crypto_0.37.1.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0python3-m2crypto_0.37.1.bb b/meta-python/recipes-devtools/python/ python3-m2crypto_0.37.1.bb
index896d9d2cc4..305987d4f0100644meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +2
-2@@ -33,7 +33,9 @@ DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" SWIG_FEATURES_x86 = "-D__i386__" SWIG_FEATURES_x32 = "-D__ILP32__" -SWIG_FEATURES ?= "-D__${HOST_ARCH}__" + +SWIG_FEATURES ?= "-D__${HOST_ARCH}__${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']}" +
exportSWIG_FEATURES# Get around a problem with swig, but only if the
--
2.31.1
Quoted 5 lines · Martin Jansa
Thanks, this works in my setup (qemuarm64 + oe-core default) as well.
Can you drop most of
do_configure_prependwith this? (Also small typo in commit message 'currenrly' and 'wtong')
Right. I sent a v2, please check that out.
Quoted 35 lines · Khem Raj
Quoted 34 lines
This ensures that WORDSIZE is as per the target, currenrly this does not get it right for cross compiling, and OE uses multilib headers by default which means if WORDSIZE is wrong it will go on to include wtong headers due to these artificial stubs
Fixes
swig -python -py3 -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/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/include-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-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/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -oSWIG/_m2crypto_wrap.cSWIG/_m2crypto.i
TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:23: Error: Unable to find 'openssl/opensslconf-32.h'Signed-off-by Khem Raj <[email protected]>Cc Martin Jansa <[email protected]>--- .../recipes-devtools/python/python3-m2crypto_0.37.1.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +3
-2@@ -33,7 +33,9 @@ DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" SWIG_FEATURES_x86 = "-D__i386__" SWIG_FEATURES_x32 = "-D__ILP32__" -SWIG_FEATURES ?= "-D__${HOST_ARCH}__" + +SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']}" + export SWIG_FEATURES # Get around a problem with swig, but only if the --2.31.1