Closed hvr closed 8 years ago
Even worse with --constraint 'Cabal == 1.18.*'
(the Cabal version that was bundled with GHC 7.8):
copy /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/Setup.hs to
/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup.hs
/opt/ghc/7.8.4/bin/ghc --make -fbuilding-cabal-package -odir /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup -hidir /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup -i -i/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2 -optP-include -optP/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup_macros.h -hide-all-packages -package-id Cabal-1.18.1.5-6478013104bde01737bfd67d34bbee0a -package-id base-4.7.0.2-bfd89587617e381ae01b8dd7b6c7f1c1 -package-id filepath-1.3.0.2-25a474a9272ae6260626ce0d70ad1cab /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup.hs -o /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup -threaded -ferror-spans
/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup configure
--verbose=2 --builddir=dist --ghc --with-compiler=/opt/ghc/7.8.4/bin/ghc
--prefix=/home/hvr/.cabal --bindir=/home/hvr/.cabal/bin
--libdir=/home/hvr/.cabal/lib
--libsubdir=x86_64-linux-ghc-7.8.4/base-noprelude-4.7.0.2-BnLIddom9I4GRVKz87SqFV
--libexecdir=/home/hvr/.cabal/libexec --datadir=/home/hvr/.cabal/share
--datasubdir=x86_64-linux-ghc-7.8.4/base-noprelude-4.7.0.2
--docdir=/home/hvr/.cabal/share/doc/x86_64-linux-ghc-7.8.4/base-noprelude-4.7.0.2
--htmldir=/home/hvr/.cabal/share/doc/x86_64-linux-ghc-7.8.4/base-noprelude-4.7.0.2/html
--haddockdir=/home/hvr/.cabal/share/doc/x86_64-linux-ghc-7.8.4/base-noprelude-4.7.0.2/html
--sysconfdir=/home/hvr/.cabal/etc --user
--ipid=base-noprelude-4.7.0.2-BnLIddom9I4GRVKz87SqFV
--dependency=base=base-4.7.0.2-bfd89587617e381ae01b8dd7b6c7f1c1
--disable-tests --exact-configuration --disable-benchmarks
--ghc-option=-ferror-spans
Redirecting build log to {handle:
/home/hvr/.cabal/logs/base-noprelude-4.7.0.2.log}
Failed to install base-noprelude-4.7.0.2
Build log ( /home/hvr/.cabal/logs/base-noprelude-4.7.0.2.log ):
cabal: Entering directory '/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2'
[1 of 1] Compiling Main ( /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup.hs, /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/Main.o )
Linking /tmp/cabal-tmp-6156/base-noprelude-4.7.0.2/dist/setup/setup ...
unrecognized option `--ipid=base-noprelude-4.7.0.2-BnLIddom9I4GRVKz87SqFV'
unrecognized option `--dependency=base=base-4.7.0.2-bfd89587617e381ae01b8dd7b6c7f1c1'
unrecognized option `--exact-configuration'
cabal: Leaving directory '/tmp/cabal-tmp-6156/base-noprelude-4.7.0.2'
World file is already up to date.
cabal: Error: some packages failed to install:
base-noprelude-4.7.0.2 failed during the configure step. The exception was:
ExitFailure 1
essential information for reproducing this: Cabal-1.22.8.0
needs to be registered in the pkg-db as well; then cabal-install
seems to assume it's talking to Cabal-1.22 even though it selected Cabal-1.18 for compiling Setup.hs...
/cc @dcoutts
PS: this does not affect cabal new-build
afaics (I've been told, cabal new-build
uses a different scheme to determine the Cabal-lib version).
I'm having a similar issue when building gi-cairo
(ghc 7.10.3)
...
/home/jacco/projects/leksah/leksah/dist-newstyle/build/gi-cairo-1.0.4/setup/setup
configure --verbose=2
--builddir=/home/jacco/projects/leksah/leksah/dist-newstyle/build/gi-cairo-1.0.4
--ghc --prefix=/home/jacco/.cabal --bindir=/home/jacco/.cabal/bin
--libdir=/home/jacco/.cabal/lib/x86_64-linux-ghc-7.10.3/.fake.gi-cairo-1.0.4
--libsubdir= --libexecdir=/home/jacco/.cabal/libexec
--datadir=/home/jacco/.cabal/share/x86_64-linux-ghc-7.10.3/gi-cairo-1.0.4
--datasubdir=
--docdir=/home/jacco/.cabal/share/doc/x86_64-linux-ghc-7.10.3/gi-cairo-1.0.4
--htmldir=/home/jacco/.cabal/share/doc/x86_64-linux-ghc-7.10.3/gi-cairo-1.0.4/html
--haddockdir=/home/jacco/.cabal/share/doc/x86_64-linux-ghc-7.10.3/gi-cairo-1.0.4/html
--sysconfdir=/home/jacco/.cabal/etc --enable-library-vanilla
--disable-library-profiling --enable-shared --disable-executable-dynamic
--disable-profiling --profiling-detail=default
--library-profiling-detail=default --enable-optimization --disable-debug-info
--disable-library-for-ghci --disable-split-objs --disable-executable-stripping
--disable-library-stripping --package-db=clear --package-db=global
--package-db=/home/jacco/.cabal/store/ghc-7.10.3/package.db
--package-db=/home/jacco/projects/leksah/leksah/dist-newstyle/packagedb/ghc-7.10.3
--ipid=gi-cairo-1.0.4-inplace
--dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
--dependency=bytestring=bytestring-0.10.6.0-c60f4c543b22c7f7293a06ae48820437
--dependency=containers=containers-0.5.6.2-e59c9b78d840fa743d4169d4bea15592
--dependency=haskell-gi-base=haskell-gi-base-0.17-inplace
--dependency=text=text-1.2.2.1-78576e9b1e5bd3089726a9044c764b870dda7b4864f6ab653a7e549915e3c95f
--dependency=transformers=transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3
--disable-tests --disable-coverage --exact-configuration --disable-benchmarks
--with-ghc=/opt/ghc/7.10.3/bin/ghc --with-ghc-pkg=/opt/ghc/7.10.3/bin/ghc-pkg
unrecognized 'configure' option `--profiling-detail=default'
unrecognized 'configure' option `--library-profiling-detail=default'
unrecognized 'configure' option `--ipid=gi-cairo-1.0.4-inplace'
@23Skidoo you self-assigned this bug... are you working on this already?
I haven't yet started, but I want to fix this before the release.
I just had this error. I have been working on getting travis builds of Leksah working again. It is tricky because we need to test it with recent versions of Gtk+. So I have been playing with a travis-docker
branch that runs Ubuntu 16.04 docker container in travis and builds there.
The latest GHC 8.0.1 build worked (YAY). The GHC 7.10.3 build failed. Here is the error:
Here is a Dockerfile
to reproduce the issue:
FROM ubuntu:xenial
RUN apt-get update && \
apt-get -y install software-properties-common && \
add-apt-repository -y ppa:hvr/ghc && \
apt-get update && \
apt-get -y install happy-1.19.5 alex-3.1.7 libgtk-3-dev libgirepository1.0-dev
RUN apt-get install -y cabal-install-1.24 ghc-7.10.3
RUN PATH=$HOME/.cabal/bin:/opt/ghc/7.10.3/bin:/opt/cabal/1.24/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH && ( \
cabal update && \
cabal install haskell-gi haskell-gi-base \
)
RUN PATH=$HOME/.cabal/bin:/opt/ghc/7.10.3/bin:/opt/cabal/1.24/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH && ( \
cabal unpack gi-cairo && \
cd gi-cairo* && \
cabal new-build \
)
Changing cabal new-build
to LC_ALL=C.UTF-8 cabal new-build --constraint='Cabal>=1.24'
makes that Dockerfile
work (I don't think the LC_ALL thing is related, just makes the haskell-gi code read the GIR files as UTF-8).
Perhaps we should add Cabal>=1.24
to the custom-setup
in gi-cairo
?
I think that the error involving base-noprelude
and --constraint 'Cabal == 1.18.*'
is related to #3436. See https://github.com/haskell/cabal/issues/3436#issuecomment-225403445. The variable cabalLibVersion
, which is the Cabal version that would be used if the dependency solver didn't pick a version, is also used to filter the configure flags: https://github.com/haskell/cabal/blob/dc3eca7d9ec990faa8df1447fbfd3f8ac965ae23/cabal-install/Distribution/Client/SetupWrapper.hs#L362 . The commit that I linked to in #3436 (https://github.com/grayjay/cabal/commit/9f6cbea106e25342fea6629ed753ad79da74245e?w=1) allows this command to run with GHC 7.8.4 and Cabal-1.20.0.4: cabal install -v2 base-noprelude --constraint 'Cabal == 1.18.*'
NB:
base-noprelude-4.7.0.2
uses acustom-setup
stanzain this case, cabal-install-1.24 needs to talk to a custom
Setup.hs
compiled against Cabal-1.20: