From patchwork Mon Nov 21 12:31:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Belisko Marek X-Patchwork-Id: 15800 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 4E835C4332F for ; Mon, 21 Nov 2022 12:32:07 +0000 (UTC) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mx.groups.io with SMTP id smtpd.web11.37103.1669033925684775632 for ; Mon, 21 Nov 2022 04:32:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DULWLzaK; spf=pass (domain: gmail.com, ip: 209.85.167.41, mailfrom: marek.belisko@gmail.com) Received: by mail-lf1-f41.google.com with SMTP id s8so18588263lfc.8 for ; Mon, 21 Nov 2022 04:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=p8j6PTZZKn9fVUuCrO+Xygcs/j+Vo0S7VnlLI1/WzcY=; b=DULWLzaKNFFa7evfWJ1TjeNAYstPMateQLUMIlkblJksH0pcAfMsDCqc4RAoyoo07o eGHboiayxmh8v4PE1eIcthbwsQ9ugMseIXFL89yuN7MRKTv/u4ZNYQCm+XLh5fAdpD9Y k9ld5OFNXTVAy7N7zPsmYAubgf0e68Vy1ERYhaahha15iHvQWY98pS1PuLr9X2xwErMI kOx7UoGJbEdwCs3caPjC7QulylUaIqggUBE7hdO3KFCKzzgACLqSxVE+1IIgqX42ZU4s DV2AtF57hjh484aISCzsaKmELfdqeZJ2p532q88UhPSUtUtqZIArrPcCiChq9LfIzSEW rmpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=p8j6PTZZKn9fVUuCrO+Xygcs/j+Vo0S7VnlLI1/WzcY=; b=zRAhNArf7MGkTo6Tcf6MCtwmYwz06EeIhUp5JHl+A0CPianNWjpf7Lr+2YJwyXXi5a Z4qsiQFDofmVFdzYiPyI2B38Lmd+gHKtHcdfH/hR5feFBonFI04M2Z7Eiqx2YzXgiWKg UQlVy1maaQFYfgCo/O9MpTSdPHzcVO/VFw1hQglB8CN5R+/mHdtF6sseXtmgDCNfw9i2 AY7HJJ7EV0i6VjZJ8xMDG4AGBiDNZxrs5I9ukxcUWYYd1pTIKKOKrkBuxDHb+8FVGBkD eE72dDinTZb7Krt0QSvC/7KZzkcO4+DykC85Nf7HPtd8xoVfzQD/m9rhcSbBe//pua0W mooQ== X-Gm-Message-State: ANoB5pmf5wcJDAhOUSvZngJIjc1iZfOVzImf7IEtOqVcS8GFC+WzDPMx Pv4kRqJrIrcuBpofxVs99ZlJjT1v9k9b2o4KIru9AknQ X-Google-Smtp-Source: AA0mqf7CcG0oCmyjg/UXOPY2iprDINf9EmBYEfg5zluivf/ygks9RVef2IvhTA1MrRE2ZQ336lYz2qXAPqO97ZE85PA= X-Received: by 2002:ac2:4347:0:b0:4a4:782a:42ac with SMTP id o7-20020ac24347000000b004a4782a42acmr5545438lfl.468.1669033923044; Mon, 21 Nov 2022 04:32:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Belisko Marek Date: Mon, 21 Nov 2022 13:31:51 +0100 Message-ID: Subject: rust issue for armv6 in mainline poky To: Yocto 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, 21 Nov 2022 12:32:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/58598 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: 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): 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 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,