Fix CI on Mac OS X with GHC 7.8 and earlier.
On recent OS X, Cabal does not work correctly because it assumes
that a permission denied error when reading permissions on
executables, resulting in errors like "Setup: /usr/bin/ar: permission denied".
The proximal fix for this is to add a constraint on unix when we build
Cabal/cabal-install to avoid building with the buggy version of unix.
But this causes other problems:
- Bumping the version of unix means that our local build of Cabal
will depend on things from the store. But we weren't passing
this to GHC when compiled Setup.hs for Cabal's package-tests.
Set CABAL_PACKAGETESTS_DB_STACK env var explicitly to point
to the right locations.
- The new configuration of versions exposed some bugs in some
macro expanded code in cabal-install; we qualified those
imports to squash unused warnings.
- The cabal-install integration-tests occasionally use Cabal from
the system GHC. Since this will never work on OS X, we just
skip the tests in those cases.
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
Showing
- cabal-install/Distribution/Client/Utils.hs 4 additions, 5 deletionscabal-install/Distribution/Client/Utils.hs
- cabal-install/cabal-install.cabal 0 additions, 1 deletioncabal-install/cabal-install.cabal
- cabal-install/tests/IntegrationTests/custom/custom_dep.sh 9 additions, 0 deletionscabal-install/tests/IntegrationTests/custom/custom_dep.sh
- cabal-install/tests/IntegrationTests/custom/plain.err 0 additions, 2 deletionscabal-install/tests/IntegrationTests/custom/plain.err
- cabal-install/tests/IntegrationTests/custom/plain.sh 13 additions, 2 deletionscabal-install/tests/IntegrationTests/custom/plain.sh
- cabal-install/tests/IntegrationTests2.hs 13 additions, 2 deletionscabal-install/tests/IntegrationTests2.hs
- cabal.project 1 addition, 0 deletionscabal.project
- travis-script.sh 3 additions, 1 deletiontravis-script.sh
Please register or sign in to comment