From nobody Sun Aug 13 00:00:13 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 4RNd2P5mSxz4m6Bm for ; Sun, 13 Aug 2023 00:00:13 +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 4RNd2P1zwdz3CXj for ; Sun, 13 Aug 2023 00:00:13 +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=1691884813; 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=31fh/4jE0qHciEKxF0nZwxH3zMcbf2Iesn5s4z0x6rE=; b=GSguJ/1mLIR5GPldnD8KNK0tb/2s47ZiH/zqEqaNdf0EgI2eJ9O4LwthKC5Fhy9uxp8FhE a+sip3GToxtwaKHj/sx03vIfPU2iyignlwP8UnslO10aKUierBEaukQqrfz4wWgbPUwmPm ftIOvDEj7llcwFKpXDEprF+ePOL7kd4/FSdWoRs6vX6wo9DjJgmgs50KDCelSZGP7WwHxJ c+tVviJ9YQspMK3pP19ome6vEWNuB7K2UtoRHWBNjJkwVBYxqjtBUKwA9N7jNtpNvnrApe HcGm9h9Y5ttRnvV/6Xnsy9PGh3urWJJtjrsoX02kZ9RV90fEx8T0pBzaOshahQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691884813; a=rsa-sha256; cv=none; b=Ur6e3OqD7Jg034lD/xrGcCRbxZe46Q1CRLDaNOM7670cHjBpFPKyfEso2JZKOi918HsDXB S1YPO9RXWy/oJHqq9aIPHD3CBswlRNqsvJ1kIP+yp6N6biy5wZXOT/eQvNFC5tSMHwpJpZ wjBukhZwKoV60Kh/KvI5zqi4RUitRgrK75w/C+vLFN9Zu6W0A5f1l7ujrhOHc7kspJFRsT pkAwnq4ktEI5AUb+emht4fq/ZtgrHcES6svX+gVkQOPRVOIKWKhWzZlKRfqXeYQ99rNGgG MMNdowQMuDugtD3GxylcamQPb20z91vfbiOGxyLXwU41XBEqOtHGdFrFDZG0QA== 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 4RNd2P14P9zgpN for ; Sun, 13 Aug 2023 00:00:13 +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 37D00DHJ037092 for ; Sun, 13 Aug 2023 00:00:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37D00DwJ037091 for haskell@FreeBSD.org; Sun, 13 Aug 2023 00:00:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: haskell@FreeBSD.org Subject: maintainer-feedback requested: [Bug 273091] lang/ghc 9.4.6 fails to build without the addition of iconv configure flags Date: Sun, 13 Aug 2023 00:00:13 +0000 X-Bugzilla-Type: request 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: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: haskell@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: 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 Bugzilla Automation has asked freebsd-haskell (Nobod= y) for maintainer-feedback: Bug 273091: lang/ghc 9.4.6 fails to build without the addition of iconv configure flags https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273091 --- Description --- OS: FreeBSD 13.2-STABLE stable/13-bc50720b32 GENERIC amd64 What: attempted to build lang/ghc-9.4.6 from Ports with default `make confi= g` options Expected result: successful build of ghc Actual result: build fails at the stage1 bootstrap phase with the following error message: # cabal-configure (for _build/stage1/libraries/base/setup-config) configure: error: iconv is required on non-Windows platforms ExitFailure 1 Build failed. *** Error code 1 Stop. make[1]: stopped in /usr/ports/lang/ghc *** Error code 1 /usr/ports/lang/ghc/work/ghc-9.4.6/_build/stage1/libraries/base/build/confi= g.lo g reveals: configure:32566: checking for library containing iconv configure:32597: /usr/local/bin/gcc -o conftest -iquote /usr/ports/lang/ghc/work /ghc-9.4.6/libraries/base -fuse-ld=3Dgold conftest.c -lrt >&5 /tmp//cccRZgTs.o:conftest.c:function main: error: undefined reference to 'libico nv_open' /tmp//cccRZgTs.o:conftest.c:function main: error: undefined reference to 'libico nv' /tmp//cccRZgTs.o:conftest.c:function main: error: undefined reference to 'libico nv_close' collect2: error: ld returned 1 exit status configure:32597: $? =3D 1 configure: failed program was: | /* confdefs.h */ And: configure:32597: /usr/local/bin/gcc -o conftest -iquote /usr/ports/lang/ghc/work /ghc-9.4.6/libraries/base -fuse-ld=3Dgold conftest.c -liconv -lrt >&5 /usr/local/bin/ld.gold: error: cannot find -liconv /tmp//ccp8G3Is.o:conftest.c:function main: error: undefined reference to 'libico nv_open' /tmp//ccp8G3Is.o:conftest.c:function main: error: undefined reference to 'libico nv' /tmp//ccp8G3Is.o:conftest.c:function main: error: undefined reference to 'libico nv_close' collect2: error: ld returned 1 exit status On my system, iconv headers and libs are installed to the standard location, /usr/local. However, for some reason ghc's configure script fails to look f= or them there. This may be similar to a problem noted by Mac OS X users attemp= ting to build ghc when two different versions of iconv exist on their systems, installed in different locations. The fix/workaround is easy: edit the Makefile and add appropriate iconv-rel= ated configure flags: GNU_CONFIGURE=3D yes CONFIGURE_ARGS+=3D --docdir=3D${DOCSDIR} --with-iconv-libraries=3D${LOCALBASE}/lib --with-iconv-includes=3D${LOCALBASE}/include CONFIGURE_ENV=3D ALEX=3D/usr/bin/true HAPPY=3D/usr/bin/true INSTALL_TARGET=3D install-strip After this, ghc has no problem finding iconv and the build progresses past = this error. I thought I'd share this information in case anyone else is having difficul= ty building ghc-9.4.6 or to suggest a tweak to the Makefile.