From nobody Mon Mar 06 17:12:15 2023 X-Original-To: freebsd-ports@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 4PVlWM1tcJz3w7gb for ; Mon, 6 Mar 2023 17:12:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PVlWL6bbvz4411 for ; Mon, 6 Mar 2023 17:12:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678122749; bh=Y6JJ1BQPN6x7KQlLPihHC43zobdt+bjD9YfXxNnWLT8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=jNQQZstAuGWJL+boJBNrI5ro8utXm53ruwdWIVz4zBW3nVrRfjYkBEU8XEOxHhOl4JzbYTvv+lmVYXZPL8209bk6FjTFmgl5Exwk1jr8a3L4IPscPi3/Nuy72QuYByXsqULFzeUYTIhoVxKtes2Se6/Aq73pQ2BS5QS8sWV9u9TJNN5KnjxsocCFMzHOwbPf4kcfS8ArD/eGmmVyagRQTno3Tmkb8KwoqYESNPNhv8Cya6DWb0e/r1nzkF/yhezwTcb1RsJOByjmiYqkG6/HMQHbna2Oymduzsis1A14T5T0plBsipHNo472rpQFHAS9UNN8WGVDWjTCT5GpyJBtTQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678122749; bh=0ffCZzwvS1WL2O4oExFeY+bfPvv1rOs2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xnRHmXmxBx5RDboZzzeqOmWhsdRxb31hW6uD6V8umOm 3ZxC3E5UHurqdPUQErmqScdqZq8dyU.i9rJ_QQmEYQtZu5rXF0gUI0No8IAN_JfvKtFV8YrCEb7A BIqqAW2HVbvlr7qYlGIXf552CUEw7dbBjVU7V4UkQPCj.NyGAaOK2WUymT738c6yorqNah0L9FkT D2B411.0Z2fhMMAJh1sDnNpKQ2IjD7MQ0Kl_2gY2aLJ54k8GZKNmD.JJ.S.f830A_aPERkwgEC2B BmU1EAn_zlWs3BzmKbA8T6R_C1TJ_VhIZQK2l20SOEaqB1dKc7SsbO44czJTa1BHTh9FLN1omeV6 g4gO9Ft3eYgDit.46tKZDHP0BDzSsq..SJ5g9S3py8XlsPhYgHXnbWpc1YSF43FSgQCcL4YqbdQ1 pKng6BxrA913rP3gqVhz6AmNtFndTsda9RKbMGwRlVbCGaLx3xMZ7ne00pxNFCgIzMTPsQ_yqNfl JnChZ03Nidqc54bN5erVfTI9wOgVnyKUetAXrw64uvEhJqes_AVCOZ3EgZQaK_FEWlJxlCqarWNe G X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Mon, 6 Mar 2023 17:12:29 +0000 Received: by hermes--production-gq1-6cf7749bc8-bjcvs (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b9a4dcc4f32589723f2e2dcfbe44f596; Mon, 06 Mar 2023 17:12:26 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: armv7 lang/gcc12 "no bootstrap" build via system clang 15.0.7 based poudriere build ends up stuck in a small loop From: Mark Millard In-Reply-To: <2HOLCFE6Z_cOyGycU4ZBU7Lf6kcqohVx7tiLiRLzdjMEc6a8DFeH1IaJqdPNJOqFVTh1MGE7_UUJLcg2gg0UbTZIHZl72NbaNEsqrJwJ3xA=@lorenzosalvadore.it> Date: Mon, 6 Mar 2023 09:12:15 -0800 Cc: Brooks Davis , "salvadore@freebsd.org" , FreeBSD Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <93707ED2-F529-49DE-A018-794827F56247@yahoo.com> References: <2HOLCFE6Z_cOyGycU4ZBU7Lf6kcqohVx7tiLiRLzdjMEc6a8DFeH1IaJqdPNJOqFVTh1MGE7_UUJLcg2gg0UbTZIHZl72NbaNEsqrJwJ3xA=@lorenzosalvadore.it> To: Lorenzo Salvadore X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Rspamd-Queue-Id: 4PVlWL6bbvz4411 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Mar 6, 2023, at 08:37, Lorenzo Salvadore = wrote: > ------- Original Message ------- > On Monday, March 6th, 2023 at 9:46 AM, Mark Millard = wrote: >=20 >=20 >>=20 >>=20 >> Under main that has clang 15.0.7, I've had to locally >> switch to using the likes of: >>=20 >> OPTIONS_DEFAULT_armv7=3DSTANDARD_BOOTSTRAP >>=20 >> (to express it in Makefile terms) for lang/gcc12 in order >> to avoid the following. >>=20 >> The no bootstrap build ends up stuck in small loop in partition_union >> (in cc1): >>=20 >> (gdb) info threads >> Id Target Id Frame >> * 1 LWP 632886 of process 27787 0x016eb82c in partition_union () >> (gdb) bt >> #0 0x016eb82c in partition_union () >> #1 0x0133e6ec in var_union(_var_map*, tree_node*, tree_node*) () >> #2 0x013218e4 in attempt_coalesce(_var_map*, ssa_conflicts*, int, = int, __sFILE*) () >> #3 0x013203d0 in coalesce_ssa_name(_var_map*) () >> #4 0x012c66b4 in rewrite_out_of_ssa(ssaexpand*) () >> #5 0x0082c094 in (anonymous = namespace)::pass_expand::execute(function*) () >> #6 0x00fd6ff0 in execute_one_pass(opt_pass*) () >> #7 0x00fd8380 in execute_pass_list_1(opt_pass*) () >> #8 0x00fc6df0 in execute_pass_list(function*, opt_pass*) () >> #9 0x00880c20 in cgraph_node::expand() () >> #10 0x00882d10 in symbol_table::compile() () >> #11 0x00883454 in symbol_table::finalize_compilation_unit() () >> #12 0x0120e204 in compile_file() () >> #13 0x0120d9d4 in toplev::main(int, char**) () >> #14 0x01646c28 in main () >> (gdb) finish >> Run till exit from #0 0x016eb82c in partition_union () >>=20 >> It never exits. I've walked through the short loop that ends >> up with data that leads to no progress: bne always taken and >> reaches a status of no change in the values involved happens >> in the loop. >>=20 >> truss shows no output and no subroutines are called in the >> few instruction long loop. >>=20 >> I ran multiple tests of "no bootstrap" and all failed the >> same way. >>=20 >> Such would not be a good thing for the FreeBSD armv7 package >> build server. >>=20 >> Also seen via lldb: >>=20 >> (lldb) bt >> * thread #1, name =3D 'cc1', stop reason =3D signal SIGSTOP >> * frame #0: 0x016eb82c cc1`partition_union + 152 frame #1: 0x0133e6ec = cc1`var_union(_var_map*, tree_node*, tree_node*) + 104 >> frame #2: 0x013218e4 cc1`attempt_coalesce(_var_map*, ssa_conflicts*, = int, int, __sFILE*) + 508 frame #3: 0x013203d0 = cc1`coalesce_ssa_name(_var_map*) + 7240 >> frame #4: 0x012c66b4 cc1`rewrite_out_of_ssa(ssaexpand*) + 2020 frame = #5: 0x0082c094 cc1`(anonymous = namespace)::pass_expand::execute(function*) + 68 >> frame #6: 0x00fd6ff0 cc1`execute_one_pass(opt_pass*) + 616 frame #7: = 0x00fd8380 cc1`execute_pass_list_1(opt_pass*) + 44 >> frame #8: 0x00fc6df0 cc1`execute_pass_list(function*, opt_pass*) + 40 = frame #9: 0x00880c20 cc1`cgraph_node::expand() + 324 >> frame #10: 0x00882d10 cc1`symbol_table::compile() + 3860 frame #11: = 0x00883454 cc1`symbol_table::finalize_compilation_unit() + 300 >> frame #12: 0x0120e204 cc1`compile_file() + 236 frame #13: 0x0120d9d4 = cc1`toplev::main(int, char**) + 7028 >> frame #14: 0x01646c28 cc1`main + 48 frame #15: 0x004ad3f0 = cc1`__start(argc=3D31, argv=3D0xffffadec, env=3D0xffffae6c, = ps_strings=3D, obj=3D0x4181e004, cleanup=3D0x417ed4d8) at = crt1_c.c:92:7 >>=20 >>=20 >>=20 >> The armv7 STANDARD_BOOTSTRAP change lead to it reaching completion. >>=20 >> But the "no bootstrap" issue suggests that system-clang 15.0.7 >> has a problem for armv7 targeting. (I've not seen problems for >> targeting aarch64 or amd64.) >>=20 >>=20 >> For reference: >>=20 >> # uname -apKU >> FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #88 = main-n261230-e78dc78e517a-dirty: Wed Mar 1 16:17:45 PST 2023 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm armv7 1400081 1400081 >>=20 >> via: >>=20 >> # poudriere jail -l >> JAILNAME VERSION ARCH METHOD TIMESTAMP PATH >> . . . >> main-CA7 14.0-CURRENT arm.armv7 null 2021-06-27 17:58:33 = /usr/obj/DESTDIRs/main-CA7-poud >> . . . >>=20 >> on an aarch64 system, no qemu involved (or even installed): >>=20 >> # uname -apKU >> FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #88 = main-n261230-e78dc78e517a-dirty: Wed Mar 1 16:17:45 PST 2023 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400081 1400081 >>=20 >> (It is a 16 Cortex-A72 HoneyComb.) >=20 > Thanks Mark. >=20 > I guess cases like this are one of the reasons for bootstrapping = existence: > compilation with clang on armv7 probably is not the tipical case, so = it > does not work so easily as using GCC on amd64. Good that it works at = least > with bootstraping. >=20 > Now, I would like to suggest a few more experiments: Some of the below have a partial answer from the fact that the FreeBSD package builder system for armv7 is still running system-clang 14 (main) or 13 (13.1-RELEASE) and does not yet see the problem. (The build server's actual kernel vintage should not be an issue to worry about.) Nor did it have problems in the past building lang/gcc12. This is a new issue. > - does the compilation work without bootstrapping with = lang/gcc13-devel? >=20 > - does the compilation work without bootstrapping with a higher = version > of clang (we have devel/llvm16 in the ports tree, which tracks a = pre-release)? >=20 > - does the compilation work without bootstrapping on a release version = of > FreeBSD? That is an example were the 13.1 based package builds on the system used for armv7 builds did/does not have problem. Nor do the main system-clang 14 based builds. > - does the compilation work without bootstrapping using Linux instead > of FreeBSD? I'm not well set up for that kind of experiment. > You might want to open a bug report, but you should try to understand > first what is the component that causes the issue and if replacing = anything > with something newer (where the bug might be already fixed) or with > something supported (since FreeBSD CURRENT is under development, we > might have regressions) solves the problem. It is already known to be a regression compared to system-clang 14 and 13 based builds. No clue yet for llvm16 based. (I've separate notes out about building llvm16 for aarch64 needing a Makefile fix.) > If you find that the cause is in the FreeBSD GCC port(s), then please > open a bug report on bugzilla so that I can keep track of it and other > users with the same problem can find it there as well. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com