New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cabal-install infers the wrong $arch/$os when used with a cross-compiler #1184
Comments
Currently, the values from |
Can I suggest that, once this is supported, it become the default setting for libsubdir, with similar defaults for datasubdir and docs? |
This also causes packages like |
@singpolyma Good point. The target platform should be also used instead of the host platform in conditions. |
I've done some work on this at https://github.com/ghc-ios/packages-Cabal because I'm going to need this for cross-compiling to iOS to work properly. |
This patch https://gist.github.com/the-real-blackh/4983885 adds --host-os=XX and --host-arch=XX options, and also an OS called "ios". I need this functionality for the iOS cross-compile changes in ghc. It doesn't specifically address the naming of the directory as .cabal/lib/$arch-$os/..., but this would be easy to add to what I've already done. |
@the-real-blackh Would you mind creating a pull request once you think the code is ready so we can review it? Thanks! |
Thanks for that. I've decided that the only proper way to do it would be to do what Simon M says and extract the hostOS and hostArch automatically from the selected ghc. So I'll work on that and prepare a pull request. |
Hi guys, on behalf of @the-real-blackh and I here's a pull request addressing this. #1210 |
#1214 should have fixed this. Feel free to reopen. |
I want to install packages using
cabal
with a GHC cross-compiler, and have them installed into.cabal/lib/$arch-$os/...
so that they don't conflict with my native packages. Unfortunately,cabal
uses the host rather than the target$arch-$os
, so the cross-compiled packages will conflict with my native packages.In my
~/.cabal/config
I havewhere my local
$arch-$os
isx86_64-linux
and the target isarm-linux
.The correct target platform could be obtained by passing
--info
to the GHC named in--with-ghc
.The text was updated successfully, but these errors were encountered: