Closed iguessthislldo closed 3 years ago
I assume you are configuring GNU libiconv with --disable-shared
, but it still wants to install a *.so
file?
It's not configured like that. Out of curiosity I just tried it locally with --disable-shared
. It gets further, but gets to another strange error.
...
cd po && make all
make[1]: Nothing to be done for 'all'.
cd man && make all
make[1]: Nothing to be done for 'all'.
if test -d tests; then cd tests && make all; fi
make[1]: Nothing to be done for 'all'.
mkdir: missing operand
Try 'mkdir --help' for more information.
I also tried it with r21d locally and it failed there too... I think I messed up something, but I'm not sure what.
docs/android.md
says we should use --disable-shared
.
Was there a change in GNU libiconv itself? Or is this using a pegged version?
I think that's for OpenSSL.
Xerces requires a supported "transcoder" library. For API levels greater than
or equal to 28 one of these, GNU libiconv, is included with Android. Before 28
any of the transcoders supported by Xerces would work theoretically but GNU
libiconv was the one tested. If GNU libiconv is used, build it as an archive
library (--disable-shared) so that the users of Xerces (ACE and OpenDDS) don't
need to be aware of it as an additional runtime dependency.
Alright, but I've never configured it like that here.
So I checked again using the last working commit and the difference is in the NDKs. This is the diff between the two up to the error:
diff --git a/r21 b/r22
index 789b6a5..4f61465 100644
--- a/r21
+++ b/r22
@@ -50,9 +50,9 @@ checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by aarch64-linux-android-clang... aarch64-linux-android-ld
-checking if the linker (aarch64-linux-android-ld) is GNU ld... yes
-checking for BSD- or MS-compatible name lister (nm)... /home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B
-checking the name lister (/home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B) interface... BSD nm
+checking if the linker (aarch64-linux-android-ld) is GNU ld... no
+checking for BSD- or MS-compatible name lister (nm)... /home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B
+checking the name lister (/home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to aarch64-unknown-linux-android format... func_convert_file_noop
@@ -67,7 +67,7 @@ checking for aarch64-linux-android-ar... (cached) aarch64-linux-android-ar
checking for archiver @FILE support... @
checking for aarch64-linux-android-strip... (cached) aarch64-linux-android-strip
checking for aarch64-linux-android-ranlib... (cached) aarch64-linux-android-ranlib
-checking command to parse /home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B output from aarch64-linux-android-clang object... ok
+checking command to parse /home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B output from aarch64-linux-android-clang object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
@@ -84,7 +84,6 @@ checking if aarch64-linux-android-clang static flag -static works... no
checking if aarch64-linux-android-clang supports -c -o file.o... yes
checking if aarch64-linux-android-clang supports -c -o file.o... (cached) yes
checking whether the aarch64-linux-android-clang linker (aarch64-linux-android-ld) supports shared libraries... yes
-checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... Android linker
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
@@ -92,7 +91,7 @@ checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld... aarch64-linux-android-ld
-checking if the linker (aarch64-linux-android-ld) is GNU ld... yes
+checking if the linker (aarch64-linux-android-ld) is GNU ld... no
checking for shared library path variable... LD_LIBRARY_PATH
checking whether to activate relocatable installation... no
checking how to copy files... cp -p
@@ -307,9 +306,9 @@ checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by aarch64-linux-android-clang... aarch64-linux-android-ld
-checking if the linker (aarch64-linux-android-ld) is GNU ld... yes
-checking for BSD- or MS-compatible name lister (nm)... /home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B
-checking the name lister (/home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B) interface... BSD nm
+checking if the linker (aarch64-linux-android-ld) is GNU ld... no
+checking for BSD- or MS-compatible name lister (nm)... /home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B
+checking the name lister (/home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to aarch64-unknown-linux-android format... func_convert_file_noop
@@ -325,7 +324,7 @@ checking for archiver @FILE support... @
checking for aarch64-linux-android-strip... aarch64-linux-android-strip
checking for aarch64-linux-android-ranlib... aarch64-linux-android-ranlib
checking for gawk... gawk
-checking command to parse /home/fred/oci/dds/android/OpenDDS-Android/r21d-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B output from aarch64-linux-android-clang object... ok
+checking command to parse /home/fred/oci/dds/android/OpenDDS-Android/r22-arm64-android-27-toolchain/bin/aarch64-linux-android-nm -B output from aarch64-linux-android-clang object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
@@ -342,7 +341,6 @@ checking if aarch64-linux-android-clang static flag -static works... no
checking if aarch64-linux-android-clang supports -c -o file.o... yes
checking if aarch64-linux-android-clang supports -c -o file.o... (cached) yes
checking whether the aarch64-linux-android-clang linker (aarch64-linux-android-ld) supports shared libraries... yes
-checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... Android linker
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
@@ -350,7 +348,7 @@ checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld... aarch64-linux-android-ld
-checking if the linker (aarch64-linux-android-ld) is GNU ld... yes
+checking if the linker (aarch64-linux-android-ld) is GNU ld... no
checking for shared library path variable... LD_LIBRARY_PATH
checking whether to activate relocatable installation... no
checking whether the -Werror option is usable... yes
@@ -386,7 +384,6 @@ libtool: compile: aarch64-linux-android-clang -I. -I. -I.. -I./.. -I../include
make[2]: Leaving directory '/data/work/oci/dds/android/OpenDDS-Android/iconv_source/libcharset/lib'
make[2]: Entering directory '/data/work/oci/dds/android/OpenDDS-Android/iconv_source/libcharset/lib'
/bin/bash ../libtool --mode=link aarch64-linux-android-clang -pie -fPIE -fPIC -fvisibility=hidden -o libcharset.la -rpath /home/fred/oci/dds/android/OpenDDS-Android/secdeps_prefix/lib -version-info 1:0:0 -no-undefined localcharset.lo relocatable-stub.lo
-libtool: link: aarch64-linux-android-clang -shared -fPIC -DPIC .libs/localcharset.o .libs/relocatable-stub.o -Wl,-soname -Wl,libcharset.so -o .libs/libcharset.so
libtool: link: aarch64-linux-android-ar cru .libs/libcharset.a localcharset.o relocatable-stub.o
libtool: link: aarch64-linux-android-ranlib .libs/libcharset.a
libtool: link: ( cd ".libs" && rm -f "libcharset.la" && ln -s "../libcharset.la" "libcharset.la" )
@@ -398,956 +395,11 @@ make[2]: Entering directory '/data/work/oci/dds/android/OpenDDS-Android/iconv_so
/bin/bash ../build-aux/mkinstalldirs /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib
/bin/bash ../libtool --mode=install /usr/bin/install -c libcharset.la /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.la
libtool: install: /usr/bin/install -c .libs/libcharset.so /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.so
-libtool: install: /usr/bin/install -c .libs/libcharset.lai /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.la
-libtool: install: /usr/bin/install -c .libs/libcharset.a /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.a
-libtool: install: chmod 644 /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.a
-libtool: install: aarch64-linux-android-ranlib /home/fred/oci/dds/android/OpenDDS-Android/iconv_source/lib/libcharset.a
-libtool: warning: remember to run 'libtool --finish /home/fred/oci/dds/android/OpenDDS-Android/secdeps_prefix/lib'
+/usr/bin/install: cannot stat '.libs/libcharset.so': No such file or directory
+Makefile:66: recipe for target 'install-lib' failed
+make[2]: *** [install-lib] Error 1
make[2]: Leaving directory '/data/work/oci/dds/android/OpenDDS-Android/iconv_source/libcharset/lib'
It looks like the only real difference up to the point where it decides not to run libtool: link: aarch64-linux-android-clang -shared -fPIC -DPIC .libs/localcharset.o .libs/relocatable-stub.o -Wl,-soname -Wl,libcharset.so -o .libs/libcharset.so
is that it sees ld is not GNU ld. This was changed in r22. Appending ".gold" to LD
fixes the issue with r22. I don't think this is a real solution though because everything should probably be using the same linker.
Okay the actual issue is that LLVM ld isn't being prefixed like GNU ld was (ex: aarch64-linux-android-ld
), so autoconf can't find the linker I'm telling it about. It's kinda annoying because I thought they are already a little inconsistent about what the names of the programs are. Will push a change to use LLD if the NDK is r22 or higher.
Link