* meta: rust: Bug fix for target definitions returning 'NoneType' @ 2022-04-01 6:01 Sundeep KOKKONDA 2022-04-01 7:57 ` [OE-core] " Alexander Kanavin 2022-04-02 11:01 ` Alexandre Belloni 0 siblings, 2 replies; 6+ messages in thread From: Sundeep KOKKONDA @ 2022-04-01 6:01 UTC (permalink / raw) To: openembedded-core; +Cc: rwmacleod, umesh.kalappa0, pgowda.cve, Sundeep KOKKONDA 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. Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> --- 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' 2022-04-01 6:01 meta: rust: Bug fix for target definitions returning 'NoneType' Sundeep KOKKONDA @ 2022-04-01 7:57 ` Alexander Kanavin 2022-04-04 16:06 ` Sundeep KOKKONDA 2022-04-02 11:01 ` Alexandre Belloni 1 sibling, 1 reply; 6+ messages in thread From: Alexander Kanavin @ 2022-04-01 7:57 UTC (permalink / raw) To: Sundeep KOKKONDA; +Cc: OE-core, Randy MacLeod, umesh kalappa0, pgowda Can you please explain why changing arm-eabi to arm fixes the issue and provide the complete error? We do build rust for arm machines on the autobuilder, and there is no error like that occurring. Alex On Fri, 1 Apr 2022 at 08:02, Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> 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. > > Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> > --- > 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/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: meta: rust: Bug fix for target definitions returning 'NoneType' 2022-04-01 7:57 ` [OE-core] " Alexander Kanavin @ 2022-04-04 16:06 ` Sundeep KOKKONDA 2022-04-04 16:08 ` [OE-core] " Alexander Kanavin 0 siblings, 1 reply; 6+ messages in thread From: Sundeep KOKKONDA @ 2022-04-04 16:06 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 3820 bytes --] Hello Alex, Steps to reproduce: * Set MACHINE ?= "qemuarm" in local.conf * bitbake core-image-minimal -cpopulate_sdk * Complete Error:* > > ERROR: rust-cross-canadian-arm-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: <module> > 0001: > *** 0002:do_rust_gen_targets(d) > 0003: > File: > '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', > lineno: 31, function: do_rust_gen_targets > 0027: > 0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}" > 0029:python do_rust_gen_targets () { > 0030: wd = d.getVar('WORKDIR') + '/targets/' > *** 0031: rust_gen_target(d, 'TARGET', wd, > d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), > d.getVar('TARGET_ARCH')) > 0032: rust_gen_target(d, 'HOST', wd, "", "generic", > d.getVar('HOST_ARCH')) > 0033: rust_gen_target(d, 'BUILD', wd, "", "generic", > d.getVar('BUILD_ARCH')) > 0034:} > 0035: > File: > '/ala-lpggp31/skokkonda/yocto/poky/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' > > ERROR: Logfile of failure stored in: > /ala-lpggp31/skokkonda/yocto/poky/build_arm/tmp/work/x86_64-nativesdk-pokysdk-linux/rust-cross-canadian-arm/1.59.0-r0/temp/log.do_rust_gen_targets.168831 > > ERROR: Task > (/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian_1.59.0.bb:do_rust_gen_targets) > failed with exit code '1' > . > I took local variables from rust_gen_target function for arm and aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType. Locals at rust_gen_target for arm:: arch = arm rust_arch = arm arch_abi = arm *tspec['data-layout'] = None* *Type of tspec['data-layout'] = <class 'NoneType'>* tspec['data-layout'] = None Type of tspec['data-layout'] = <class 'NoneType'> DEBUG: Python function do_rust_gen_targets finished Locals at rust_gen_target for aarch64:: arch = aarch64 rust_arch = aarch64 arch_abi = aarch64 *tspec['data-layout'] = aarch64-unknown-linux-gnu* *Type of tspec['data-layout'] = <class 'str'>* tspec['data-layout'] = e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128 Type of tspec['data-layout'] = <class 'str'> tspec['max-atomic-width'] = 128 Type of tspec['max-atomic-width'] = <class 'int'> tspec['target-pointer-width'] = 64 Type of tspec['target-pointer-width'] = <class 'str'> tspec['target-c-int-width'] = 32 Type of tspec['target-c-int-width'] = <class 'str'> tspec['target-endian'] = little Type of tspec['target-endian'] = <class 'str'> tspec['arch'] = aarch64 Type of tspec['arch'] = <class 'str'> Reason for changing arm-eabi to arm: I noticed that the previous change introduced this bug, so I reverted the arm-eabi to arm and the issue is fixed. -- Thanks, Sundeep K. [-- Attachment #2: Type: text/html, Size: 5745 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' 2022-04-04 16:06 ` Sundeep KOKKONDA @ 2022-04-04 16:08 ` Alexander Kanavin 2022-04-04 16:21 ` sundeep.kokkonda 0 siblings, 1 reply; 6+ messages in thread From: Alexander Kanavin @ 2022-04-04 16:08 UTC (permalink / raw) To: Sundeep KOKKONDA; +Cc: OE-core Thanks for the explanations! Can you place this information into the commit message? Alex On Mon, 4 Apr 2022 at 18:06, Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> wrote: > > Hello Alex, > > Steps to reproduce: > > Set MACHINE ?= "qemuarm" in local.conf > bitbake core-image-minimal -cpopulate_sdk > > > Complete Error: > > ERROR: rust-cross-canadian-arm-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: <module> > 0001: > *** 0002:do_rust_gen_targets(d) > 0003: > File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets > 0027: > 0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}" > 0029:python do_rust_gen_targets () { > 0030: wd = d.getVar('WORKDIR') + '/targets/' > *** 0031: rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) > 0032: rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) > 0033: rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) > 0034:} > 0035: > File: '/ala-lpggp31/skokkonda/yocto/poky/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' > > ERROR: Logfile of failure stored in: /ala-lpggp31/skokkonda/yocto/poky/build_arm/tmp/work/x86_64-nativesdk-pokysdk-linux/rust-cross-canadian-arm/1.59.0-r0/temp/log.do_rust_gen_targets.168831 > ERROR: Task (/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian_1.59.0.bb:do_rust_gen_targets) failed with exit code '1' > . > > I took local variables from rust_gen_target function for arm and aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType. > > Locals at rust_gen_target for arm:: > arch = arm > rust_arch = arm > arch_abi = arm > tspec['data-layout'] = None > Type of tspec['data-layout'] = <class 'NoneType'> > tspec['data-layout'] = None > Type of tspec['data-layout'] = <class 'NoneType'> > DEBUG: Python function do_rust_gen_targets finished > > Locals at rust_gen_target for aarch64:: > arch = aarch64 > rust_arch = aarch64 > arch_abi = aarch64 > tspec['data-layout'] = aarch64-unknown-linux-gnu > Type of tspec['data-layout'] = <class 'str'> > tspec['data-layout'] = e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128 > Type of tspec['data-layout'] = <class 'str'> > tspec['max-atomic-width'] = 128 > Type of tspec['max-atomic-width'] = <class 'int'> > tspec['target-pointer-width'] = 64 > Type of tspec['target-pointer-width'] = <class 'str'> > tspec['target-c-int-width'] = 32 > Type of tspec['target-c-int-width'] = <class 'str'> > tspec['target-endian'] = little > Type of tspec['target-endian'] = <class 'str'> > tspec['arch'] = aarch64 > Type of tspec['arch'] = <class 'str'> > > Reason for changing arm-eabi to arm: > I noticed that the previous change introduced this bug, so I reverted the arm-eabi to arm and the issue is fixed. > > > -- > Thanks, > Sundeep K. > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#164003): https://lists.openembedded.org/g/openembedded-core/message/164003 > Mute This Topic: https://lists.openembedded.org/mt/90172076/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' 2022-04-04 16:08 ` [OE-core] " Alexander Kanavin @ 2022-04-04 16:21 ` sundeep.kokkonda 0 siblings, 0 replies; 6+ messages in thread From: sundeep.kokkonda @ 2022-04-04 16:21 UTC (permalink / raw) To: 'Alexander Kanavin'; +Cc: 'OE-core' Hi Alex, Commit message updated. Thanks, Sundeep K. -----Original Message----- From: Alexander Kanavin <alex.kanavin@gmail.com> Sent: Monday, April 4, 2022 9:38 PM To: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> Cc: OE-core <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' Thanks for the explanations! Can you place this information into the commit message? Alex On Mon, 4 Apr 2022 at 18:06, Sundeep KOKKONDA <sundeep.kokkonda@gmail.com> wrote: > > Hello Alex, > > Steps to reproduce: > > Set MACHINE ?= "qemuarm" in local.conf bitbake core-image-minimal > -cpopulate_sdk > > > Complete Error: > > ERROR: rust-cross-canadian-arm-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: <module> > 0001: > *** 0002:do_rust_gen_targets(d) > 0003: > File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets > 0027: > 0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}" > 0029:python do_rust_gen_targets () { > 0030: wd = d.getVar('WORKDIR') + '/targets/' > *** 0031: rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) > 0032: rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) > 0033: rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) > 0034:} > 0035: > File: '/ala-lpggp31/skokkonda/yocto/poky/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' > > ERROR: Logfile of failure stored in: > /ala-lpggp31/skokkonda/yocto/poky/build_arm/tmp/work/x86_64-nativesdk- > pokysdk-linux/rust-cross-canadian-arm/1.59.0-r0/temp/log.do_rust_gen_t > argets.168831 > ERROR: Task (/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian_1.59.0.bb:do_rust_gen_targets) failed with exit code '1' > . > > I took local variables from rust_gen_target function for arm and aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType. > > Locals at rust_gen_target for arm:: > arch = arm > rust_arch = arm > arch_abi = arm > tspec['data-layout'] = None > Type of tspec['data-layout'] = <class 'NoneType'> > tspec['data-layout'] = None Type of tspec['data-layout'] = <class > 'NoneType'> > DEBUG: Python function do_rust_gen_targets finished > > Locals at rust_gen_target for aarch64:: > arch = aarch64 > rust_arch = aarch64 > arch_abi = aarch64 > tspec['data-layout'] = aarch64-unknown-linux-gnu Type of > tspec['data-layout'] = <class 'str'> tspec['data-layout'] = > e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128 > Type of tspec['data-layout'] = <class 'str'> > tspec['max-atomic-width'] = 128 Type of tspec['max-atomic-width'] = > <class 'int'> tspec['target-pointer-width'] = 64 Type of > tspec['target-pointer-width'] = <class 'str'> > tspec['target-c-int-width'] = 32 Type of tspec['target-c-int-width'] > = <class 'str'> tspec['target-endian'] = little Type of > tspec['target-endian'] = <class 'str'> tspec['arch'] = aarch64 Type > of tspec['arch'] = <class 'str'> > > Reason for changing arm-eabi to arm: > I noticed that the previous change introduced this bug, so I reverted the arm-eabi to arm and the issue is fixed. > > > -- > Thanks, > Sundeep K. > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#164003): > https://lists.openembedded.org/g/openembedded-core/message/164003 > Mute This Topic: https://lists.openembedded.org/mt/90172076/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub > [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType' 2022-04-01 6:01 meta: rust: Bug fix for target definitions returning 'NoneType' Sundeep KOKKONDA 2022-04-01 7:57 ` [OE-core] " Alexander Kanavin @ 2022-04-02 11:01 ` Alexandre Belloni 1 sibling, 0 replies; 6+ messages in thread From: Alexandre Belloni @ 2022-04-02 11:01 UTC (permalink / raw) To: Sundeep KOKKONDA; +Cc: openembedded-core, rwmacleod, umesh.kalappa0, pgowda.cve 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: <module> 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 <sundeep.kokkonda@gmail.com> > --- > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-04 18:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-04-01 6:01 meta: rust: Bug fix for target definitions returning 'NoneType' Sundeep KOKKONDA 2022-04-01 7:57 ` [OE-core] " Alexander Kanavin 2022-04-04 16:06 ` Sundeep KOKKONDA 2022-04-04 16:08 ` [OE-core] " Alexander Kanavin 2022-04-04 16:21 ` sundeep.kokkonda 2022-04-02 11:01 ` Alexandre Belloni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox