From nobody Thu Apr 14 05:32:44 2022 X-Original-To: toolchain@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 20AF71B3C9C7 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 4Kf7QN6qjcz3CFx for ; Thu, 14 Apr 2022 05:32:44 +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 CAEBF1AA27 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 23E5Wim4075809 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 23E5Wiek075808 for toolchain@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: toolchain@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: CC 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: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@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=LSf6v5NERMdrQitEfkc9qifpxAfBnZFVoXJtmGOX+Mk=; b=slhvlvlihnM5/qchVrvyzW0UThTD2AeKx39jaO042KxJCn0G9/lTINK5FI4uqGopBHnBH2 j6umYbXY7K8phxW/njRIQDPgYwIQ3eknGttg+PkuY0EtXS0cIBR7ATX1/kEZQrwPVTeGme JMDtl26ylFeWTRtiBLKt3i0YHFx9LNoouBNqkms4Vp0QXIDgh4RK68y9mHjaFvI43Fc/Fo FsD677H4h1bE27Dha7vQsFR7hXK60XuHuHtRvalbIPAU2Ckx/siYjXwMcatTg5ArJysQb6 n0Hs6PXCYEkOdZmmjAEJOOSQ/pksiDc3pRfeSlhgUJAN5KMRFShkbr+LVD5cuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649914365; a=rsa-sha256; cv=none; b=dzeYkXEVpO+QEIGwMyNdc0N49vmAAtrB9TQRXuvzL0iVz1ntB2ZB7sdJPrOs78XprprZds kFe1jngwczmAIF7CqYF6iUZb0knHXo0mnlk/ys0KMqmsDvsOhgDRv742MDu5TL1CjDEArp qY1niTlHnCVZVbJ1ZF2isrxbpr0491o/sCz5F5PNCtUR4NfSgUB5CFcOJChpnEH4eKMgii P+lbNK9GTXviYA602bCOQ0wqrH25g3Ks+ULGMoy1R6YWDNDndE1VE+9uIkTlLh0tyB8HX6 LGhHwNG0mQh+VjeNBQQ8Fu0aeQBLq7kA9GOVShP2SOx6mfYXUxf4dGZ6AR23QQ== 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 on the CC list for the bug.=