From nobody Thu Oct 13 20:06:28 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MpLBY0ygBz4fXVD for ; Thu, 13 Oct 2022 20:06:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MpLBX734mz41tf for ; Thu, 13 Oct 2022 20:06:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MpLBX61v4zXbn for ; Thu, 13 Oct 2022 20:06:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 29DK6SNK048489 for ; Thu, 13 Oct 2022 20:06:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29DK6SLm048488 for bugs@FreeBSD.org; Thu, 13 Oct 2022 20:06:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 267026] stable/13 toolchain regression in for native-xtools build, builds wrong target for nxb-bin compiler, breaking poudriere+qemu for cross-arch build Date: Thu, 13 Oct 2022 20:06:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: regression, toolchain X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mandree@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665691589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcpKxftJ8BvEI/ptMP+O2fdsQ6DUKwkC9oZMHieDTco=; b=xiZS7oka5i+YKNiVti8o/4ySKjfiEbGSmTklF9fOxXYRQNwTrzQpC7wAVNxcSzg/AXPYCj j9R10cjqSuYKHS5GE6WD5hjIVIk+Ktvc/rGz+3YQ19X/XsY1Y3BKlj8x9gOLLXPCr+uXII Vxn5ttQAwYtgC5W8RTN0ZVO+BN9C8LssnlrAyWTNkIAky0rA8bfKnNX4pC5XEBgcdjvBOm xF/b+DGpWOpOJ/P4MglNtnr7ALeX6BL+R8CEOTJWDxCy2b9ajgmqk5uHgDmPc2Ni78iw0G 86Mxh2EQteTKKSbM3efdYbsbE8BL8S8YYIwdsJlCQTlOg38tGBKqLRM3Gh6OVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665691589; a=rsa-sha256; cv=none; b=XhJ/iQr57S3AuWW2AoRQYm3p+fn/uR0DgmhRfLs2PuR2i04cncIHh+2uHmWG58N9KhltCn zr0fagbZ6591JwitOWEPzwBXofzlDIQcO/QUmBKHspHUTGS//dy0mCFg7cgnDdxgW6vi2d ENwzLqX4W+Q9coPZOr9S+dMOYs+61Y0ByHKzNVa6YMTUaoIOBoDRw/HnsX3qsNh3jXei97 kGLuw2VvjEMPSNjFyucmxIuZSN22mudV33JXekgCrHRgDVobVRAcexsTzBSHeZ4e6dcSux oMRE4mzAmOIahAy8WxriKufWUDm6uqpmY61Lgoqj6L0bWC84WfeypbqhjtAeHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267026 Bug ID: 267026 Summary: stable/13 toolchain regression in for native-xtools build, builds wrong target for nxb-bin compiler, breaking poudriere+qemu for cross-arch build Product: Base System Version: 13.1-STABLE Hardware: Any OS: Any Status: New Keywords: regression, toolchain Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: mandree@FreeBSD.org CC: bsdimp@FreeBSD.org, dim@FreeBSD.org, kevans@freebsd.org Created attachment 237276 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D237276&action= =3Dedit Bourne sh script used as probe in git bisect run I am trying to set up a FreeBSD 13.1+ poudriere builder that cross-builds on amd64 targetting arm64.aarch64. Observe that poudriere-devel installs the native-xtools toolchain into the jail's nxb-bin directory unless this is suppressed with -X. This is, in my case, an amd64 executable compiler targetting (generating) aarch64 code. Or should be. Symptom is that on the very first poudriere build, the pkg build bombs out claiming that it cannot find a suitable compiler for bootstrapping jimsh0 as tclsh surrogate, and that it failed to find one, having tried /nxb-bin/usr/bin/cc and gcc. 13.1-amd64 doesn't bring gcc, so that must fa= il, and /nxb-bin/usr/bin/cc fails because although it SHOULD target aarch64, it does target amd64, so pkg's configure script rejects it and errors out. kevans91 reported on IRC this got fixed in https://cgit.freebsd.org/src/commit/Makefile.inc1?h=3Dstable/13&id=3D3afe1c= 2e181712afd0120e14267f92050de434f7 and I can confirm that. stable/13's tip when I started "git bisect" had gone bad again, and it was = git commit hash 6094749. Now, this was easily detectable and scriptable, so I could do a 1-day-long = git bisect run, and it came up with: ---------- 70c04943208fd5441024d0cf6e0486ea4bfb0f4e is the first bad commit commit 70c04943208fd5441024d0cf6e0486ea4bfb0f4e Author: Dimitry Andric Date: Sun Aug 14 13:10:48 2022 +0200 Avoid using TARGET_ARCH in llvm.build.mk Apparently the TARGET_ARCH macro is not supposed to be used outside of the top-level Makefiles. Directly use MACHINE_ARCH instead. Noticed by: imp, jrtc27 MFC after: 1 week (cherry picked from commit 8534e6be8110a8126268a38dc0557a2d15615ce9) lib/clang/llvm.build.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------- This is the full git bisect log: # Status: warte auf guten und schlechten Commit # bad: [38b1cbc87b5faefec38a81c4487877fde778be20] usb(4): Make the enumerat= ion thread nice time a variable. git bisect bad 38b1cbc87b5faefec38a81c4487877fde778be20 # Status: warte auf gute(n) Commit(s), schlechter Commit bekannt # good: [d9da2f90cbec9b3c4777bd12671e2f837907ff5a] loader: Relax the check = in is_kernphys_relocatable() git bisect good d9da2f90cbec9b3c4777bd12671e2f837907ff5a # bad: [8d6d90d939950d0e0ec5e52f4883cac41d0e20dc] pkg(8): Remove a double w= ord in a source code comment git bisect bad 8d6d90d939950d0e0ec5e52f4883cac41d0e20dc # good: [a2acdcb602ddd69aa332c0b7ef41276c9e9b596b] find.1: Correct the mark= up git bisect good a2acdcb602ddd69aa332c0b7ef41276c9e9b596b # bad: [623220ac78e1733204de6859352aa968ca3615ab] sleepq_check_ast_sc_locke= d(): update comment git bisect bad 623220ac78e1733204de6859352aa968ca3615ab # good: [c9f9dc96d9089d250f4aba9bab4d2acea9b7acf2] installworld: improve portability of ldd use git bisect good c9f9dc96d9089d250f4aba9bab4d2acea9b7acf2 # bad: [94c282b1eff460c0c5d2275c84dafbd5322a9f23] Adjust function definitio= n in arm's dtrace_subr.c to avoid clang 15 warning git bisect bad 94c282b1eff460c0c5d2275c84dafbd5322a9f23 # good: [f7cb47731675828d27ebd55c9fc46953ee168d48] contrib/tzdata: import tzdata 2022b and 2022c git bisect good f7cb47731675828d27ebd55c9fc46953ee168d48 # good: [d58ced88d39f0169a3fa08e8e626870131cee90f] prometheus_sysctl_export= er: ignore ENOENT for mibs specified on the CLI git bisect good d58ced88d39f0169a3fa08e8e626870131cee90f # bad: [70c04943208fd5441024d0cf6e0486ea4bfb0f4e] Avoid using TARGET_ARCH in llvm.build.mk git bisect bad 70c04943208fd5441024d0cf6e0486ea4bfb0f4e # good: [baa6a68cbe47b257c771e9b7f7254750df46bd3f] ip6(4): document IP_ORIGDSTADDR git bisect good baa6a68cbe47b257c771e9b7f7254750df46bd3f # good: [3c87f145d4e82c26b8dd73274831f9ce6a9c7a16] pfctl: fix FOM_ICMP/POM_STICKYADDRESS clash git bisect good 3c87f145d4e82c26b8dd73274831f9ce6a9c7a16 # first bad commit: [70c04943208fd5441024d0cf6e0486ea4bfb0f4e] Avoid using TARGET_ARCH in llvm.build.mk (sorry that it had put the log down in German) and the test script I used for git bisect run is attached, for posterity. --=20 You are receiving this mail because: You are the assignee for the bug.=