Skip to content
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

Getting link error when compiling for aarch64-linux-android (File in wrong format) #2

Closed
mageshb opened this issue Oct 21, 2017 · 22 comments

Comments

@mageshb
Copy link

mageshb commented Oct 21, 2017

when I tried to build for android using the following command

aarch64-linux-android-cabal install tagged --allow-newer

I'm gettinig following error

ld: dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o: Relocations in generic ELF (EM: 183)
dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o: error adding symbols: File in wrong format

Any idea / suggestion to fix this error?

@angerman
Copy link
Contributor

This looks like it doesn't pick up the proper ld. Did you have the toolchain-wrapper in $PATH prior to running ./configure?

Could you post the full log with -v?

@mageshb
Copy link
Author

mageshb commented Oct 21, 2017

I guess I had toolchain-wrapper in the path before running the configure. Anyways I tried reinstalling it now and I'm still getting the same error
Following are the full log with -v flag

magesh% aarch64-linux-android-cabal install tagged --allow-newer -v
Using a sandbox located at /home/magesh/Work/labs/mobile/.cabalsb
/home/magesh/.local/bin/alex --version
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-clang -dumpversion
looking for tool haddock near compiler in
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin
/home/magesh/.local/bin/happy --version
looking for tool hpc near compiler in
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin
looking for tool hsc2hs near compiler in
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin
/home/magesh/.local/bin/hsc2hs --version
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc -hide-all-packages -c /tmp/11891-0.c -o /tmp/11891-1.o
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-ld -x -r /tmp/11891-1.o -o /tmp/11891-2.o
/usr/bin/pkg-config --version
looking for tool runghc near compiler in
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin
/bin/tar --help
Reading installed packages...
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc-pkg dump '--package-db=/home/magesh/Work/labs/mobile/.cabalsb/aarch64-linux-android-ghc-8.3.20171020-packages.conf.d' -v0
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc --print-libdir
Found no modified add-source deps.
Reading available packages...
index-state(hackage.haskell.org) = 2017-10-20T20:00:38Z
index-state() =
/usr/bin/pkg-config --list-all
/usr/bin/pkg-config --modversion pm-utils libpq com_err poppler-data yelp-xsl mit-krb5-gssapi libpcreposix fontutil usbutils bash-completion iso-codes mobile-broadband-provider-info ibus-table systemd libpcrecpp xorg-wacom openssl libffi shared-mime-info intel-gen4asm adwaita-icon-theme libcrypto mit-krb5 libpcre m17n-db libssl udev xbitmaps gnome-icon-theme zlib libquvi-scripts libpcre32 libpcre16 xkeyboard-config xkbcomp
Resolving dependencies...
Notice: installing into a sandbox located at
/home/magesh/Work/labs/mobile/.cabalsb
Number of threads used: 8.
Extracting
/home/magesh/.cabal/packages/hackage.haskell.org/transformers-compat/0.5.1.4/transformers-compat-0.5.1.4.tar.gz
to /tmp/cabal-tmp-11891...
Updating transformers-compat.cabal with the latest revision from the index.
Configuring transformers-compat-0.5.1.4...
Using self-exec internal setup method with build-type Simple and args:
["act-as-setup","--build-type=Simple","--","configure","--verbose=2","--builddir=dist/dist-sandbox-4e9ffd62","--ghc","--prefix=/home/magesh/Work/labs/mobile/.cabalsb","--bindir=/home/magesh/Work/labs/mobile/.cabalsb/bin","--libdir=/home/magesh/Work/labs/mobile/.cabalsb/lib","--libsubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0","--dynlibdir=/home/magesh/Work/labs/mobile/.cabalsb/lib/aarch64-linux-android-ghc-8.3.20171020","--libexecdir=/home/magesh/Work/labs/mobile/.cabalsb/libexec","--libexecsubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4","--datadir=/home/magesh/Work/labs/mobile/.cabalsb/share","--datasubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4","--docdir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4","--htmldir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4/html","--haddockdir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4/html","--sysconfdir=/home/magesh/Work/labs/mobile/.cabalsb/etc","--disable-shared","--configure-option=--host=aarch64-linux-android","--global","--package-db=/home/magesh/Work/labs/mobile/.cabalsb/aarch64-linux-android-ghc-8.3.20171020-packages.conf.d","--flags=-two","--flags=-three","--flags=mtl","--ipid=transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0","--extra-prog-path=/home/magesh/.cabal/bin","--dependency=base=base-4.11.0.0","--dependency=ghc-prim=ghc-prim-0.5.2.0","--dependency=transformers=transformers-0.5.4.0","--disable-tests","--exact-configuration","--disable-benchmarks","--with-gcc=aarch64-linux-android-clang","--with-ghc=aarch64-linux-android-ghc","--with-ghc-pkg=aarch64-linux-android-ghc-pkg","--with-ld=aarch64-linux-android-ld","--hsc2hs-option=--cross-compile"]
/home/magesh/.local/bin/cabal act-as-setup --build-type=Simple -- configure
--verbose=2 --builddir=dist/dist-sandbox-4e9ffd62 --ghc
--prefix=/home/magesh/Work/labs/mobile/.cabalsb
--bindir=/home/magesh/Work/labs/mobile/.cabalsb/bin
--libdir=/home/magesh/Work/labs/mobile/.cabalsb/lib
--libsubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
--dynlibdir=/home/magesh/Work/labs/mobile/.cabalsb/lib/aarch64-linux-android-ghc-8.3.20171020
--libexecdir=/home/magesh/Work/labs/mobile/.cabalsb/libexec
--libexecsubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
--datadir=/home/magesh/Work/labs/mobile/.cabalsb/share
--datasubdir=aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
--docdir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
--htmldir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4/html
--haddockdir=/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4/html
--sysconfdir=/home/magesh/Work/labs/mobile/.cabalsb/etc --disable-shared
--configure-option=--host=aarch64-linux-android --global
--package-db=/home/magesh/Work/labs/mobile/.cabalsb/aarch64-linux-android-ghc-8.3.20171020-packages.conf.d
--flags=-two --flags=-three --flags=mtl
--ipid=transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
--extra-prog-path=/home/magesh/.cabal/bin --dependency=base=base-4.11.0.0
--dependency=ghc-prim=ghc-prim-0.5.2.0
--dependency=transformers=transformers-0.5.4.0 --disable-tests
--exact-configuration --disable-benchmarks
--with-gcc=aarch64-linux-android-clang --with-ghc=aarch64-linux-android-ghc
--with-ghc-pkg=aarch64-linux-android-ghc-pkg
--with-ld=aarch64-linux-android-ld --hsc2hs-option=--cross-compile
Redirecting build log to {handle:
/home/magesh/Work/labs/mobile/.cabalsb/logs/ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.log}
Building transformers-compat-0.5.1.4...
Using self-exec internal setup method with build-type Simple and args:
["act-as-setup","--build-type=Simple","--","build","--verbose=2","--builddir=dist/dist-sandbox-4e9ffd62"]
/home/magesh/.local/bin/cabal act-as-setup --build-type=Simple -- build
--verbose=2 --builddir=dist/dist-sandbox-4e9ffd62
Redirecting build log to {handle:
/home/magesh/Work/labs/mobile/.cabalsb/logs/ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.log}
Failed to install transformers-compat-0.5.1.4
Build log ( /home/magesh/Work/labs/mobile/.cabalsb/logs/ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.log ):
cabal: Entering directory '/tmp/cabal-tmp-11891/transformers-compat-0.5.1.4'
Configuring transformers-compat-0.5.1.4...
Flags chosen: mtl=True, three=False, two=False
Dependency base ==4.11.0.0: using base-4.11.0.0
Dependency ghc-prim ==0.5.2.0: using ghc-prim-0.5.2.0
Dependency transformers ==0.5.4.0: using transformers-0.5.4.0
Source component graph: component lib
Configured component graph:
component transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
include base-4.11.0.0
include transformers-0.5.4.0
include ghc-prim-0.5.2.0
Linked component graph:
unit transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
include base-4.11.0.0
include transformers-0.5.4.0
include ghc-prim-0.5.2.0
Control.Monad.Trans.Instances=transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0:Control.Monad.Trans.Instances
Ready component graph:
definite transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
depends base-4.11.0.0
depends transformers-0.5.4.0
depends ghc-prim-0.5.2.0
Using Cabal-2.0.0.2 compiled by ghc-8.2
Using compiler: ghc-8.3.20171020
Using install prefix: /home/magesh/Work/labs/mobile/.cabalsb
Executables installed in: /home/magesh/Work/labs/mobile/.cabalsb/bin
Libraries installed in:
/home/magesh/Work/labs/mobile/.cabalsb/lib/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0
Dynamic Libraries installed in:
/home/magesh/Work/labs/mobile/.cabalsb/lib/aarch64-linux-android-ghc-8.3.20171020
Private executables installed in:
/home/magesh/Work/labs/mobile/.cabalsb/libexec/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
Data files installed in:
/home/magesh/Work/labs/mobile/.cabalsb/share/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
Documentation installed in:
/home/magesh/Work/labs/mobile/.cabalsb/share/doc/aarch64-linux-android-ghc-8.3.20171020/transformers-compat-0.5.1.4
Configuration files installed in: /home/magesh/Work/labs/mobile/.cabalsb/etc
Using alex version 3.2.3 found on system at: /home/magesh/.local/bin/alex
Using ar found on system at:
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 4.2.1 given by user at:
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-clang
Using ghc version 8.3.20171020 given by user at:
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc
Using ghc-pkg version 8.3.20171020 given by user at:
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
No haddock found
Using happy version 1.19.8 found on system at: /home/magesh/.local/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
No hpc found
Using hsc2hs version 0.68.2 found on system at: /home/magesh/.local/bin/hsc2hs
No hscolour found
No jhc found
Using ld given by user at:
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-ld
No lhc found
No lhc-pkg found
Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
No runghc found
Using strip version 2.26 found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
Component build order: library
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc-pkg init dist/dist-sandbox-4e9ffd62/package.conf.inplace
creating dist/dist-sandbox-4e9ffd62/build
creating dist/dist-sandbox-4e9ffd62/build/autogen
creating dist/dist-sandbox-4e9ffd62/build/autogen
Preprocessing library for transformers-compat-0.5.1.4..
Building library for transformers-compat-0.5.1.4..
creating dist/dist-sandbox-4e9ffd62/build
/usr/local/haskell/ghc-8.3.20171020-aarch64-unknown-linux-android/bin/aarch64-linux-android-ghc --make -fbuilding-cabal-package -O -outputdir dist/dist-sandbox-4e9ffd62/build -odir dist/dist-sandbox-4e9ffd62/build -hidir dist/dist-sandbox-4e9ffd62/build -stubdir dist/dist-sandbox-4e9ffd62/build -i -idist/dist-sandbox-4e9ffd62/build -isrc -idist/dist-sandbox-4e9ffd62/build/autogen -idist/dist-sandbox-4e9ffd62/build/global-autogen -Idist/dist-sandbox-4e9ffd62/build/autogen -Idist/dist-sandbox-4e9ffd62/build/global-autogen -Idist/dist-sandbox-4e9ffd62/build -optP-include -optPdist/dist-sandbox-4e9ffd62/build/autogen/cabal_macros.h -this-unit-id transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0 -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/magesh/Work/labs/mobile/.cabalsb/aarch64-linux-android-ghc-8.3.20171020-packages.conf.d -package-db dist/dist-sandbox-4e9ffd62/package.conf.inplace -package-id base-4.11.0.0 -package-id transformers-0.5.4.0 -package-id ghc-prim-0.5.2.0 -XHaskell98 Control.Monad.Trans.Instances Paths_transformers_compat
[1 of 2] Compiling Control.Monad.Trans.Instances ( src/Control/Monad/Trans/Instances.hs, dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o )
[2 of 2] Compiling Paths_transformers_compat ( dist/dist-sandbox-4e9ffd62/build/autogen/Paths_transformers_compat.hs, dist/dist-sandbox-4e9ffd62/build/Paths_transformers_compat.o )
Linking...
[(DefiniteUnitId (DefUnitId {unDefUnitId = UnitId
"base-4.11.0.0"}),DefaultRenaming),(DefiniteUnitId (DefUnitId {unDefUnitId =
UnitId "transformers-0.5.4.0"}),DefaultRenaming),(DefiniteUnitId (DefUnitId
{unDefUnitId = UnitId "ghc-prim-0.5.2.0"}),DefaultRenaming)]
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-ar -r dist/dist-sandbox-4e9ffd62/build/objs-11956/libHStransformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.a dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o dist/dist-sandbox-4e9ffd62/build/Paths_transformers_compat.o
ar: creating dist/dist-sandbox-4e9ffd62/build/objs-11956/libHStransformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.a
/home/magesh/.local/toolchain-wrapper/aarch64-linux-android-ld -z noexecstack -r -o dist/dist-sandbox-4e9ffd62/build/HStransformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0.o dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o dist/dist-sandbox-4e9ffd62/build/Paths_transformers_compat.o
ld: dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o: Relocations in generic ELF (EM: 183)
dist/dist-sandbox-4e9ffd62/build/Control/Monad/Trans/Instances.o: error adding symbols: File in wrong format
cabal: Leaving directory '/tmp/cabal-tmp-11891/transformers-compat-0.5.1.4'
World file is already up to date.
CallStack (from HasCallStack):
die', called at ./Distribution/Client/Install.hs:995:15 in main:Distribution.Client.Install
cabal: Error: some packages failed to install:
tagged-0.8.5-EkQVfby3Ccb9K7z4GBfKrH depends on tagged-0.8.5 which failed to
install.
transformers-compat-0.5.1.4-8tARQn6wIN4Ezo5ebGh0R0 failed during the building
phase. The exception was:
ExitFailure 1

