Skip to content
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

Package fails to build with cabal-install 3.11 and GHC 8.0.2 where cabal-install 3.10.x worked #10012

Open
vmchale opened this issue May 14, 2024 · 7 comments

Comments

@vmchale
Copy link
Contributor

vmchale commented May 14, 2024

Describe the bug

The message:

Failed to build pretty-simple-3.3.0.0. The failure occurred during the final
install step.
Build log (
/development/vanessa/.cache/cabal/logs/ghc-8.0.2/pretty-simple-3.3.0.0-42073c1f3a1b0e661504a136c3aa9a9bda480ded70a5d1b8c570f967f5c38d46.log
):
[1 of 1] Compiling Main             ( /home/vanessa/programming/haskell/done/shake-dhall/dist-newstyle/tmp/src-52302/pretty-simple-3.3.0.0/dist/setup/setup.hs, /home/vanessa/programming/haskell/done/shake-dhall/dist-newstyle/tmp/src-52302/pretty-simple-3.3.0.0/dist/setup/Main.o )
Linking /home/vanessa/programming/haskell/done/shake-dhall/dist-newstyle/tmp/src-52302/pretty-simple-3.3.0.0/dist/setup/setup ...
Configuring pretty-simple-3.3.0.0...
Preprocessing library pretty-simple-3.3.0.0...
[1 of 9] Compiling Text.Pretty.Simple.Internal.Output ( src/Text/Pretty/Simple/Internal/Output.hs, dist/build/Text/Pretty/Simple/Internal/Output.o )
[2 of 9] Compiling Text.Pretty.Simple.Internal.Expr ( src/Text/Pretty/Simple/Internal/Expr.hs, dist/build/Text/Pretty/Simple/Internal/Expr.o )
[3 of 9] Compiling Text.Pretty.Simple.Internal.ExprParser ( src/Text/Pretty/Simple/Internal/ExprParser.hs, dist/build/Text/Pretty/Simple/Internal/ExprParser.o )
[4 of 9] Compiling Text.Pretty.Simple.Internal.ExprToOutput ( src/Text/Pretty/Simple/Internal/ExprToOutput.hs, dist/build/Text/Pretty/Simple/Internal/ExprToOutput.o )
[5 of 9] Compiling Text.Pretty.Simple.Internal.Color ( src/Text/Pretty/Simple/Internal/Color.hs, dist/build/Text/Pretty/Simple/Internal/Color.o )
[6 of 9] Compiling Text.Pretty.Simple.Internal.OutputPrinter ( src/Text/Pretty/Simple/Internal/OutputPrinter.hs, dist/build/Text/Pretty/Simple/Internal/OutputPrinter.o )
[7 of 9] Compiling Text.Pretty.Simple.Internal ( src/Text/Pretty/Simple/Internal.hs, dist/build/Text/Pretty/Simple/Internal.o )
[8 of 9] Compiling Text.Pretty.Simple ( src/Text/Pretty/Simple.hs, dist/build/Text/Pretty/Simple.o )
[9 of 9] Compiling Debug.Pretty.Simple ( src/Debug/Pretty/Simple.hs, dist/build/Debug/Pretty/Simple.o )
setup: Unrecognised flags: lib:pretty-simple

To Reproduce

It arose in my shake-dhall repo:

$ cabal build -w ghc-8.0.2

Expected behavior

It should build and behave as Cabal 3.10.x

System information

  • Linux
  • Cabal 3.12.0.0, cabal-install 3.11.0.0, GHC 8.0.2
@philderbeast
Copy link
Collaborator

I can reproduce this locally using the latest cabal-install;

$ git rev-parse HEAD
03d98294e1c071be368f04dbe6fc9cb263bea86d

$ cabal install cabal-install:exe:cabal --overwrite-policy=always

$ cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Build profile: -w ghc-8.0.2 -O1
...
setup: Unrecognised flags: lib:pretty-simple
Error: [Cabal-7125]
Failed to build pretty-simple-3.3.0.0 (which is required by test:shake-dhall-test from shake-dhall-0.1.1.3).

@ffaf1
Copy link
Collaborator

ffaf1 commented May 14, 2024

Note that:

- Cabal and Cabal-syntax 3.12 support GHC version 8.4.4 and up.
Support for all previous GHC versions is deprecated.

Of course if there is a way to fix this for older GHCs, it is more than welcome @philderbeast !

@philderbeast
Copy link
Collaborator

philderbeast commented May 14, 2024

Bumping up to ghc-8.2.2, all seems good;

$ cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Build profile: -w ghc-8.2.2 -O1
In order, the following will be built (use -v for more details):
...
- pretty-simple-3.3.0.0 (lib:pretty-simple) (requires build)
...
Starting     pretty-simple-3.3.0.0 (all, legacy fallback: build-type is Custom)
...
Building library for shake-dhall-0.1.1.3...
[1 of 2] Compiling Dhall.Dep
[2 of 2] Compiling Development.Shake.Dhall
Warning: this is a debug build of cabal-install with assertions enabled.
Warning: this is a debug build of cabal-install with assertions enabled.
Configuring test suite 'shake-dhall-test' for shake-dhall-0.1.1.3...
Warning: this is a debug build of cabal-install with assertions enabled.
Preprocessing test suite 'shake-dhall-test' for shake-dhall-0.1.1.3...
Building test suite 'shake-dhall-test' for shake-dhall-0.1.1.3...
[1 of 1] Compiling Main
Linking dist-newstyle/.../shake-dhall-test ...

$ cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Up to date

I reran the command cabal build to get the "Up to date" because I noticed there's no emphatic output saying that the build was successful, nothing like a 👍

@ulysses4ever
Copy link
Collaborator

Technically, we should close this as not-planned because it's out of our GHC support window (thanks, Francesco, for noticing!). But it's a curious bug: I wonder what change between 3.10 and 3.12 leads to it.

@philderbeast
Copy link
Collaborator

philderbeast commented May 14, 2024

setup: Unrecognised flags: lib:pretty-simple
Error: [Cabal-7125]

That's a fairly general failure, "die if not haddock failure".

DieIfNotHaddockFailureException{} -> 7125

@philderbeast
Copy link
Collaborator

Same set up has no problem building the dependency by itself;

$ cabal get pretty-simple-3.3.0.0
Warning: this is a debug build of cabal-install with assertions enabled.
Unpacking to pretty-simple-3.3.0.0/

$ cd pretty-simple-3.3.0.0/

$ cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Build profile: -w ghc-8.0.2 -O1
...

$ cabal build all --enable-tests --enable-benchmarks
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Up to date

@mpickering
Copy link
Collaborator

I think this is because of the Cabal version used rather than the ghc version in particular.

I imagine it's caused by f70fc98 (also see #9640)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants