-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Q] Android ghc prebuild cross compiler build fail. #1
Comments
you need to instruct gradle to also link in |
I build success by instruct gradle to link But I want to build a
but get compile error : Linking /Users/lihanguang/dev_kit/src_code/hs-android-helloworld/app/hs-libs/arm64-v8a/libhs.so ...
WRAPPED: clang --target=aarch64-linux-android --sysroot /Users/lihanguang/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64 -isystem /Users/lihanguang/dev_kit/Android/sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=24 @/var/folders/x4/9b7hp58x4t54jdslq2mk7_wc0000gn/T/ghc54058_0/ghc_1.rsp
WRAPPED: ld --sysroot /Users/XXX/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64 --sysroot=/Users/XXX/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64 --fix-cortex-a53-843419 --eh-frame-hdr -m aarch64linux -shared -o /Users/XXX/dev_kit/src_code/hs-android-helloworld/app/hs-libs/arm64-v8a/libhs.so /Users/XXX/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/lib/crtbegin_so.o -L/Users/XXX/dev_kit/src_code/hs-android-helloworld/app/pre-build-libs/libiconv_prefix/arm64-v8a/lib -L/Users/XXX/dev_kit/haskell/ghc-8.4.0.20180109-aarch64-linux-android/lib/../lib/aarch64-linux-android-ghc-8.4.0.20180109/base-4.11.0.0 -L/Users/angerman/Projects/zw3rk/prebuilt/libiconv/aarch64-linux-android/lib -L/Users/XXX/dev_kit/haskell/ghc-8.4.0.20180109-aarch64-linux-android/lib/../lib/aarch64-linux-android-ghc-8.4.0.20180109/integer-simple-0.1.1.1 -L/Users/XXX/dev_kit/haskell/ghc-8.4.0.20180109-aarch64-linux-android/lib/../lib/aarch64-linux-android-ghc-8.4.0.20180109/ghc-prim-0.5.2.0 -L/Users/XXX/dev_kit/haskell/ghc-8.4.0.20180109-aarch64-linux-android/lib/../lib/aarch64-linux-android-ghc-8.4.0.20180109/rts-1.0 -L/Users/XXX/dev_kit/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/lib64/clang/6.0.2/lib/linux/aarch64 -L/Users/XXX/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/lib -z noexecstack --hash-size=31 --reduce-memory-overheads --no-as-needed -lm src/main/hs/Lib.o -Bsymbolic -h libhs.so -lHSbase-4.11.0.0 -lHSinteger-simple-0.1.1.1 -lHSghc-prim-0.5.2.0 -liconv -lgcc -ldl -lc -lgcc -ldl /Users/XXX/dev_kit/Android/sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/lib/crtend_so.o
ld: cannot find -lgcc
ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`aarch64-linux-android-clang' failed in phase `Linker'. (Exit code: 1) I donot know why has redundant Is sth i missing or the cross-compiler not support |
The redundant flags should be no issue to the linker.
means it's looking for |
Thanks your reply. The |
Hello dev:
I download a prebuild cross compiler that base on ghc 8.4.0 for android on OSX.
(dowload from http://hackage.mobilehaskell.org/).
Then build the
libhs.a
by typing in termianl:Finally, run this demo by
gradle assembleDebug
, i get a ndk compile error :Could you give me some suggestion? Thanks.
The text was updated successfully, but these errors were encountered: