From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web08.3963.1620462387158074259 for ; Sat, 08 May 2021 01:26:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BlNgmrU6; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id w3so17104613ejc.4 for ; Sat, 08 May 2021 01:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=umK2pmAxbhB1mVAX+oQ1MILsnhtSyvfkws4h4W9VSXg=; b=BlNgmrU62XYc6828Hp+xfZUpPozJq1MLSDHToTUCawStULZU8qWshMxKYNVonL6Wkl LnhPd0AU7Jt/uqHXmGaQpqC/U1ALnsvG9AqheHClbOL702IwbtcqzAquBOIDQWfc/w9O XF9dzkL3r7v5f4iCGT7UVwBmimmFmQaXvAlnoAgRW+D0Mjo7bvUI5ZNrU68g8D7J9qM6 vtax55e4VF2E9Hhw5cbiEk0m+pnW1GlilLWYNl1g/6b45xI/+QDmrfAZRFb9jhOAH4aX Pk6RbDRl4tKIi8yACfN8yNLizriAxzyENtJMgvJCmNe0AHr7yxJW0Oc6o0IIX6AT3m+M Gl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=umK2pmAxbhB1mVAX+oQ1MILsnhtSyvfkws4h4W9VSXg=; b=c4+DD6zDd37+AjAP6OmzXNfj/RuHwWWEM99ZdkFBjDmhPYSbmUxunXN6Zf1mMV8nZ0 t/anU9znLwbIlmRbM7+Iky6CFiIs5SKAlG3i0Zk9mh/dPQlabH7acjY1Xzz8ZK9dMeKJ SHeWTMLca9a0VxmqhtRz0EM/cpCSXlL1ZcTiIuQZDMss0wZO/jut5KjHKTy9IXSVzkZi pOieYD90U/lyBgVsQ+350R82GO9ripWvHgjqNrxC01c302EXtf9hGvp0yAVkEz4/917w gbLlClYU4ZAfHWpznaQE3FE1V7klimDmCJ4TFQMX2x1DVejGAjNv53QQeixR1ZwQ/BLD INEA== X-Gm-Message-State: AOAM532caiFN5WfRAjwec/fQOsLQk3N7xleDPdRvBu0xpT5Wndn6MFW0 ocBIoUpFZXsoWOUo5d/ub5gbjSK5ZYKP+8QCzQM= X-Google-Smtp-Source: ABdhPJzZIxDkVDPG8qEjF+WFhJq6G6kmyL2DQwfK/6T+hwmG//X287i1KA/XycOAc2eair8mgEJjImmK5hJ0/SjkXsw= X-Received: by 2002:a17:906:3458:: with SMTP id d24mr15089186ejb.54.1620462385565; Sat, 08 May 2021 01:26:25 -0700 (PDT) MIME-Version: 1.0 References: <20210508054942.1527640-1-raj.khem@gmail.com> In-Reply-To: <20210508054942.1527640-1-raj.khem@gmail.com> From: "Martin Jansa" Date: Sat, 8 May 2021 10:26:14 +0200 Message-ID: Subject: Re: [meta-python][PATCH] python3-m2crypto: Pass correct ABI defines to swig To: Khem Raj Cc: openembedded-devel Content-Type: multipart/alternative; boundary="000000000000dd155405c1cd4cc3" --000000000000dd155405c1cd4cc3 Content-Type: text/plain; charset="UTF-8" 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') On Sat, May 8, 2021 at 7:49 AM Khem Raj wrote: > 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' > > Signed-off-by: Khem Raj > Cc: Martin Jansa > --- > .../recipes-devtools/python/python3-m2crypto_0.37.1.bb | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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..305987d4f0 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 > @@ -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 > > --000000000000dd155405c1cd4cc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, this works in my setup (qemuarm64 + oe-core defaul= t) as well.

Can you drop most of do_configure_prepend wi= th this? (Also small typo in commit message 'currenrly' and 'wt= ong')

On Sat, May 8, 2021 at 7:49 AM Khem Raj <raj.khem@gmail.com> wrote:
This ensures that WORDSIZE is as p= er 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-m2cryp= to/0.37.1-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../lib/aarch= 64-oe-linux/gcc/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-glibc/work/cor= texa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot-native/usr/bin/aa= rch64-oe-linux/../../lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/inclu= de-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-gli= bc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/in= clude -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0= /recipe-sysroot/usr/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/pyth= on3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/include/= openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/cortexa5= 7-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -o SWIG/_m2c= rypto_wrap.c SWIG/_m2crypto.i
=C2=A0 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 <raj.khem@gmail.com>
Cc: Martin Jansa <Martin.Jansa@gmail.com>
---
=C2=A0.../recipes-devtools/python/python3-m2crypto_0.37.1.bb=C2= =A0 =C2=A0 =C2=A0 =C2=A0 | 4 +++-
=C2=A01 file changed, 3 insertions(+), 1 deletion(-)

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..305987d4f0 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.b= b
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.b= b
@@ -33,7 +33,9 @@ DISTUTILS_INSTALL_ARGS +=3D "build_ext --openssl=3D$= {STAGING_EXECPREFIXDIR}"

=C2=A0SWIG_FEATURES_x86 =3D "-D__i386__"
=C2=A0SWIG_FEATURES_x32 =3D "-D__ILP32__"
-SWIG_FEATURES ?=3D "-D__${HOST_ARCH}__"
+
+SWIG_FEATURES ?=3D "-D__${HOST_ARCH}__ ${@['-D__ILP32__','= ;-D__LP64__'][d.getVar('SITEINFO_BITS') !=3D '32']}&quo= t;
+
=C2=A0export SWIG_FEATURES

=C2=A0# Get around a problem with swig, but only if the
--
2.31.1

--000000000000dd155405c1cd4cc3--