Can you try the tip of master please?

Alex

On Mon, 21 Nov 2022 at 13:32, Marek Belisko <[email protected]> wrote:
>
> Hi,
>
> on kirkstone branch when trying to build rust for raspberrypi machine
> I'm getting:
>
> ERROR: rust-cross-arm1176jzfshf-vfp-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: 
> '/data/projects/test-build/.build-rpi/../sources/poky/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: 
> '/data/projects/test-build/.build-rpi/../sources/poky/meta/recipes-devtools/rust/rust-common.inc',
> lineno: 314, function: rust_gen_target
>      0310:    # build tspec
>      0311:    tspec = {}
>      0312:    tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
>      0313:    tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
>  *** 0314:    tspec['max-atomic-width'] =
> int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
>      0315:    tspec['target-pointer-width'] =
> d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
>      0316:    tspec['target-c-int-width'] =
> d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
>      0317:    tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
>      0318:    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'
>
> by adding below it seems to fix an issue (copied from meta-rust):
> diff --git a/meta/recipes-devtools/rust/rust-common.inc
> b/meta/recipes-devtools/rust/rust-common.inc
> index ef70c48d0f..389c75d2f7 100644
> --- a/meta/recipes-devtools/rust/rust-common.inc
> +++ b/meta/recipes-devtools/rust/rust-common.inc
> @@ -118,6 +118,15 @@ def llvm_features(d):
>                      llvm_features_from_target_fpu(d))
>
>
> +
> +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"
> +
>  ## arm-unknown-linux-gnueabihf
>
> Thanks and BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
>
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#58599): https://lists.yoctoproject.org/g/yocto/message/58599
Mute This Topic: https://lists.yoctoproject.org/mt/95170677/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to