@angerman
Copy link
Contributor

So this supposedly happens when trying to link two files built with different compilers. I’m still confused how this happened.

Could you try building just a simple

main = putStrLn “Hello World” with the cross compiler? So we can rule out some cabal related issues?

Sorry for all the trouble :-(

@mageshb
Copy link
Author

mageshb commented Oct 21, 2017

Simple Program compiles fine without any issue.

magesh% cat Hello.hs
module Hello where

sayHello :: String -> String
sayHello m = "Hello " ++ m

magesh% aarch64-linux-android-ghc -staticlib Hello.hs -o Hello
[1 of 1] Compiling Hello ( Hello.hs, Hello.o )
Linking Hello.a ...

As far as cabal is concerned, I was playing with IOS Simulator version (x86_64-apple-ios) of previous build and it was working fine. Haven't checked with the latest build though in Mac

@angerman
Copy link
Contributor

So, it's somewhere with how cabal handles things (or potentially stale cabal left overs, somewhere?). On the other hand Hello.hs only has one library, and we don't link multiple object files.

Anyway. Could you try building tagged using new-build? I've been using the new-* commands pretty exclusively. Again, sorry for the inconvenience.

@mageshb
Copy link
Author

mageshb commented Oct 21, 2017

new-build is working fine.
I guess we are having problem only with normal (old) cabal build. I tried even cleaning the sandbox and rebuilt the lib and I was getting the same error.
I will try doing the same experiment with Mac build for IOS and update you on that.
And thanks a lot for taking your time out and helping me with the issues.

@angerman
Copy link
Contributor

Good to know! Looking forward to the iOS report!

@mageshb
Copy link
Author

mageshb commented Oct 21, 2017

I'm getting failure while trying to install zlib
I cloned latest zlib from https://github.com/haskell/zlib
This failure happens only on my ubuntu's ghc cross compiler and it works fine in Mac.
Also with normal GHC in ubuntu, I'm able to install zlib fine.

Configuring library for zlib-0.6.1.2..
cabal: Missing dependency on a foreign library:
* Missing C library: z

Any idea about why this might be happening

@angerman
Copy link
Contributor

Do you have the libz-dev or the equivalent development package for libz installed?

@mageshb
Copy link
Author

mageshb commented Oct 22, 2017

Is it called zlib1g-dev in ubuntu. Because when I tried apt-get install libz-dev, I was getting

Note, selecting 'zlib1g-dev' instead of 'libz-dev'
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).

