From patchwork Sat Feb 23 16:11:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 1047409 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ginzinger.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 446Cyy50sJz9s9T for ; Sun, 24 Feb 2019 03:17:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C49E584C58; Sat, 23 Feb 2019 16:17:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kDTm-yTGwAQv; Sat, 23 Feb 2019 16:17:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9785B8266F; Sat, 23 Feb 2019 16:17:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BFD181BF2BF for ; Sat, 23 Feb 2019 16:17:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BCDC486CC5 for ; Sat, 23 Feb 2019 16:17:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LP95-iAV+SjC for ; Sat, 23 Feb 2019 16:17:02 +0000 (UTC) X-Greylist: delayed 00:05:31 by SQLgrey-1.7.6 Received: from mx-ginzinger.sigmacloud.services (mx-ginzinger.sigmacloud.services [185.154.235.147]) by whitealder.osuosl.org (Postfix) with ESMTPS id F06558364D for ; Sat, 23 Feb 2019 16:17:01 +0000 (UTC) Received: from [31.193.165.228] (port=53367 helo=mx-ginzinger.sigmacloud.services) by mx-ginzinger.sigmacloud.services with esmtps (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1gxZtd-00037Y-2b for buildroot@buildroot.org; Sat, 23 Feb 2019 17:11:25 +0100 Received: from martin-laptop.buero.ginzinger.com (10.10.1.120) by exc1.buero.ginzinger.com (10.1.1.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Sat, 23 Feb 2019 17:11:25 +0100 X-CTCH-RefID: str=0001.0A0B0209.5C7170AD.004C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 From: Martin Kepplinger To: Date: Sat, 23 Feb 2019 17:11:08 +0100 Message-ID: <20190223161108.22819-1-martin.kepplinger@ginzinger.com> X-Mailer: git-send-email 2.20.1 X-Originating-IP: [10.10.1.120] X-ClientProxiedBy: exc1.buero.ginzinger.com (10.1.1.204) To exc1.buero.ginzinger.com (10.1.1.204) X-EXCLAIMER-MD-ORIGINAL-SUBJECT: [NOSIG][NODISC][PATCH] make printvars: avoid invalid calls when arguments are missing X-EXCLAIMER-MD-CONFIG: 9dd172f7-de2e-4231-b886-ec11f46e03b3 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] make printvars: avoid invalid calls when arguments are missing X-BeenThere: buildroot@busybox.net 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: Martin Kepplinger Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" during "make printvars > compare" the following error occurs - reproducible after any "make *_defconfig": /bin/bash: support/dependencies/check-host-.sh: no such file or directory /bin/bash: -c: line 0: syntax error: ')' unexpected /bin/bash: -c: line 0: `set -e; TMP="$(mktemp)"; if () >/dev/null 2>&1; then echo ""; else echo ""; fi; which is 2 errors, resulting from $(1) arguments being empty, but called anyway. So this simply skips parts when otherwise we would exit when wrong scripts are tried be executed. When comparing the outputs, this _adds_ "host-tar host-xz" to all packages' *_DEPENDENCIES where until now only "host-lzip" is listed. Signed-off-by: Martin Kepplinger --- Hi, This has been reported by me and others before and this patch might as well _not_ be the real fix :) I guess $(1) should just never become empty in the first place, right? Anyways, I let you decide whether this fixes things (add host-tar dependency for every package) and how much sense this makes. Maybe you know what's going on. thanks, martin package/Makefile.in | 2 ++ support/dependencies/dependencies.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package/Makefile.in b/package/Makefile.in index dc818a2c18..f4f3864e8d 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -232,6 +232,7 @@ HOST_LDFLAGS += -L$(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) # Exit code chooses option. "$$TMP" is can be used as temporary file and # is automatically cleaned up. +ifneq ($(1),) try-run = $(shell set -e; \ TMP="$$(mktemp)"; \ if ($(1)) >/dev/null 2>&1; \ @@ -244,6 +245,7 @@ try-run = $(shell set -e; \ # Usage: HOST_FOO_CFLAGS += $(call host-cc-option,-no-pie,) host-cc-option = $(call try-run,\ $(HOSTCC) $(HOST_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) +endif # host-intltool should be executed with the system perl, so we save diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk index 4fac5c731b..45ecee0645 100644 --- a/support/dependencies/dependencies.mk +++ b/support/dependencies/dependencies.mk @@ -14,10 +14,12 @@ else # can be the candidate to be checked. If not present, the check-host-$(1).sh # script should use 'which' to find a candidate. The script should return # the path to the suitable host tool, or nothing if no suitable tool was found. +ifneq ($(1),) define suitable-host-package $(shell support/dependencies/check-host-$(1).sh $(2)) endef endif +endif # host utilities needs host-tar to extract the source code tarballs, so # ensure check-host-tar.mk is included before the rest include support/dependencies/check-host-tar.mk