Stack build stalling on macOS/AArch64 with GHC 9.10.3 (LTS 24.18)

I am trying to move from ghc 9.10.2 to ghc 9.10.3 using LTS 24.18 with two projects. One builds but the second stalls. Before stalling I noticed the warning message (below).

I am wondering if the warning message is an indication that there is a corrupted file in my snapshot for ghc 9.10.3. (And if this is the case what can I do about it?).

I also had a similar stalling problem with LTS 24.17


Warning: [S-4541]

         While registering

         /Users/chrisreade/.stack/snapshots/aarch64-osx/8ed56d5479e8135f578778c1f2dde56679636582af024fadcfbfc41db061d0af/9.10.3/pkgdb/profunctors-5.6.3-6fUQmTIhOXG98lk4A6QkuX.conf

         in

         /Users/chrisreade/.stack/snapshots/aarch64-osx/df6ae89b8b95a36f76a3a744c1be33d446d2c15f541446814a4874c78d5f7d73/9.10.3/pkgdb/,

         Stack encountered the following error:

         

         Received ExitFailure 1 when running

         Raw command: /Users/chrisreade/.ghcup/ghc/9.10.3/bin/ghc-pkg-9.10.3 --no-user-package-db --package-db=/Users/chrisreade/.stack/snapshots/aarch64-osx/df6ae89b8b95a36f76a3a744c1be33d446d2c15f541446814a4874c78d5f7d73/9.10.3/pkgdb/ register --force /Users/chrisreade/.stack/snapshots/aarch64-osx/8ed56d5479e8135f578778c1f2dde56679636582af024fadcfbfc41db061d0af/9.10.3/pkgdb/profunctors-5.6.3-6fUQmTIhOXG98lk4A6QkuX.conf

         Standard output:

         

         Reading package info from "/Users/chrisreade/.stack/snapshots/aarch64-osx/8ed56d5479e8135f578778c1f2dde56679636582af024fadcfbfc41db061d0af/9.10.3/pkgdb/profunctors-5.6.3-6fUQmTIhOXG98lk4A6QkuX.conf" ... done.

         Standard error:

         

         profunctors-5.6.3: Warning: haddock-interfaces: /Users/chrisreade/.stack/snapshots/aarch64-osx/8ed56d5479e8135f578778c1f2dde56679636582af024fadcfbfc41db061d0af/9.10.3/doc/profunctors-5.6.3/profunctors.haddock doesn't exist or isn't a file

         profunctors-5.6.3: package(s) with this id already exist: profunctors-5.6.3-6fUQmTIhOXG98lk4A6QkuX

         profunctors-5.6.3: package profunctors-5.6.3 is already installed

         profunctors-5.6.3: Package names may be treated case-insensitively in the future.

         Package profunctors-5.6.3 overlaps with: profunctors-5.6.3 (ignoring)
1 Like

I’ve not come across that before (including at Stack’s repository). Stack is trying to use ghc-pkg (the GHC 9.10.3 version) to register a package in a snapshot package database (one that is GHC 9.10.3-specific) but ghc-pkg is complaining that it is already registered.

If it is corruption in Stack’s snapshot database, you can delete the snapshots folder. The ‘cost’ of that is that Stack will rebuild what it needs, first time that it needs it.

The “Package names may be treated case-insensitively in the future.” notice makes me wonder if there might be some configuration that uses a different case (such as Profunctors) that is causing this suspicious conflict. You might want to confirm that the (*.cabal and/or package.yaml) configuration for your project packages specify profunctors (all lower case).

Many thanks.

Removing the snapshot directory worked and everything rebuilt. (I had not realised it was safe to just remove snapshots).

So it probably was a corrupted snapshot.

1 Like

The case sensitivity comment for profunctors would have come from something I was using from LTS 24.18 (probably diagrams). It’s likely I never noticed it before or it is new for 9.10.3.