pelya / libiconv-libicu-android

Port of libiconv and libicu to Android
The Unlicense
30 stars 44 forks source link

Cannot build on Github Actioins #14

Open o01eg opened 3 years ago

o01eg commented 3 years ago

I'm trying to setup CD compilation and get error:

env CFLAGS=-D_IO_getc=getc LDFLAGS=-L/Users/runner/work/freeorion-sdk/freeorion-sdk/build-boost/Boost-for-Android/libiconv-libicu-android/armeabi-v7a /Users/runner/work/freeorion-sdk/freeorion-sdk/build-boost/Boost-for-Android/libiconv-libicu-android/setEnvironment-armeabi-v7a.sh ./configure --host=armv7a-linux-androideabi16 --prefix=/Users/runner/work/freeorion-sdk/freeorion-sdk/build-boost/Boost-for-Android/libiconv-libicu-android/armeabi-v7a/libiconv-1.15/.. --enable-static --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for armv7a-linux-androideabi16-strip... /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for armv7a-linux-androideabi16-gcc... /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang
checking whether the C compiler works... no
configure: error: in `/Users/runner/work/freeorion-sdk/freeorion-sdk/build-boost/Boost-for-Android/libiconv-libicu-android/armeabi-v7a/libiconv-1.15':
configure: error: C compiler cannot create executables
See `config.log' for more details
Found candidate GCC installation: /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x
Selected GCC installation: /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x
Candidate multilib: thumb;@mthumb
Candidate multilib: armv7-a;@march=armv7-a
Candidate multilib: armv7-a/thumb;@march=armv7-a@mthumb
Candidate multilib: .;
... rest of stderr output deleted ...
configure:4117: $? = 0
configure:4106: /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:4117: $? = 1
configure:4106: /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:4117: $? = 1
configure:4137: checking whether the C compiler works
configure:4159: /Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang -g -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mthumb -Wformat -Werror=format-security -Oz -DNDEBUG -fPIC -D_IO_getc=getc   -fPIC -g -ffunction-sections -fdata-sections -Wl,--gc-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mthumb -Wformat -Werror=format-security -Oz -DNDEBUG -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-rosegment -landroid -llog -latomic -lm -ldl -L/Users/runner/work/freeorion-sdk/freeorion-sdk/build-boost/Boost-for-Android/libiconv-libicu-android/armeabi-v7a  conftest.c  >&5
/Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: --no-rosegment: unknown option
/Users/runner/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: use the --help option for usage information
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:4163: $? = 1
configure:4201: result: no

When I built it on Linux and commit 4eb666719e71e719574610ea4ff9601ff57cf3b1 I got:

configure:4111: $? = 1
configure:4100: /mnt/new/o01eg/android/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:4111: $? = 1
configure:4131: checking whether the C compiler works
configure:4153: /mnt/new/o01eg/android/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi16-clang -g -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mthumb -Wformat -Werror=format-security -Oz -DNDEBUG -fPIC -D_IO_getc=getc   -fPIC -g -ffunction-sections -fdata-sections -Wl,--gc-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mthumb -Wformat -Werror=format-security -Oz -DNDEBUG -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -landroid -llog -latomic -lm -ldl -L/mnt/new/o01eg/freeorion-adroid-sdk/armeabi-v7a/Boost-for-Android/libiconv-libicu-android/armeabi-v7a  conftest.c  >&5
configure:4157: $? = 0
configure:4205: result: yes
configure:4208: checking for C compiler default output file name
configure:4210: result: a.out

I found related bug but didn't see help for autoconf https://github.com/android/ndk/issues/1426

o01eg commented 3 years ago

I've tried to reproduce it for boost-for-android but it looks like only old ndk is broken https://github.com/moritz-wundke/Boost-for-Android/pull/225