Search code examples
haskellghccabal

unrecognized 'configure' option `--enable-executable-profiling'


After upgrading from ghc 7.8.3 to ghc 7.8.4, I did a cabal update, and saw that there was a new version of cabal. So I ran the command

cabal --no-require-sandbox install cabal-install

and got the error message

unrecognized 'configure' option `--enable-executable-profiling'

Solution

  • The parameter executable-profiling appears to have been renamed to profiling at some point. There are some other changes to the configuration parameters as well. I suspect that all I needed to do was change executable-profiling to profiling in ~/.cabal/config and re-try my cabal install.

    However, I didn't know a priori what the changes were. So my solution* was:

    1. mv ~/.cabal/config ~/.cabal/config.BACKUP
    2. cabal update to create a new default configuration file.
    3. Edit ~/.cabal/config to preserve any settings from ~/.cabal/config.BACKUP I wanted to keep for the next step, BUT NOT executable-profiling.
    4. cabal --no-require-sandbox install cabal-install
    5. rm ~/.cabal/config
    6. cabal update to create a new default configuration file. As soon as a new default configuration file has been created, you can CTRL-c.
    7. Edit ~/.cabal/config to preserve any settings from ~/.cabal/config.BACKUP I wanted to keep going forward.

    EDIT: *I've just discovered the cabal command user-config, which seems tailor-made for situations like this. To learn more, type cabal help user-config.