I filed a bug:
https://github.com/haskell/cabal/issues/2213 Someone commented that it should basically work.
I’m trying to track down exactly where it goes wrong for me. There’s a problem in the way "cabal exec” interacts with the ghc-ios script.
If I run…
ghc-ios -v3 test.hs
Glasgow Haskell Compiler, Version 7.8.3, stage 1 booted by GHC version 7.8.2
Using binary package database: /usr/local/lib/arm-apple-darwin10-ghc-7.8.3/package.conf.d/package.cache
Using binary package database: /Users/axis/.ghc/arm-ios-7.8.3/package.conf.d/package.cache
It correctly finds the package database.
But if I run…
cabal exec ghc-ios -- -v3 test.hs
Glasgow Haskell Compiler, Version 7.8.3, stage 1 booted by GHC version 7.8.2
Using binary package database: /usr/local/lib/ghc-7.8.3/package.conf.d/package.cache
Using binary package database: /Users/axis/sandbox/.cabal-sandbox/x86_64-osx-ghc-7.8.3-packages.conf.d/package.cache
It correctly uses the sandbox, but not the arm ghc.
I looked into /usr/local/bin/arm-apple-darwin10-ghc, which does the following:
#!/bin/sh
exedir="/usr/local/lib/arm-apple-darwin10-ghc-7.8.3/bin"
exeprog="ghc-stage1"
executablename="$exedir/$exeprog"
datadir="/usr/local/share"
bindir="/usr/local/bin"
topdir="/usr/local/lib/arm-apple-darwin10-ghc-7.8.3"
executablename="$exedir/ghc"
exec "$executablename" -B"$topdir" ${1+"$@“}
I’m not sure what’s going on at the end (what is the -B flag?), but somehow that topdir variable doesn’t make it through the sandbox call.
Thanks for your help.