From: <sundeep.kokkonda@gmail.com>
To: "'Alexander Kanavin'" <alex.kanavin@gmail.com>
Cc: "'OE-core'" <openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] meta: rust: Bug fix for target definitions returning 'NoneType'
Date: Mon, 4 Apr 2022 21:51:49 +0530 [thread overview]
Message-ID: <19dc01d84840$190144d0$4b03ce70$@gmail.com> (raw)
In-Reply-To: <CANNYZj8448no5kcOvpkQPiAqDoLoKufQhxBmAxctFLiB_e26gg@mail.gmail.com>
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]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2022-04-04 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-04-02 11:01 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='19dc01d84840$190144d0$4b03ce70$@gmail.com' \
--to=sundeep.kokkonda@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox