From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202412 header.b=CE04YOY4; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 40EE25A061E for ; Fri, 20 Dec 2024 02:13:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202412; t=1734657205; bh=fuIV5M1PZEikujIkSfxvcuAmmyKD1fWYVrPxELX1VZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CE04YOY4BZolCIjBEfa3n23mg1eE0fLnYKGWWYpuYF3Xc7aT0X+i3gd3rIH3ePSvC AHBnzeZ185fKOmGQih0q+sdX99xiIfAzCLT5KbwdvlcNcMUfKehrdDVLv9xoG6irRH FBMJ0/J52kJya+mgqj8U8z9t87Lihgn6y2MzvZMb+I8mbHmENJKiJ5cmFgsd6i3G3R kle7PZiuqF2jK+9kViM1Cv8l7+SgzoWREk9HcdawObIiMw72jnTP1d1MXP/yeFKmoI Jf7OtgdV1sqFLcrYyVUycdCr2dBAwFdbM9P20kT4GliSX/rqEEB6H5Bj5lU9KuevfL Eo5Mw22P+umeQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4YDqDP44Pzz4x07; Fri, 20 Dec 2024 12:13:25 +1100 (AEDT) Date: Fri, 20 Dec 2024 11:21:03 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] Makefile: Report error and stop if we can't set TARGET Message-ID: References: <20241219163634.1558544-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oQ3uH09onuSNArT4" Content-Disposition: inline In-Reply-To: <20241219163634.1558544-1-sbrivio@redhat.com> Message-ID-Hash: MNYLHUJ34NOPXAX5GV5XT5NFRQSCDYHY X-Message-ID-Hash: MNYLHUJ34NOPXAX5GV5XT5NFRQSCDYHY X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --oQ3uH09onuSNArT4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 19, 2024 at 05:36:34PM +0100, Stefano Brivio wrote: > I don't think it's necessarily productive to check all the possible > error conditions in the Makefile, but this one is annoying: issue > 'make' without a C compiler, then install one, and build again. >=20 > Then run passt and it will mysteriously terminate on epoll_wait(), > because seccomp.h is good enough to build against, but the resulting > seccomp filter doesn't allow any system call. Not really fun to debug. >=20 > Signed-off-by: Stefano Brivio Haven't hit that, but it does sound really annoying. Reviewed-by: David Gibson > --- > Makefile | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/Makefile b/Makefile > index 1fce737..464eef1 100644 > --- a/Makefile > +++ b/Makefile > @@ -16,6 +16,7 @@ VERSION ?=3D $(shell git describe --tags HEAD 2>/dev/nu= ll || echo "unknown\ versio > DUAL_STACK_SOCKETS :=3D 1 > =20 > TARGET ?=3D $(shell $(CC) -dumpmachine) > +$(if $(TARGET),,$(error Failed to get target architecture)) > # Get 'uname -m'-like architecture description for target > TARGET_ARCH :=3D $(firstword $(subst -, ,$(TARGET))) > TARGET_ARCH :=3D $(patsubst [:upper:],[:lower:],$(TARGET_ARCH)) --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --oQ3uH09onuSNArT4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdkuFUACgkQzQJF27ox 2Gecqg/+KMEjPH+QIKVdONj6FkaqenUoSuBUNQQOFkI5mOHegZPFGDcQkDRp6IGH pKsDF+4A68BgtQYWxz2/Rm3j78YEhGFNIqDdxACdi3pVFusBB8IsuZWZULNgWe5p jSydBQ+x+432/4sBdnVta1sTNcIve18nvgngqyYAOQkR4c8Rcwr5/lYn66U+Fo0K 77vBYmeDHVIBIoT+NsalSM+eD82PFCUYMF+ACWd46aEed+AZdvUYwXrsiJquv6bm CWwud4HCjrK/Lyi2Q/mrpWcHg7G3y9hHoXjKCCmNqzDeDwgFqsv10am2zFR40lOJ 3vr8xdKaQ8WLvVsyz9m2h6Iy2NRSj8Dzz7jPCF8G90GsiJO/7IrHZ7ElkQHFGIvK m4UfTvPSdfkzlrjqwWOusuSEnZygTLQBhhY3QJ4ykGnroFNnM9D1YBHdabB3R92L K5BZ0dZFhw3uT20A7B5zS0Lpq7v04A7o/hQtcdfPHFSEABrH6XxTVnvMBvKfDeO2 V7w+BKF+3TDmhLW1L8hMr7tSD9WugNg5fmH0Dff89rEDmPo7Luw5ykSkN9YNwQrG HNJoCdRJknK8es7hqMKgYITIFg3le186lW2DNipPgzWcFTVe8GlJhWeFnrvNrm/F D0xxyzN0n0E7wtDM6ilVJcFRkvT0jjBui3QMkxYdBa9fcbSoaO8= =neN3 -----END PGP SIGNATURE----- --oQ3uH09onuSNArT4--