Hi Alex, Commit message updated.
Thanks, Sundeep K. -----Original Message----- From: Alexander Kanavin <[email protected]> Sent: Monday, April 4, 2022 9:38 PM To: Sundeep KOKKONDA <[email protected]> Cc: OE-core <[email protected]> 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 <[email protected]> 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 (#164005): https://lists.openembedded.org/g/openembedded-core/message/164005 Mute This Topic: https://lists.openembedded.org/mt/90172076/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
