"unrecognized `--disable-executable-profiling'" with sandbox and -w flag #2313

Closed
jberryman opened this Issue Jan 2, 2015 · 12 comments

Projects

None yet

6 participants

@jberryman

I'm trying to build a package for GHC 7.10 RC1 and getting errors I don't understand. To reproduce:

jberryman /tmp » cabal --no-require-sandbox  update                                                                                                                                                                                      1 ↵
Downloading the latest package list from hackage.haskell.org
jberryman /tmp » cabal get atomic-primops
Downloading atomic-primops-0.6.1.1...
Unpacking to atomic-primops-0.6.1.1/
jberryman /tmp » cd atomic-primops-0.6.1.1 
jberryman /tmp/atomic-primops-0.6.1.1 » cabal sandbox init                                                                                                                                                                               1 ↵
Writing a default package environment file to
/tmp/atomic-primops-0.6.1.1/cabal.sandbox.config
Creating a new sandbox at /tmp/atomic-primops-0.6.1.1/.cabal-sandbox
jberryman /tmp/atomic-primops-0.6.1.1 » cabal install -w /usr/local/bin/ghc-7.10.0.20141222 --only-dependencies
Resolving dependencies...
Notice: installing into a sandbox located at
/tmp/atomic-primops-0.6.1.1/.cabal-sandbox
Configuring primitive-0.5.4.0...
Failed to install primitive-0.5.4.0
Build log ( /tmp/atomic-primops-0.6.1.1/.cabal-sandbox/logs/primitive-0.5.4.0.log ):
unrecognized 'configure' option `--disable-executable-profiling'
cabal: Error: some packages failed to install:
primitive-0.5.4.0 failed during the configure step. The exception was:
ExitFailure 1

I believe I was able to use -w before with sandboxes painlessly in the past, but I may be doing something wrong here. Here is my version info:

 jberryman /tmp/atomic-primops-0.6.1.1 » cabal --version
cabal-install version 1.20.0.6
using version 1.20.0.3 of the Cabal library
@23Skidoo 23Skidoo added the sandbox label Jan 3, 2015
@23Skidoo 23Skidoo self-assigned this Jan 3, 2015
@crockeea
crockeea commented Jan 9, 2015

I'm getting a similar error when installing Cabal-1.22.0.0:

...
[78 of 78] Compiling Main             ( /tmp/Cabal-1.22.0.0-9051/Cabal-1.22.0.0/dist/setup/setup.hs, /tmp/Cabal-1.22.0.0-9051/Cabal-1.22.0.0/dist/setup/Main.o )
Linking /tmp/Cabal-1.22.0.0-9051/Cabal-1.22.0.0/dist/setup/setup ...
unrecognized 'configure' option `--enable-executable-profiling'
cabal: Error: some packages failed to install:
Cabal-1.22.0.0 failed during the configure step. The exception was:
ExitFailure 1
@ttuegel
Member
ttuegel commented Jan 9, 2015

--enable-executable-profiling is now just --enable-profiling. It was dishonestly named in the first place, because you need library profiling enabled, too. You probably have executable-profiling: True in your $HOME/.cabal/config, which now should be profiling: True.
https://github.com/haskell/cabal/blob/master/Cabal/changelog

@tibbe
Member
tibbe commented Jan 9, 2015

We should keep the old flash as well for backwards compat.
On Jan 9, 2015 6:43 AM, "Thomas Tuegel" notifications@github.com wrote:

--enable-executable-profiling is now just --enable-profiling. It was
dishonestly named in the first place, because you need library profiling
enabled, too. You probably have executable-profiling: True in your
$HOME/.cabal/config, which now should be profiling: True.
https://github.com/haskell/cabal/blob/master/Cabal/changelog


Reply to this email directly or view it on GitHub
#2313 (comment).

@23Skidoo
Member
23Skidoo commented Jan 9, 2015

I thought we did.

@23Skidoo 23Skidoo removed their assignment Jan 9, 2015
@23Skidoo 23Skidoo removed the sandbox label Jan 9, 2015
@ttuegel ttuegel added the regression label Jan 11, 2015
@ttuegel ttuegel added this to the Cabal-1.22.0.1 milestone Jan 11, 2015
@ttuegel ttuegel self-assigned this Jan 11, 2015
@ttuegel
Member
ttuegel commented Jan 11, 2015

I thought we kept, too. Fixing that now...

@ttuegel
Member
ttuegel commented Jan 12, 2015

OK, I fixed this in master, and I backported it to the 1.22 branch, since this is a regression from 1.20.

@ttuegel ttuegel closed this Jan 12, 2015
@tibbe
Member
tibbe commented Jan 12, 2015

Thanks!

@hesselink
Contributor

I've just compiled the 1.22 branch, and while this is fixed for --enable-executable-profiling, it isn't for --enable-library-coverage:

$ cabal configure --enable-library-coverage
Resolving dependencies...
cabal: Option --enable-library-coverage is obsolete! Please use
--enable-coverage instead.

This seems to be coming from here.

@tibbe tibbe reopened this Jan 13, 2015
@tibbe
Member
tibbe commented Jan 13, 2015

@ttuegel can you fix coverage as well please?

@tibbe
Member
tibbe commented Jan 13, 2015

This is a bit trickier than I initially thought. @dcoutts told me that cabal-install needs to check which Cabal version it ended up compiling the setup executable against and then make sure it passes flags that this version understands.

@dcoutts is there an example of us already doing this?

@ttuegel
Member
ttuegel commented Jan 13, 2015

I think now it was a mistake to change the semantics of the ConfigFlags field behind these options. I am going to bring back the old fields with the old semantics and add new fields with the correct semantics (for the new, short-name options). It's not enough to make --enable-executable-profiling etc. synonyms for the new options because old scripts could expect the old semantics, wrong as they are. This will also let us warn the user if they invoke the old option.

As for cabal-install, besides passing each Cabal version only the flags it understands, we should also make cabal-install-1.22 replicate the new semantics for --enable-profiling etc. with the old flags.

@tibbe
Member
tibbe commented Jan 18, 2015

Fixed by 66dade3 and f445c3a.

@tibbe tibbe closed this Jan 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment