From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: bug#37064: Ghc 8.6.5 fails to find core package database Date: Mon, 09 Sep 2019 22:05:43 -0400 Message-ID: <87ftl4x5vs.fsf@ngyro.com> References: <731a105e-4cf8-0d88-798b-3907c458410a@student.ethz.ch> <87zhk1f1ci.fsf@ngyro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56724) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7VXg-00014V-9X for bug-guix@gnu.org; Mon, 09 Sep 2019 22:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7VXf-0004Dc-7N for bug-guix@gnu.org; Mon, 09 Sep 2019 22:06:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7VXf-0004DP-2z for bug-guix@gnu.org; Mon, 09 Sep 2019 22:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i7VXe-0004FJ-SE for bug-guix@gnu.org; Mon, 09 Sep 2019 22:06:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87zhk1f1ci.fsf@ngyro.com> (Timothy Sample's message of "Thu, 22 Aug 2019 15:26:37 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Gabriel Giamarchi Cc: 37064-done@debbugs.gnu.org Hi again, Timothy Sample writes: > Gabriel Giamarchi writes: > >> Installing only 'ghc 8.6.5' (Glasgow Haskell compiler) and sourcing >> >> '~/.guix-profile/etc/profile' leads to ghc not finding core modules. >> ('ghci' doesn't find System.IO for instance). >> >> This is due to $GHC_PACKAGE_PATH not containing ghc 8.6.5's >> package.conf.d, but >> instead ghc 8.4.3's database. >> >> Note: Not setting this variable leads to a working ghc (will search in >> default >> location), but is required to install additional packages via guix. >> >> The issue might come from guix/profiles.scm:812, since >> =C2=A0 (module-ref (resolve-interface '(gnu packages haskell)) 'ghc) >> evaluates to in my repl. > > Good catch. I can confirm this is the issue, but I=E2=80=99m not sure ho= w to > fix it. We could try to find GHC from the profile rather than > unconditionally using a certain package. However, that would not help > if someone were to install GHC 8.4 and 8.6 in the same profile. I took another look at this and we were wrong! The main issue here is that I made a mistake in the GHC 8.6 package definition, and it was setting GHC_PACKAGE_PATH incorrectly. This should be fixed as of commit 83aa656217. Sorry for the trouble. Note that you will likely run into trouble trying to use other Guix-provided Haskell packages with GHC 8.6, as they are all built with GHC 8.4. AFAIU, this is not something that GHC supports. -- Tim