From nobody Fri Feb 11 21:53:44 2022 X-Original-To: freebsd-current@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 78FEB19AB5CF for ; Fri, 11 Feb 2022 21:53:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JwS7629s9z3r4W; Fri, 11 Feb 2022 21:53:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644616434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R/erRDxcI0T2XcRPY7Pe8OTC2ygXz1eyiI0el93LYG4=; b=c1JBWa43Mjbou2blrPgx/nuuMFhzykp+/vIu+tWhqqARXrMGwc3Tl9CZF08YLuAA9WBTyh lnUkGs9OiTThQcaoYmJThfRmYrc3msCOGHuSGpNMtRd16O9HuwbOx2PJkeOQm/dH3wAUQk 2p9GIufMH7CBv4TiKCZPctjlVt5dZIFqpcQ6+J0XE4CVklEUs9TJQog2gz6SAlUzuYY+TE +ZhwZascwpATgT7+Gag5dR3Ib4DghYdD9sdP6/fGckYy0oAiTR04GdQvYCmDq2ifrOaWyy DoacwFUyzoQ1rzRnnCbFf9oM6Bamxz4Rx7w49du4/X0gN7ag2m5m39fTNQ3klA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id E1BCE2042F; Fri, 11 Feb 2022 21:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 048E6828D; Fri, 11 Feb 2022 22:53:52 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_C838CBAE-215B-4700-85B0-EE5A0434FFAA"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: Buildworld fails with external GCC toolchain From: Dimitry Andric In-Reply-To: <20220212.050756.569441849093045289.yasu@FreeBSD.org> Date: Fri, 11 Feb 2022 22:53:44 +0100 Cc: freebsd-current@freebsd.org Message-Id: <116A6C73-6A06-4671-9C82-5D58A7F05018@FreeBSD.org> References: <20220212.050756.569441849093045289.yasu@FreeBSD.org> To: Yasuhiro Kimura X-Mailer: Apple Mail (2.3693.60.0.1.1) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644616434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R/erRDxcI0T2XcRPY7Pe8OTC2ygXz1eyiI0el93LYG4=; b=e0lKMwH2VZDd6lMu9/z35tbAss5w4ATtW+m/ePLSbECXzExYO/+7JpFPMDR45emUndqfwt lfQ0onttnuLr3umkjunTVkGqcfdOLJssa1SZSzxdAYJ1XtA6whUP8YDMif+H4Wz6SqDDrT qjXKnEsu+kdy8mE32BgvFpthOtALuZoDTwBdv1k0Y+Qoax2BIQ5zvouC+x0UW0jiuw+FlW 3tnNxNt5kh7JxoBDbXdto1ACXoCrdpem40JY0/WM+FdGl3BN1Svg6Girj45kwy8WXJfLpu Fjljz9H0dx86AEBcStQIbrK0+INajZ6L/U0yjHO5PQvuEYq+sg9u7i2mugsLew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644616434; a=rsa-sha256; cv=none; b=kMBde6/zkQJvBzhbxsmhsL/fdd8szv82snz5FxWhJNzg4GOHU+ES16Coc24gkAu790E4Jl +EMVxMWrBnU0ArdaE+U7WsWroqJOQtJqv0SN/5a5ISqPKP8J6Yo74vvwG7QSvK2xixqekY t/3/nmrrHPfmio17Li+1u/qmDFd1snfF4N3Hy8BPdleBN9GXq/yUJk48PzFG6qnqRRrsfD xJ8qK9k+bdUOnRPVJR1lQVtLc13lG/AwmsaM/nwTy1EUfPQoJcnvMe/5aNuk6AGUTV5NQC HHZsUxYapFVjkfJ1OC7zFlBNdA+HsxCdubazwAIS8DfCOAdaLPyYLTm/vJ1YHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_C838CBAE-215B-4700-85B0-EE5A0434FFAA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 Feb 2022, at 21:07, Yasuhiro Kimura wrote: >=20 > I'm tring to update devel/binutils port to 2.38. When it was updated > to 2.37.1, there was a suggestion that it should also be checked if > building base system with GCC succeeds as binutils is a part of > external GCC toolchain. So I'd like to do it with binutils 2.38 before > updating the port. And as a preparation for it, I tried building base > system with current external GCC toolchain (that is, with binutils > 2.37.1). >=20 > At first I read following wiki pages. >=20 > https://wiki.freebsd.org/ExternalToolchain > https://wiki.freebsd.org/ExternalGCC >=20 > Next I took following steps. >=20 > 1. Make clean install of 14-CURRENT amd64 with the install image of > 20220210 snapshot. > 2. Checkout latest main of src repository (d4b0fa45dc1 at that time). > 3. pkg install amd64-gcc9 > 4. cd /usr/src > 5. make -j 4 CROSS_TOOLCHAIN=3Damd64-gcc9 buildworld buildkernel >=20 > Then step 5 failed as following. >=20 > ---------------------------------------------------------------------- > --- all_subdir_rescue --- > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: nc.lo: in function = `_$$hide$$ nc.lo main': > (.text.startup+0xd42): warning: warning: mktemp() possibly used = unsafely; consider using mkstemp() > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: = /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libncursesw_real.a(lib_set_term.o= ): in function `_nc_setupscreen_sp': > /usr/src/contrib/ncurses/ncurses/base/lib_set_term.c:415: undefined = reference to `_nc_set_buffer_sp' > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: = /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libncursesw_real.a(lib_tstp.o): = in function `handle_SIGTSTP': > /usr/src/contrib/ncurses/ncurses/tty/lib_tstp.c:222: undefined = reference to `flushinp_sp' > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: = /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libncursesw_real.a(lib_getch.o): = in function `check_mouse_activity': > /usr/src/contrib/ncurses/ncurses/base/lib_getch.c:188: undefined = reference to `_nc_timed_wait' > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: = /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libncursesw_real.a(lib_getstr.o):= in function `wgetnstr': > /usr/src/contrib/ncurses/ncurses/base/lib_getstr.c:106: undefined = reference to `erasechar_sp' > /usr/local/bin/x86_64-unknown-freebsd14.0-ld: = /usr/src/contrib/ncurses/ncurses/base/lib_getstr.c:107: undefined = reference to `killchar_sp' > collect2: error: ld returned 1 exit status > *** [rescue] Error code 1 >=20 > make[5]: stopped in /usr/obj/usr/src/amd64.amd64/rescue/rescue > --- all_subdir_stand --- >=20 > make[2]: stopped in /usr/src > --- all_subdir_share --- >=20 > make[2]: stopped in /usr/src > --- all_subdir_rescue --- > 1 error >=20 > make[5]: stopped in /usr/obj/usr/src/amd64.amd64/rescue/rescue > *** [rescue] Error code 2 >=20 > make[4]: stopped in /usr/src/rescue/rescue > 1 error >=20 > make[4]: stopped in /usr/src/rescue/rescue >=20 > make[3]: stopped in /usr/src/rescue >=20 > make[2]: stopped in /usr/src > --- all_subdir_lib --- >=20 > make[2]: stopped in /usr/src > 167.49 real 492.07 user 94.42 sys >=20 > make[1]: stopped in /usr/src >=20 > make: stopped in /usr/src > ---------------------------------------------------------------------- >=20 > If I check commit messages of main branch over the last few months, I > can find some commits that fix warning message displayed by GCC. So > currently external GCC toolchain seems to work fine. Then what is the > cause of my build failure? Did I do something wrong? Not really, the gcc 9 build has been broken for months, as far as I = know. See also: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc9_build/ The last build(s) show a different error from yours, though: /workspace/src/tests/sys/netinet/libalias/util.c: In function 'set_udp': /workspace/src/tests/sys/netinet/libalias/util.c:112:2: error: = converting a packed 'struct ip' pointer (alignment 2) to a 'uint32_t' = {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned = pointer value [-Werror=3Daddress-of-packed-member] 112 | uint32_t *up =3D (void *)p; | ^~~~~~~~ In file included from = /workspace/src/tests/sys/netinet/libalias/util.h:37, from = /workspace/src/tests/sys/netinet/libalias/util.c:39: /workspace/src/sys/netinet/ip.h:51:8: note: defined here 51 | struct ip { | ^~ -Dimitry --Apple-Mail=_C838CBAE-215B-4700-85B0-EE5A0434FFAA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYgba6AAKCRCwXqMKLiCW o5DyAJwN/mcalzt1BHr2Nv77BQRVGaBXiACgxAXEaAFk1d62Z0ql05GYm8CARdk= =Gk3d -----END PGP SIGNATURE----- --Apple-Mail=_C838CBAE-215B-4700-85B0-EE5A0434FFAA--