Repository navigation
Closed
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").type: bug
Description
cabal new-install brittany fails.
command: cabal new-install brittany
Resolving dependencies...
Build profile: -w ghc-8.4.3 -O1
In order, the following will be built (use -v for more details):
- brittany-0.11.0.0 (exe:brittany) (requires build)
Configuring executable 'brittany' for brittany-0.11.0.0..
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing executable 'brittany' for brittany-0.11.0.0..
Building executable 'brittany' for brittany-0.11.0.0..
src-brittany/Main.hs:7:10: error:
fatal error: 'prelude.inc' file not found
|
7 | #include "prelude.inc"
| ^
#include "prelude.inc"
^~~~~~~~~~~~~
1 error generated.
`clang' failed in phase `C pre-processor'. (Exit code: 1)
Symlinking brittany
Very verbose output available in https://gist.github.com/gwils/918a8c5cf169716e9c5c502c0bb7f7f6
I am not sure if this is a problem in brittany or in cabal but @dmwit on #hackage suggested I'd open the issue here anyway because the end result is that a broken symlink is created in ~/.cabal/bin
~ ls -l .cabal/bin/brittany
lrwxr-xr-x 1 andrea staff 56 11 Jul 22:06 .cabal/bin/brittany -> ../store/ghc-8.4.3/brttny-0.11.0.0-bb725428/bin/brittany
~ ls -l .cabal/store/ghc-8.4.3/brttny-0.11.0.0-bb725428/bin/brittany
ls: .cabal/store/ghc-8.4.3/brttny-0.11.0.0-bb725428/bin/brittany: No such file or directory
What's worse is that without the -j1 option, the output is
~ cabal new-install brittany
Resolving dependencies...
Build profile: -w ghc-8.4.3 -O1
In order, the following will be built (use -v for more details):
- brittany-0.11.0.0 (exe:brittany) (requires build)
Configuring brittany-0.11.0.0 (exe:brittany)...
Building brittany-0.11.0.0 (exe:brittany)...
Symlinking brittany
with no mention of the error.
~ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library
~ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
I believe the hackage timestamp is 2018-07-11T10:12:10Z.
Metadata
Metadata
Assignees
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").type: bug
Activity
fgaz commentedon Jul 11, 2018
@typedrat could you check the error handling in new-install while you're at it?
typedrat commentedon Jul 11, 2018
It's not passing the appropriate
-Ito GHC for theinclude-dirs. Hmm.typedrat commentedon Jul 12, 2018
I'm stuck on my phone for the rest of the day so I can't check, does it build with
new-build? I can't see a reason that new-install wouldn't work specifically.andreabedini commentedon Jul 12, 2018
@typedrat it does build with
new-build, I just double checked.lspitzner commentedon Jul 12, 2018
@typedrat did you see my suspected cause/potential fix? Perhaps new-build lets same-package different-component settings bleed over, but new-install does not? If that is the cause, then really the new-install behaviour is the "correct" one.
typedrat commentedon Jul 12, 2018
That fixes it for me, at least on my branch (where new-install works for local packages).
quasicomputational commentedon Jul 12, 2018
Can we also get new-build to fail for this bug? It's a bit worrying if things can work in your development/testing environment but then fail for users.
typedrat commentedon Jul 12, 2018
Well, I just realized that the reason I couldn't test it was that my branch wasn't parsing verbose flags right, and well...
I don't know if that fix works.
23Skidoo commentedon Nov 20, 2018
Looks like it still doesn't work, except now it fails silently:
Not sure what's going on here.
andreabedini commentedon Nov 17, 2020
It seems to be working now.