@mageshb mageshb closed this as completed Oct 22, 2017
@mageshb mageshb reopened this Oct 22, 2017
@angerman
Copy link
Contributor

Ohh wait. I'm stupid. You are trying to cross compile to android, right? So installing it on your build systems doesn't help. The issue is that it can't find libz in the SDK.

Does the Android NDK come with libz? Otherwise you might need to install it for android.
It might also be that the paths in the linux-android-toolchain.config (toolchain wrapper folder) are just not aligned with your android NDK?

@angerman
Copy link
Contributor

Hi @mageshb did you get anywhere with his? Also in #4 someone provided an installer, which might need some testing on linux :-)

@mageshb
Copy link
Author

mageshb commented Oct 23, 2017

Hi @angerman Ya I'm able get zlib installed. My NDK path was fine, but I made a stupid mistake of not changing darwin to linux in ADR_HOST_ARCH variable :(
But now I'm getting a different error in network package

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.

@angerman
Copy link
Contributor

angerman commented Oct 23, 2017

Ahh the love those errors... looking at network.cabal,
we see

build-type:     Configure

if this was just Custom, we could have tried simply replacing it with Simple as I wrote in The Haskell Cabal and Cross Compilation.

However for configure we clearly need to pass --host somehow. I don't know how your cabal invocation looks. And I'm not absolutely sure how to forward arguments to the configure invocation. But I believe there should be an option. So what you are looking for is to pass --host=aarch64-linux-android somehow to the configure script via cabal.

