From nobody Tue Feb 08 19:21:07 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 29DA919A6531 for ; Tue, 8 Feb 2022 19:21:08 +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 4JtXtC4SkDz4drY for ; Tue, 8 Feb 2022 19:21:07 +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 6AC541F0D5 for ; Tue, 8 Feb 2022 19:21:07 +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 218JL7Tt087644 for ; Tue, 8 Feb 2022 19:21:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 218JL79E087643 for ports-bugs@FreeBSD.org; Tue, 8 Feb 2022 19:21:07 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 261798] lang/ghc: fix llvm code generation Date: Tue, 08 Feb 2022 19:21:07 +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 Many People X-Bugzilla-Who: contact@shiori.com.br X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: haskell@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name 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: 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=1644348067; 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=kwot8WAQIdxRGux/kqbTQrfXAppN4UMjeNqQHZ1wDNE=; b=w6RpdtOK5+D+EWkwRktW5BwT2YgQQ31DhTeNFzWqACmnxGsmB33cV52UDSXzeYLBJBFLfi 4HxFbTfF/YjFK/Vi9TfdNKCodnIn5SuU1KI9GFSj19UEh/ODD5m3T2r94jdzP5mICD4Btg rEaY9TPMmwqiK2foDdKRmd0giYMAJJSkGpE8xSxvEabyEkxIvP/qH3DjZI0H/WU+15IbC/ Bwz+b9zdGj7ciNm+2ZAdsCY7RYK2LbDFquEREHrP7n6f0xrbZIWpVB4rh+zhLXKJHVYi5i 5+2NSzL2+q/TU5/uA7YT+tlnkaX2Qg7cjY5wTBisBDogxe5Zftpc7YRMEsFJIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644348067; a=rsa-sha256; cv=none; b=tB4jWNWcWXhIWnGI4XZCJVD629C3K3YEWmu8LLgBC5pvpvzwbWU+W0FMM3OL/IvdQQONiJ g4huc3MJ+y0m5G3YtAwRO/vV/9+rRwbfsARxsrefIkIUlQCaHV5qRdckry+Xr8tGW8X3yC XblgLpRUUIzr5YS7dby8l6JRqsklhZZC1hRPy1OwEMGwFWpkKvvUp3LiViKqq2YAf/ts9u 477B3UT4KvjSBx7pWVFGtJ58MK1apb3dQl8VkmAmXrXSmqaVZS88lODYPFIhjkiXsDo/Fr +D1fOZYk9SlCAC2mVb4mFZFdDiI+AjTqb94WS/wkcQhNMLjMmW4tdVWp18Jxew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261798 Bug ID: 261798 Summary: lang/ghc: fix llvm code generation Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: haskell@FreeBSD.org Reporter: contact@shiori.com.br Flags: maintainer-feedback?(haskell@FreeBSD.org) Assignee: haskell@FreeBSD.org Created attachment 231654 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D231654&action= =3Dedit patch Salve, salve! GHC searches for a `amd64-portbld-freebsd` version of LLVM, which does not match either base or ports version identifiers. If we try to compile a simple hello world: ``` $ ghc -fllvm main.hs -o main.o [1 of 1] Compiling Main ( main.hs, main.o ) : error: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM between [9 and 13) ghc: panic! (the 'impossible' happened) (GHC version 8.10.7: Failed to lookup LLVM data layout Target: x86_64-portbld-freebsd Available targets: i386-unknown-windows i686-unknown-windows x86_64-unknown-windows arm-unknown-linux-gnueabihf arm-unknown-linux-musleabihf armv6-unknown-linux-gnueabihf armv6-unknown-linux-musleabihf armv6l-unknown-linux-gnueabihf armv6l-unknown-linux-musleabihf armv7-unknown-linux-gnueabihf armv7-unknown-linux-musleabihf armv7a-unknown-linux-gnueabi armv7a-unknown-linux-musleabi armv7a-unknown-linux-gnueabihf armv7a-unknown-linux-musleabihf armv7l-unknown-linux-gnueabi armv7l-unknown-linux-musleabi armv7l-unknown-linux-gnueabihf armv7l-unknown-linux-musleabihf aarch64-unknown-linux-gnu aarch64-unknown-linux-musl aarch64-unknown-linux i386-unknown-linux-gnu i386-unknown-linux-musl i386-unknown-linux x86_64-unknown-linux-gnu x86_64-unknown-linux-musl x86_64-unknown-linux x86_64-unknown-linux-android armv7-unknown-linux-androideabi aarch64-unknown-linux-android armv7a-unknown-linux-androideabi powerpc64le-unknown-linux-gnu powerpc64le-unknown-linux-musl powerpc64le-unknown-linux s390x-ibm-linux i386-apple-darwin x86_64-apple-darwin arm64-apple-darwin aarch64-apple-darwin armv7-apple-ios aarch64-apple-ios i386-apple-ios x86_64-apple-ios amd64-portbld-freebsd x86_64-unknown-freebsd aarch64-unknown-freebsd armv6-unknown-freebsd-gnueabihf armv7-unknown-freebsd-gnueabihf arm-unknown-nto-qnx-eabi Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable pprPanic, called at compiler/llvmGen/LlvmCodeGen.hs:113:20 in ghc:LlvmCodeGen Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` It seems `amd64-portbld-freebsd` was in fact de identifier used on ports LL= VM (please see https://gitlab.haskell.org/ghc/ghc/-/issues/15718), but that is= not the case anymore. Now all versions (tested 90 (default), 10 (default on PowerPC) and 13) use `x86_64-portbld-freebsd`, causing GHC to fail. Although `x86_64-unknown-freebsd` (base LLVM) is correct, the way GHC searc= hes for LLVM is neither clear nor documented, and it does not seem to use base = LLVM at all. This patch addresses the problem renaming the identifier to the correct one. Poudriere testport does not complain. Built on both 13.0-RELEASE and 14.0-CURRENT. Cheers! --=20 You are receiving this mail because: You are the assignee for the bug.=