Skip to content

Weird problem: cabal-3.6.0.0 fails to build shared executables with Assertion failed #7690

Open
@mouse07410

Description

@mouse07410

Description

When ~/.cabal/config contains

build fails in a weird way:

$ cabal install happy
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
Assertion failed
CallStack (from HasCallStack):
  assert, called at src/Distribution/Client/ProjectPlanning.hs:238:5 in main:Distribution.Client.ProjectPlanning

To Reproduce

Steps to reproduce the behavior:

Edit ~/.cabal/config as shown above, and try to install anything reasonable from Hackage - like above.

Expected behavior

Something like this

$ cabal install happy
Resolving dependencies...
Up to date
Symlinking 'happy' to '/Users/ur20980/.cabal/bin/happy'

or a real build, like

$ cabal install hlint hoogle hpack hscolour
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
 - blaze-builder-0.4.2.1 (lib) (requires download & build)
 - base-compat-0.12.0 (lib) (requires download & build)
 - base-orphans-0.8.5 (lib) (requires download & build)
 - base64-bytestring-1.2.1.0 (lib) (requires download & build)
 - bsb-http-chunked-0.0.0.4 (lib) (requires download & build)
 - basement-0.0.12 (lib) (requires download & build)
 - byteorder-1.0.4 (lib:byteorder) (requires download & build)
 - cabal-doctest-1.0.8 (lib) (requires download & build)
 - clock-0.8.2 (lib) (requires download & build)
 - colour-2.3.6 (lib) (requires download & build)
 - cmdargs-0.10.21 (lib) (requires download & build)
 - cereal-0.5.8.1 (lib) (requires download & build)
 - data-default-class-0.1.2.0 (lib:data-default-class) (requires download & build)
 - file-embed-0.0.15.0 (lib) (requires download & build)
 .  .  .  .  .
 - hpack-0.34.4 (exe:hpack) (requires download & build)
 - hoogle-5.0.18.2 (exe:hoogle) (requires download & build)
Downloading  base-orphans-0.8.5
Downloaded   base-orphans-0.8.5
Downloading  basement-0.0.12
Starting     base-orphans-0.8.5 (lib)
Building     base-orphans-0.8.5 (lib)
Downloaded   basement-0.0.12
Downloading  byteorder-1.0.4
Starting     basement-0.0.12 (lib)
Installing   base-orphans-0.8.5 (lib)
Building     basement-0.0.12 (lib)
.  .  .  .  .
Installing   hoogle-5.0.18.2 (lib)
Completed    hoogle-5.0.18.2 (lib)
Starting     hoogle-5.0.18.2 (exe:hoogle)
Building     hoogle-5.0.18.2 (exe:hoogle)
Installing   hoogle-5.0.18.2 (exe:hoogle)
Completed    hoogle-5.0.18.2 (exe:hoogle)
Symlinking 'hoogle' to '/Users/ur20980/.cabal/bin/hoogle'
Symlinking 'hlint' to '/Users/ur20980/.cabal/bin/hlint'
Symlinking 'hpack' to '/Users/ur20980/.cabal/bin/hpack'
Symlinking 'HsColour' to '/Users/ur20980/.cabal/bin/HsColour'

System information

  • Operating system: macOS Big Sur 11.6
  • Xcode-13
  • cabal-3.6.0.0, ghc-9.0.1 and ghc-8.10.7 (same problem with both)

Additional context

Everything (GHC, Cabal, Stack) is installed via ghcup, which is now 0.1.17.1.
It used to work until a couple of days ago. Completely uninstalling (and removing the directories of) Cabal and both GHC's did not help.

Removing custom config and leaving the builds/installs to be static works, but it's not an acceptable workaround because of hugely increased consumption of disk space.

My "desired" ~/.cabal/config: cabal-config.txt

Note: there's a problem with jobs: $ncpus in the ~/.cabal/config - it simply does no work on MacOS, as $ncpus value is nothing. Turned out false alarm for $ncpus.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions