From patchwork Wed Aug 28 12:44:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TIAN Yuanhao X-Patchwork-Id: 1977862 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wv3zz2FM1z1yXd for ; Wed, 28 Aug 2024 22:45:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 71163400D1; Wed, 28 Aug 2024 12:45:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jc5XZ5zEzpUc; Wed, 28 Aug 2024 12:45:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 288CE4029B Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 288CE4029B; Wed, 28 Aug 2024 12:45:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 32B3A1BF83A for ; Wed, 28 Aug 2024 12:45:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1ECE940688 for ; Wed, 28 Aug 2024 12:45:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6Pbk7me9VMZX for ; Wed, 28 Aug 2024 12:45:44 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=220.197.31.4; helo=m16.mail.163.com; envelope-from=tianyuanhao3@163.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 2ED5440663 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2ED5440663 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by smtp4.osuosl.org (Postfix) with ESMTP id 2ED5440663 for ; Wed, 28 Aug 2024 12:45:42 +0000 (UTC) Received: from ubuntu.localdomain (unknown [223.102.86.110]) by gzga-smtp-mta-g3-3 (Coremail) with SMTP id _____wDn74DsG89msiu4Ag--.34232S2; Wed, 28 Aug 2024 20:45:33 +0800 (CST) From: TIAN Yuanhao To: buildroot@buildroot.org Date: Wed, 28 Aug 2024 05:44:40 -0700 Message-ID: <20240828124440.3882-1-tianyuanhao3@163.com> X-Mailer: git-send-email 2.44.1 MIME-Version: 1.0 X-CM-TRANSID: _____wDn74DsG89msiu4Ag--.34232S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WF13Zw1xWrWDZryrCFW5Awb_yoW8tryDpa ya9wnI9Fy8KrW8trWkWrnakFy5Ka4vqr4Fg3WkJ3Z0yw13Jr4IvanFkF15XFy3Gw48A3y5 ZF129rZrG3yUAFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRHa0gUUUUU= X-Originating-IP: [223.102.86.110] X-CM-SenderInfo: xwld05xxdqxtjrt6il2tof0z/1tbiXQ9JjWXAm+T+4gAAsQ X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=7tsef /2Fs14rxTHYCDY53EtVm+aGDtxMKg5QDvFF+zY=; b=DJ0pBrCoseyu9R+8vEF+u uW438QiRr+zV4LyO0JC7xVBP0NHna0qi0/AjyN668lhHFBHfWbe5Za0jU4c1KB3v u10GehvanyAcn6VGMnBY3k2wQnLR9DCU5ECdA9rVwyShocuEh1cm77DG/aiTV3B6 t9uCawzjnWtapoejHaW4VQ= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=163.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=DJ0pBrCo Subject: [Buildroot] [PATCH 1/1] Makefile: move 'ppd-fixup-paths' to 'host-finalize' X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TIAN Yuanhao , James Hilliard , Thomas Petazzoni , Brandon Maier Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" When using 'per-package', some python shebang in the host directory will point to the per-package directory. However, the python modules that are runtime dependencies will not be rsynced to the corresponding per-package directory, which may cause the python script to fail to find the python module. For example, when enabling BR2_PER_PACKAGE_DIRECTORIES and BR2_PACKAGE_HOST_BMAP_TOOLS, the following error will occur: ModuleNotFoundError: No module named 'six' output/host/bin/bmaptool detects the presence of host-python-six in output/per-package/host-bmap-tools/host. However, host-python-six is not a required compile-time dependency for host-bmap-tools. Therefore, it will not be rsynced to output/per-package/host-bmap-tools/host, but only to output/host. This is the reason for the error. Move the 'ppd-fixup-paths' to 'host-finalize' to allow the host python script to search for python modules in output/host. Signed-off-by: TIAN Yuanhao Cc: Brandon Maier Cc: James Hilliard Cc: Thomas Petazzoni --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 55aeafde23..f1fc3a4a52 100644 --- a/Makefile +++ b/Makefile @@ -604,7 +604,6 @@ prepare-sdk: world PARALLEL_JOBS=$(PARALLEL_JOBS) \ PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \ $(TOPDIR)/support/scripts/fix-rpath staging - $(call ppd-fixup-paths,$(BASE_DIR)) $(INSTALL) -m 755 $(TOPDIR)/support/misc/relocate-sdk.sh $(HOST_DIR)/relocate-sdk.sh mkdir -p $(HOST_DIR)/share/buildroot echo $(HOST_DIR) > $(HOST_DIR)/share/buildroot/sdk-location @@ -722,6 +721,7 @@ STAGING_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-staging.t host-finalize: $(PACKAGES) $(HOST_DIR) $(HOST_DIR_SYMLINK) @$(call MESSAGE,"Finalizing host directory") $(call per-package-rsync,$(sort $(PACKAGES)),host,$(HOST_DIR),copy) + $(call ppd-fixup-paths,$(BASE_DIR)) .PHONY: staging-finalize staging-finalize: $(STAGING_DIR_SYMLINK)