-
Notifications
You must be signed in to change notification settings - Fork 710
Weird problem: cabal-3.6.0.0 fails to build shared executables with Assertion failed
#7690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for the report. Do you mean |
I think this is due to a change in hashing that affects the store. I'm surprised that wiping the store didn't solve this. 🤔 |
No, I created it with Now I'm trying to bring it to the "desired" level step by step. I've added
BTW, to save time and simplify my life when I need to (re-)install multiple packages from Hackage, I tend to specify them together in the install command, like
Are there any problems with doing that? Should (independent) packages be specified just one per install command, like
?
I'm greatly surprised by this - in my prior experience, wiping the store always resolved this kind of problems. |
Installing them all together on one line should be fine as far as I know. |
@mouse07410: thank you for the additional details. I was asking, because you original description has "When ~/.cabal/config contains" and then some empty lines and I wonder if that' means something or is a typo. |
[edited, removed; never mind me, a thinko] |
IIRC installing them together will try to share common dependencies, so with many packages you might not get a build plan, or you might get older packages |
@mouse07410 only to be sure it is or is not a regression, the error is not reproduced with cabal-3.4.0.0 (it can be installed with ghcup)? |
I'm not sure what to tell you - I was unable to build shared, so I disabled those options. Cabal store on that machine was empty at the time - I wiped everything out and started a-fresh. After successfully installing a few static packages, I gradually re-endangered shared/dynamic. And now it's back to working - I'm building dynamic executables and shared libraries with Cabal-3.6.0.0. Perhaps I should close this ticket, and reopen if I experience this again... |
Thanks for the update, i've labeled with |
I've hit this same assertion after adding Happens with every project I try to build. Setting locally with |
Assertion failed
@georgefst: thank you for the info. Are you still getting this? Can you reproduce after you wipe out your setup ( |
This may be related to #6006. |
@georgefst: hi! Could you try again? Was that with a local custom build with assertions enabled or a stock cabal binary? |
That will have been with stock 3.6 from GHCup. But I've just checked and also happens with the 3.9 I've been using lately, built from |
I think we have a real bug with all those assertions -- perhaps, when the global cabal config has these settings they don't make their way into the hash of the shared config. Definitely worth tracking down! That said, I'm very confused why people using stock ghcup cabals are hitting assertion failures at all -- shouldn't we be producing executables for distribution with all assertions turned off? |
Apologies, it seems I may have misremembered here, as I can't now reproduce with stock 3.6. |
Uh oh!
There was an error while loading. Please reload this page.
Description
When
~/.cabal/config
containsbuild fails in a weird way:
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
or a real build, like
System information
cabal-3.6.0.0
,ghc-9.0.1
andghc-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.txtNote: there's a problem withTurned out false alarm for $ncpus.jobs: $ncpus
in the~/.cabal/config
- it simply does no work on MacOS, as$ncpus
value is nothing.The text was updated successfully, but these errors were encountered: