haskell / haskell/cabal

unable to build network with cabal new-build while using ghc cross compiler

Open
#4,844 1 comment 0 reactions 0 assignees View on GitHub
cabal-install: v2-build system status: consider closing type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

It failed asking for `--host` flag to be passed. `network` package `build-type` in cabal file is set to `Configure`. I tried passing the --host as shown below, but got the same error
```
aarch64-linux-android-cabal new-build all --allow-newer --configure-option="--host=aarch64-linux-android"
```

```
Failed to build network-2.6.3.2. The failure occurred during the configure
step.
Build log (
/home/magesh/.cabal/logs/ghc-8.3.20171020/network-2.6.3.2-912e3feaed63580b88cb6e183c9896fee81a1510d14968f80d68074ac841047c.log
):
Configuring library for network-2.6.3.2..
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... /home/magesh/.local/toolchain-wrapper/aarch64-linux-android-clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/magesh/Work/labs/mobile/hello/dist-newstyle/tmp/src-10692/network-2.6.3.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
cabal: Failed to build network-2.6.3.2 (which is required by
streaming-commons-0.1.18). See the build log above for details.
```

This problem I'm facing only with new-build. With old-build, I'm able to successfully build network without even passing --host flag

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.