From nobody Thu Apr 14 05:32:44 2022 X-Original-To: ports-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 33F0A1B3C87C for ; Thu, 14 Apr 2022 05:32:45 +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 4Kf7QP0Cz5z3Bw3 for ; Thu, 14 Apr 2022 05:32:45 +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 DC6D61A7EA for ; Thu, 14 Apr 2022 05:32:44 +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 23E5Wiwq075813 for ; Thu, 14 Apr 2022 05:32:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23E5Wish075812 for ports-bugs@FreeBSD.org; Thu, 14 Apr 2022 05:32:44 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: ports-bugs@FreeBSD.org Subject: [Bug 263271] lang/gcc11: After switching to LTO bootstrap, build of editors/emacs-devel fails with segmentation fault if NATIVECOMP option enabled Date: Thu, 14 Apr 2022 05:32:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yasu@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649914365; 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=VHg3Z28YzxwIeuon5Qr5JK9q5CORFbP9km5TZFpDaTQ=; b=XnSzu6kboWtyZ3PMhDL2irBt72yIpWRNmM+1JOETfJRY6MkuyUxtWCAAYH3WybKQ43ersO I+/AKQsxWdpyJBymVtBuTQbAiTW5ulGfDXjgNoTIZZBviuHGrDE99wzZczkzx5I8f5xULe uGoIhkwV8lOPRNEm7IJVAQzzbVEdpb7ja+6n2ZLfhjj+egHyXDntuDc6YFLJd6ImbzJ7Pl ADMP5o/lT0gC7sg78lJ8Yq0R59TZfjW8tCYvK55CWM4n3VhvdAulf0VplfIIC3yag1rNAn 4QJO/6ngP469Jx30128nebAReXZ6H5RBXCmmNZCfRoSA12HCixIYZf9qVQV98g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649914365; a=rsa-sha256; cv=none; b=RmYbfDsFsvx0NPRn8OxeCLE3J3SUtZ9oJXRg599ec3U4xKV0P9VjO35PaOxlWitClFRhGw kM0WMLwekJ7rtdGXYqvAwKrnMCyb8WuOmfZ806XQyndspa40ybwuf0ui3a9IoVzXIY9I5h JyLDTZO/DdBBQlabnaegkHKqO7D5gzOBYhvBV6mc4S58EY2t4Y9tqluMv26BRNB7nD4lIp TTqX3EwAL1ejQwwhioD/07smFqVVmWk9DuZRz1J0ci+sOI0awaIbL5bFiMfSO/+i2JaQlW /wvwEM6FKhPHKPsz5ZbJOh19iDSP/bdzbpyys3zU0tPQm+CvZFY7riM82857jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263271 Bug ID: 263271 Summary: lang/gcc11: After switching to LTO bootstrap, build of editors/emacs-devel fails with segmentation fault if NATIVECOMP option enabled Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: yasu@freebsd.org CC: emacs@FreeBSD.org, pkubaj@FreeBSD.org, toolchain@FreeBSD.org 1. Since 28.x Emacs supports native compilation. 1.1. While byte compilation converts source code of emacs lisp to byte code independent from HW and/or OS, native compilation converts it to native cod= e of the platform on which Emacs runs. 1.2. Emacs uses libgccgit of GCC to do native compilation. 1.3. Emacs provides two ways for native compilation. One is just-in-time way that is done first time when source file (.el) is loaded. The other is expl= ict way that is done by invoking emacs lisp function that do native compilation. 2. Native compilation is enabled when Emacs is built 2.1. It is enabled by passing '--with-native-compilation' option to configu= re script. 2.2. At the moment, it is off by default. 2.3. The way is also provided to native compile and install all emacs lisp files included in source tree. 3. NATIVECOMP option was added to editors/emacs-devel in June 2021. 3.1. It is off by default. 3.2. If it is enabled, all .el files included in source archive are native compiled and installed. 3.3. Currently lang/gcc11 is used to support native compilation as there is= a note as following in the document of GCC 10 and before: "Note that libgccjit is currently of =E2=80=9CAlpha=E2=80=9D quality; the A= PIs are not yet set in stone, and they shouldn=E2=80=99t be used in production yet." 4. With the latest ports tree build of editors/emacs-devel fails if NATIVEC= OMP option is enabled. 4.1. It fails with segmantation fault of emacs while native compiling 'emoji.el' as following. https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/130amd64-default-= emacs/2022-04-12_17h00m39s/logs/emacs-devel-nox-29.0.50.20220331_1,2.log 4.2 I faced the failure when I updated ports tree from ports 9aa49f27ffd0 (committed on April 7) to ports 7f2e164a4b3b (committed on April 12). 4.3. According to the result of `git bisect`, the build failure happens with following commit and after. ---------------------------------------------------------------------- commit 2f6be9fb8281 Author: Piotr Kubaj AuthorDate: Mon Apr 11 10:46:01 2022 +0000 Commit: Piotr Kubaj CommitDate: Mon Apr 11 10:46:01 2022 +0000 lang/gcc11: switch gcc11 to LTO bootstrap lang/gcc11-devel with LTO builds fine on the cluster, switch lang/gcc11= as well. ---------------------------------------------------------------------- 5. The cause of the build failure seems to be bug of lang/gcc11 about LTO 5.1 If I revert the commit above then build completes successfully. 5.2. I modified Makefile of editors/emacs-devel so it uses lang/gcc12-devel. Then build completes successfully. 5.3. I also modified the Makefile so it uses lang/gcc11-devel. In this case build fails with same error. Next, I updated lang/gcc11-devel to the 202204= 09 snapshot of GCC 11.2.1. Then build completes successfully. --=20 You are receiving this mail because: You are the assignee for the bug.=