From nobody Mon Aug 14 21:19:39 2023 X-Original-To: haskell@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 4RPnNC4lplz4mNMk for ; Mon, 14 Aug 2023 21:19:39 +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 4RPnNC1p35z4V0l for ; Mon, 14 Aug 2023 21:19:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692047979; 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: in-reply-to:in-reply-to:references:references; bh=9HzGrrp6fAKojPGktkUYlAf7cctp3PCjG5pz7o21mgM=; b=SnjwAdQACvVrAnaWd99FLSis3ILNTTWuNi8LJWayfELyvFBs7oHFhJO2prWE0kEK2q4N/6 oaqxoNUXmBebGAjHTYWREgykqUrtF9jmif+BNssG3KUktf3KCFGJWL9U2y6WkpMvAoX25s Cz32gnAKl9jUSx+S6F6qi4twKpCwC02aHxPEmpHePXM6aEt5rCs4ltFxygC1yjYned0Mvu e5IXGQn6vqXzEhu9bCTBoX+wnkEkzaxksxtneeV+oDMEYtC8at0V5oEbgDozoPMn6mRSSO B9pUEczVUraCh8uuBHcaQaJie8Vxjbkuuxd6raKyicRIMkVi62A+yMWIOvN4Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692047979; a=rsa-sha256; cv=none; b=UTvV1ED4cfleqdT4n50c3Ej4/k5OzzC30FWd1Cqi3IHmXMoVDKxQwxd60mQB/J6aIZ3Wf1 f6T2iK+Ii9sZomC5T//chqLI25EW5oErr/pWx9hVzTTm++97xuXI1l/2KwzmL7Jh4Hgpaf tgVMqB2wuw4G6j2eyY0TTZUvsgOaIMHcTAoyH0se/r3DzP466O/v8QVmM7INTv9IgbA0lz JI6oXJ47CmgO7UjCfjXpwfL8M2IMJwezFvORNywFVWkUVnQ9JLk08Em+XX1jHZ9gQn8j+P wU0oY2AiVerflVO4mpXvtOIag6znJEhUTMzsdBIlfYIg6slUE8oqH34G0tFxew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RPnNC0n4Dzk1r for ; Mon, 14 Aug 2023 21:19:39 +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 37ELJdh0064817 for ; Mon, 14 Aug 2023 21:19:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37ELJdCJ064816 for haskell@FreeBSD.org; Mon, 14 Aug 2023 21:19:39 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: haskell@FreeBSD.org Subject: [Bug 273091] lang/ghc 9.4.6 fails to build without the addition of iconv configure flags Date: Mon, 14 Aug 2023 21:19:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: kreinholz@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: haskell@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: FreeBSD-specific Haskell issues and discussions List-Archive: https://lists.freebsd.org/archives/freebsd-haskell List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-haskell@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273091 --- Comment #20 from Kevin Reinholz --- (In reply to Kevin Reinholz from comment #11) OK, now I think we're getting somewhere! I deleted all instances of GCC fro= m my system in order to force use of the base system LLVM. ghc-9.4.6 builds perfectly fine from the vanilla Port files, no edits to the Makefile or fee= ding of extra configure options required. Glancing at the logs, I think this is the issue: with lang/gcc12 installed,= the following check occurs on line 1996 of "ghc_build_failure_part01.log" (the first attachment to this bug report): 1996 checking for gcc... /usr/local/bin/gcc^M 1997 checking for g++... /usr/local/bin/g++^M Contrast this with line 1990 of "ghc_llvm_build_log-part1.log" (first part = of the most recent series of 4 attachments): 1990 checking for gcc... clang^M 1991 checking for g++... clang++^M It seems that if GCC is installed, ghc's configure script finds it and sele= cts it as the compiler. If GCC is not installed, it reverts of LLVM/clang as a backup. I have no flags set in /etc/make.conf that should cause Ports to prefer GCC over LLVM: DEFAULT_VERSIONS+=3Dssl=3Dbase MAKE_JOBS_UNSAFE=3Dyes DISABLE_VULNERABILITIES=3Dyes NO_SENDMAIL=3Dtrue OPTIONS_FILE_UNSET+=3DGTK2 OPTIONS_FILE_SET+=3DGTK3 DEFAULT_VERSIONS+=3Dperl5=3D5.34 WITHOUT_WARNS=3Dyes Maybe ghc should check for the presence of clang, rather than gcc, and sele= ct that as its compiler if found? STEPS TO REPRODUCE REPORTED BUG: sudo pkg install gcc12 After which attempt to build ghc-9.4.6 from Ports. It will erroneously sele= ct GCC as the compiler over base system LLVM, and then fail to find inconv in /usr/include and /usr/lib. (But can still build successfully if told to look for iconv in /usr/local/include and /usr/local/lib). I suspect GCC's issue might be the inconsistent naming of the base system i= conv libs vice those found in /usr/local/lib: % ls /usr/include | grep iconv=20 iconv.h % ls /usr/lib | grep iconv libkiconv_p.a libkiconv.a libkiconv.so % ls /usr/local/include | grep iconv iconv.h uniconv.h % ls /usr/local/lib | grep iconv=20=20=20 libiconv.a libiconv.so libiconv.so.2 libiconv.so.2.6.1 libsiconv.a libsiconv.so libsiconv.so.1.0 --=20 You are receiving this mail because: You are the assignee for the bug.=