From patchwork Thu May 8 16:13:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 62623 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 F1161C3ABC0 for ; Thu, 8 May 2025 16:14:25 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web10.108.1746720858451156772 for ; Thu, 08 May 2025 09:14:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=FXD1BjGM; spf=pass (domain: smile.fr, ip: 209.85.128.46, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43edecbfb94so12273295e9.1 for ; Thu, 08 May 2025 09:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1746720855; x=1747325655; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rQWaRCk4nv56pFPLbbPlmmZNIO5elOi2w+Hjfzx8rdc=; b=FXD1BjGMwD7o1EcOwAXXKsKqE5XHKBk9LADN7/hVEw5CPwAnrQ7NbDPuXdyw0rbWni MwJAUs5If7F3osXeW4dBC+76Ib6thAlQmkET4T4SM23wH5QhBzJmH4Pn27y1eALoMQrT /dhioJD45YtD8SuNfWN24hcY6BwRSI7L8Ei4o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746720855; x=1747325655; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject: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07H9g== X-Received: by 2002:a05:6000:1acb:b0:391:13d6:c9f0 with SMTP id ffacd0b85a97d-3a1f64978f0mr89744f8f.47.1746720855600; Thu, 08 May 2025 09:14:15 -0700 (PDT) Received: from P-ASN-ECS-830T8C3.home (2a01cb001331aa0087b736f9b546e683.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:87b7:36f9:b546:e683]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a1f57ddff6sm405371f8f.12.2025.05.08.09.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 May 2025 09:14:15 -0700 (PDT) From: Yoann Congal To: openembedded-devel@lists.openembedded.org Cc: Yoann Congal Subject: [meta-oe][PATCH] mozjs-128: inherit cargo to fix build on rustup systems Date: Thu, 8 May 2025 18:13:53 +0200 Message-Id: <20250508161353.903041-1-yoann.congal@smile.fr> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 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 ; Thu, 08 May 2025 16:14:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/117366 From: Yoann Congal mozjs build uses cargo deep in the build tree. The configure step tries to find the cargo home and forcibly start with the home rustup directory (~/.cargo) when not found. This leads to the build partially using rustup cargo and to a build error when this cargo version is not compatible with the OE-Core one. To fix this, inherit cargo to inherit a working cargo environment (e.g. CARGO_HOME). But, override do_compile to keep the previous (base/Makefile) task. Signed-off-by: Yoann Congal --- meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb index 6bcbb13501..c3804ec64d 100644 --- a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb +++ b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb @@ -24,7 +24,7 @@ UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" S = "${WORKDIR}/firefox-${PV}" -inherit pkgconfig perlnative python3native rust +inherit pkgconfig perlnative python3native rust cargo DEPENDS += "zlib cbindgen-native python3 icu" DEPENDS:remove:mipsarch = "icu" @@ -83,6 +83,13 @@ do_configure() { } do_configure[cleandirs] += "${B}" +# The main build system is a Makefile that call cargo downstream. +# We inherit cargo to get the environnement but need to switch back to +# base_do_compile to do the Makefile base compilation. +do_compile() { + base_do_compile +} + do_install() { oe_runmake 'DESTDIR=${D}' install }