haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.62k stars 695 forks source link

Bootstrapping cabal-install-3.0.0.0 fails with GHC 8.4.4 #6243

Closed bgamari closed 1 year ago

bgamari commented 5 years ago

Describe the bug The bootstrap script appears to produce an cabal-install install plan using both the bootstrap compiler's Cabal and Cabal-3.0.0.0.

To Reproduce Steps to reproduce the behavior:

Download cabal-install-3.0.0.0 source distribution, extract it, and run bootstrap.sh with ghc-8.4.4:

$ ./bootstrap.sh 
Using gcc for C compiler. If this is not what you want, set CC.
Using /usr/lib/gcc/arm-linux-gnueabihf/6/collect2 instead.
Checking installed packages for ghc-8.4.4...
deepseq is already installed and the version is ok.
binary is already installed and the version is ok.
time is already installed and the version is ok.
transformers is already installed and the version is ok.
mtl is already installed and the version is ok.
text is already installed and the version is ok.
parsec is already installed and the version is ok.
network-uri is already installed and the version is ok.
network is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
random is already installed and the version is ok.
stm is already installed and the version is ok.
hashable is already installed and the version is ok.
async is already installed and the version is ok.
base16-bytestring is already installed and the version is ok.
base64-bytestring is already installed and the version is ok.
cryptohash-sha256 is already installed and the version is ok.
resolv is already installed and the version is ok.
mintty is already installed and the version is ok.
echo is already installed and the version is ok.
edit-distance is already installed and the version is ok.
ed25519 is already installed and the version is ok.
tar is already installed and the version is ok.
digest is already installed and the version is ok.
zip-archive is already installed and the version is ok.
hackage-security is already installed and the version is ok.
Cabal is already installed and the version is ok.
cleaning...
Linking Setup ...
Configuring cabal-install-3.0.0.0...
Warning:
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package hackage-security (hackage-security-0.5.3.0-L5HotCHqeTvLNRGrkXTmws) requires Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv
      package cabal-install (cabal-install-3.0.0.0) requires Cabal-3.0.0.0-JCetfKUu5MNHwqb2fkd3Fh
Preprocessing executable 'cabal' for cabal-install-3.0.0.0..
Building executable 'cabal' for cabal-install-3.0.0.0..
...

Expected behavior bootstrap.sh should build a functional cabal-install.

System informataion

hvr commented 5 years ago

@bgamari if you manually tweak cabal-install.cabal to be of build-type:Simple, does it still occur?

PS: I tried to reproduce but failed to do so (i.e. it worked for me); I did the following:

docker run --rm -it haskell:8.4.4 bash -i

and then inside this Debian-based container, I needed to apt install ghc-8.4.4-prof (as by default it doesn't have the profiling libs installed), and then unpacked the cabal-install-3.0.0.0 tarball, and ran the ./bootstrap.sh included therein. In the end, a newly build cabal executable was copied into /root/.cabal/bin/.

gbaz commented 3 years ago

@bgamari can we close this?

ulysses4ever commented 1 year ago

@gbaz I support closing (seems obsolete).