Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D674CC636F4 for ; Mon, 4 Apr 2022 18:46:45 +0000 (UTC) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by mx.groups.io with SMTP id smtpd.web12.10590.1648897299836018219 for ; Sat, 02 Apr 2022 04:01:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eBYN8w/l; spf=pass (domain: bootlin.com, ip: 217.70.178.232, mailfrom: alexandre.belloni@bootlin.com) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 29415200002; Sat, 2 Apr 2022 11:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1648897297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wUpN0occOJoWl1oliTy4EYeVk3iy37a5VvzzdqkLoWs=; b=eBYN8w/lFN84oKksoxjGGPfihl67Xbcib7Bsk+3Qs7DHehNSX1W5dWCupsrqdl059X9ksJ 1av8tmXLhLh5TqpHMgb2JeJniBv55VIJ0nw1hI3UXromAZh9DPXyOqpdKmsaXwl8ppJM0Q ddcJZNEmOLJzz5t7txWP49aiiaQFEF8IOVJR548d+PpAhhNzXhDoNHaOBXOX4blEwrjoSa 3WaBHYGrVeOwSlW93czMNHn095sY7rHDSTK2vx6LSVP79KtxsGGCtZ25En+S8b3C2FoszO 1YJ6aWX4QiYt07GZC1d18pwIyYB9z/cWL0QSDZ0v8C6BTNn+SKHWNfkil+S7Og== Date: Sat, 2 Apr 2022 13:01:35 +0200 From: Alexandre Belloni To: Sundeep KOKKONDA Cc: openembedded-core@lists.openembedded.org, rwmacleod@gmail.com, umesh.kalappa0@gmail.com, pgowda.cve@gmail.com Subject: Re: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' Message-ID: References: <20220401060152.8255-1-sundeep.kokkonda@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220401060152.8255-1-sundeep.kokkonda@gmail.com> List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 04 Apr 2022 18:46:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/163954 On 01/04/2022 11:31:52+0530, Sundeep KOKKONDA wrote: > The build shows below error while building for arm machines. > Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' > > All the target definitions within tspec dictionary are generted as > NoneType. The changes will fix this issue. > This actually caused the issue on the autobuidlers: ERROR: rust-cross-cortexa8hf-neon-glibc-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: 0001: *** 0002:do_rust_gen_targets(d) 0003: File: '/home/pokybuild/yocto-worker/beaglebone/build/meta/recipes-devtools/rust/rust-cross.inc', lineno: 19, function: do_rust_gen_targets 0015: if arch == "arm" and target_is_armv7(d): 0016: arch = 'armv7' 0017: features = d.getVar('TARGET_LLVM_FEATURES') or "" 0018: cpu = d.getVar('TARGET_LLVM_CPU') *** 0019: rust_gen_target(d, thing, wd, features, cpu, arch, abi) 0020:} 0021: 0022:# Otherwise we'll depend on what we provide 0023:INHIBIT_DEFAULT_RUST_DEPS = "1" File: '/home/pokybuild/yocto-worker/beaglebone/build/meta/recipes-devtools/rust/rust-common.inc', lineno: 330, function: rust_gen_target 0326: # build tspec 0327: tspec = {} 0328: tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi) 0329: tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) *** 0330: tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) 0331: tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) 0332: tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) 0333: tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) 0334: tspec['arch'] = arch_to_rust_target_arch(rust_arch) Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/5029/steps/11/logs/stdio > Signed-off-by: Sundeep KOKKONDA > --- > meta/recipes-devtools/rust/rust-common.inc | 28 +++++++++++----------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc > index ceeee97863..6236c43d5c 100644 > --- a/meta/recipes-devtools/rust/rust-common.inc > +++ b/meta/recipes-devtools/rust/rust-common.inc > @@ -119,22 +119,22 @@ def llvm_features(d): > > > ## arm-unknown-linux-gnueabihf > -DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" > -LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}" > -TARGET_ENDIAN[arm-eabi] = "little" > -TARGET_POINTER_WIDTH[arm-eabi] = "32" > -TARGET_C_INT_WIDTH[arm-eabi] = "32" > -MAX_ATOMIC_WIDTH[arm-eabi] = "64" > -FEATURES[arm-eabi] = "+v6,+vfp2" > +DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" > +LLVM_TARGET[arm] = "${RUST_TARGET_SYS}" > +TARGET_ENDIAN[arm] = "little" > +TARGET_POINTER_WIDTH[arm] = "32" > +TARGET_C_INT_WIDTH[arm] = "32" > +MAX_ATOMIC_WIDTH[arm] = "64" > +FEATURES[arm] = "+v6,+vfp2" > > ## armv7-unknown-linux-gnueabihf > -DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" > -LLVM_TARGET[armv7-eabi] = "${RUST_TARGET_SYS}" > -TARGET_ENDIAN[armv7-eabi] = "little" > -TARGET_POINTER_WIDTH[armv7-eabi] = "32" > -TARGET_C_INT_WIDTH[armv7-eabi] = "32" > -MAX_ATOMIC_WIDTH[armv7-eabi] = "64" > -FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2" > +DATA_LAYOUT[armv7] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" > +LLVM_TARGET[armv7] = "${RUST_TARGET_SYS}" > +TARGET_ENDIAN[armv7] = "little" > +TARGET_POINTER_WIDTH[armv7] = "32" > +TARGET_C_INT_WIDTH[armv7] = "32" > +MAX_ATOMIC_WIDTH[armv7] = "64" > +FEATURES[armv7] = "+v7,+vfp2,+thumb2" > > ## aarch64-unknown-linux-{gnu, musl} > DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#163881): https://lists.openembedded.org/g/openembedded-core/message/163881 > Mute This Topic: https://lists.openembedded.org/mt/90172076/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com