Ya it's really weird.  XML_LIBS doesn't pickup -lz in my environment for some 
reason (OSX 10.13.6).  


> On Jul 9, 2019, at 2:43 AM, Frederik Seiffert <[email protected]> wrote:
> 
> Hmm interesting. What’s the configure output of libxml2 for for zlib? It 
> should be the following if it finds zlib in the NDK, which should be adding 
> -lz to the linker flags:
> 
>> Checking zlib
>> checking for zlib... yes
> 
> 
> Also if you look at config.log you should see an entry like the following:
> 
>> XML_LIBS='-lxml2 -lz     -lm '
> 
> 
> You could try adding --with-zlib=... in 14-libxml2.sh in the toolchain to 
> specify the path to libz.
> 
> We’ve built the toolchain on multiple machines here without seeing this 
> issue, so I’m interested to find out what this is caused by.
> 
> Frederik
> 
> 
>> Am 08.07.2019 um 22:00 schrieb Jordan Schidlowsky 
>> <[email protected] <mailto:[email protected]>>:
>> 
>> 
>> Hey Frederik,
>> 
>> Having some trouble with the last stage of your build script in 
>> tools-android.  Seems to be an issue linking zlib and libxml2.  I'm going to 
>> take a look but i think it should be dynamically linked with the android 
>> system zlib...
>> 
>> 
>> /Users/jordanschidlowsky/Library/Android/android-ndk-r20-clang-r353983d/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold:
>>  error: z: no archive symbol table (run ranlib)
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlCreateZMemBuff: error: 
>> undefined reference to 'deflateInit2_'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlCreateZMemBuff: error: 
>> undefined reference to 'crc32'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileRead: error: undefined 
>> reference to 'gzread'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileClose: error: undefined 
>> reference to 'gzclose'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function 
>> __xmlParserInputBufferCreateFilename: error: undefined reference to 
>> 'gzdirect'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileOpenW: error: undefined 
>> reference to 'gzdopen'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileOpenW: error: undefined 
>> reference to 'gzopen'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileWrite: error: undefined 
>> reference to 'gzwrite'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlFreeZMemBuff: error: 
>> undefined reference to 'deflateEnd'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileOpen_real: error: 
>> undefined reference to 'gzdopen'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlGzfileOpen_real: error: 
>> undefined reference to 'gzopen'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlZMemBuffAppend: error: 
>> undefined reference to 'deflate'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlZMemBuffAppend: error: 
>> undefined reference to 'crc32'
>> ./.libs/libxml2.a(xmlIO.o):xmlIO.c:function xmlZMemBuffGetContent: error: 
>> undefined reference to 'deflate'
>> ./.libs/libxml2.a(nanohttp.o):nanohttp.c:function xmlNanoHTTPRead: error: 
>> undefined reference to 'inflate'
>> ./.libs/libxml2.a(nanohttp.o):nanohttp.c:function xmlNanoHTTPFreeCtxt: 
>> error: undefined reference to 'inflateEnd'
>> ./.libs/libxml2.a(nanohttp.o):nanohttp.c:function xmlNanoHTTPScanAnswer: 
>> error: undefined reference to 'inflateInit2_'
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>> make[2]: *** [xmllint] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>> 
>> ### phases/14-libxml2.sh failed for ABI armeabi-v7a
>> 
>> 
>> 
>>> On Jul 2, 2019, at 9:16 AM, Frederik Seiffert <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Hi Jordan,
>>> 
>>> Just wanted to follow up on this:
>>> 
>>>> Am 23.05.2019 um 15:51 schrieb Frederik Seiffert <[email protected] 
>>>> <mailto:[email protected]>>:
>>>> 
>>>> It looks like Google also offers prebuilds of newer clang releases that 
>>>> should include the fix above:
>>>> https://android.googlesource.com/platform/prebuilts/clang/host/ 
>>>> <https://android.googlesource.com/platform/prebuilts/clang/host/>
>>>> 
>>>> I haven’t fully figured out how to integrate these in the NDK (some info 
>>>> here 
>>>> <https://groups.google.com/forum/#!msg/android-ndk/VrLv8OYxgWs/Wt21eeljBQAJ>)
>>>>  but it might be easier than doing a full build yourself.
>>> 
>>> I managed to write a script that integrates the latest Clang prebuilt 
>>> (r353983d) into the NDK (r20) by performing the same steps as 
>>> Clang.install() in checkbuild.sh 
>>> <https://android.googlesource.com/platform/ndk/+/master/ndk/checkbuild.py#259>:
>>> https://github.com/gnustep/tools-android/blob/master/install-ndk.sh 
>>> <https://github.com/gnustep/tools-android/blob/master/install-ndk.sh>
>>> This along with switching to the gold linker lets me use the gnustep-2.0 
>>> runtime for both arm32 and arm64 on Android. I thought this may be useful 
>>> to you as well.
>>> 
>>> Frederik
>>> 
>>> _______________________________________________
>>> Discuss-gnustep mailing list
>>> [email protected] <mailto:[email protected]>
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnustep 
>>> <https://lists.gnu.org/mailman/listinfo/discuss-gnustep>
>> 
> 

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to