cabal-install clobbers itself on multi-arch platforms #810

bos opened this Issue May 24, 2012 · 3 comments

2 participants

Haskell member

(Imported from Trac #820, reported by @bos on 2011-03-23)

On my Mac, I have 32-bit and 64-bit versions of GHC 7.0.2 installed, and cabal installs the object and interface files into the same directory.

The $arch variable looks like it should do the right thing, but in fact it's expanded to whatever architecture cabal-install was built for, not the architecture that's supported by GHC itself.

Haskell member

(Imported comment by @bos on 2011-03-23)

Oops - I meant to be more specific. cabal installs both 32-bit and 64-bit object and interface files into the same directory, so the 32-bit library sees 64-bit interface files, or vice versa, and everything goes pear-shaped.

Haskell member

(Imported comment by @dcoutts on 2011-03-23)

Ah yes, so in fact we need the beginnings of cross-compilation support. We need to be able to specify or discover the target architecture.

I see that as of ghc-7, ghc --info now reports its target platform:

 ,("Build platform","x86_64-unknown-linux")
,("Host platform","x86_64-unknown-linux")
,("Target platform","x86_64-unknown-linux")
Can you check what it uses on OSX 32 and 64 bit?


We tried this with 32bit and 64bit GHC builds on a (64bit) Mac, and got the following:

,("Build platform","i386-apple-darwin")
,("Host platform","i386-apple-darwin")
,("Target platform","i386-apple-darwin")

,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")

We also ran into this issue when using a GHC with a different amount of bits in a chroot and sharing the same home dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment