From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Help needed: Updating GHC to 8.4.3 Date: Sat, 25 Aug 2018 01:07:13 -0400 Message-ID: <87k1of6nlq.fsf@ngyro.com> References: <87tvnpfir4.fsf@gnu.org> <874lfptjd3.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftQnC-0007dg-DF for guix-devel@gnu.org; Sat, 25 Aug 2018 01:07:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftQn7-0002CN-JH for guix-devel@gnu.org; Sat, 25 Aug 2018 01:07:22 -0400 In-Reply-To: <874lfptjd3.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 20 Aug 2018 12:36:40 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org, Ricardo Wurmus Hi Ricardo, Ricardo Wurmus writes: > Hi Ludo, > >> Hello, >> >> Ricardo Wurmus skribis: >> >>> GHC 8.0 had been patched with >>> "ghc-dont-pass-linker-flags-via-response-files.patch" to avoid using >>> response files with the linker, because our ld-wrapper doesn=E2=80=99t = seem to >>> behave right in some edge case that GHC depends on. I tried porting the >>> patch to GHC 8.4.3 by applying this snippet: >> >> I think this patch predates the addition of support for response files >> in ld-wrapper. That support is not entirely faithful (see the FIXME in >> ld-wrapper.in), but I think it=E2=80=99s good enough for GHC. >> >> Could you maybe try removing the patch and see if it works better? > > I did try to build GHC 8.4.3 without any patches first, but this failed > (with the same errors and warnings when trying to set up the tests). > Only then did I try to port the patch from 8.0.x to 8.4.3. I had some success with GHC 8.4.3. It turns out that the warnings exist for 8.0.2 as well. I=E2=80=99m not sure what they are about, but they are = not a new problem. The new problem is that the stage-2 GHC compiler is not using the ld-wrapper. This is due to some changes to their Autoconf scripts which add =E2=80=9C-fuse-ld=3Dbfd=E2=80=9D to the later-stage compilers=E2=80=99 = =E2=80=9Cgcc=E2=80=9D invocations by default. Since =E2=80=9Cld.bfd=E2=80=9D does not point to the ld-wrapper, = the wrapper gets bypassed. There are two easy solutions to this: 1. Use the =E2=80=9C--disable-ld-override=E2=80=9D configure flag. 2. Set the =E2=80=9CLD=E2=80=9D environment variable. I got the package to build using option 1. However, it didn=E2=80=99t work because it expected all the build tools (=E2=80=9Cgcc=E2=80=9D, =E2=80=9Cld= =E2=80=9D, etc.) to be in =E2=80=9CPATH=E2=80=9D. They traded =E2=80=9CAC_PATH_=E2=80=9D for =E2=80= =9CAC_CHECK_=E2=80=9D, setting the variables to just the command names. Nix uses option 2 and sets explicit paths for all the tools via environment variables. I think we have to do the same. Also, I didn=E2=80=99t need the response files patch, and the =E2=80=9Cnative-search-paths=E2=80=9D field needs to be updated. Hope that helps! -- Tim