@mageshb
Copy link
Author

mageshb commented Oct 23, 2017

How come this is working fine in x86_64-apple-ios version?

@angerman
Copy link
Contributor

Well, with x86_64-apple-ios, your compilers will eventually build for x86_64, which your host is as well. It's not the same OS, but in this case this is not that much on a issue. The produced x86_64 binary can still be executed.

However if the test binary is built for arm, it won't be able to run on the compiler host.

@mageshb
Copy link
Author

mageshb commented Oct 23, 2017

Does this mean we will face the same issue for aarch64-apple-ios build?
I tried this

aarch64-linux-android-cabal new-build all --allow-newer --configure-option="--host=aarch64-linux-android"

Getting the same error. Not sure even whether the way I'm passing the flag is correct

@angerman
Copy link
Contributor

Does this mean we will face the same issue for aarch64-apple-ios build
Yes!

Hmm... I'll have to dig into this, and won't have a chance before tomorrow. Maybe the --configure-option with new-build is not respected? There are some kinks with new-build :(

@mageshb
Copy link
Author

mageshb commented Oct 23, 2017

Hmm... I'll have to dig into this, and won't have a chance before tomorrow.
No Issues

Here I was trying to build the same set of dependencies for aarch64-apple-ios. I guess problem is with cabal's new-build
With Cabal Old Build, I was able get everything build including network without any issues.
But when I tried the same with cabal new-build, I got the same error that I got in Linux.

@angerman
Copy link
Contributor

Could I ask you to open an issue with haskell/cabal regarding the ignorance of --configure-option for new-build?

@mageshb
Copy link
Author

mageshb commented Oct 24, 2017

Done.
haskell/cabal#4844

@angerman
Copy link
Contributor

I believe the core issue here is haskell/cabal#4939, as such unpacking / adding the dependency as a submodule should get you further for the time being. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants