discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot locate symbol "utext_setup_67"


From: Frederik Seiffert
Subject: Re: cannot locate symbol "utext_setup_67"
Date: Sat, 2 May 2020 20:58:21 +0200

Hi Stefan,

>>> I rebuilt the Android Toolchain with the current state of master today and 
>>> updated the cmake arguments with "-DANDROID_STL=c++_shared“ according to 
>>> the examples, but now I’m getting a crash with
>>> 
>>>  java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol 
>>> "utext_setup_67" referenced by „(…)==/lib/x86/libgnustep-base.so"…


You should be able to fix this by loading the ICU libraries (icuuc and icui18n) 
at runtime before your native library that is using GNUstep, as is done in the 
example project:

https://github.com/gnustep/android-examples/blob/master/hello-objectivec/app/src/main/java/com/algoriddim/androidgnusteptest/MainActivity.java#L14-L18

TBH I’m not entirely sure why this is necessary, although it might be related 
to this ugly hack I had to employ to remove the version numbers from 
SONAME/DT_NEEDED in the ICU libs, as the Android NDK doesn’t support versioned 
libraries (if someone has a suggestion as to how to do this in a less hacky way 
please let me know):

https://github.com/gnustep/tools-android/blob/5bbac54/phases/16-icu.sh#L86-L106

> The README says 'The toolchain automatically downloads and installs the NDK 
> and prebuilt Clang release (via install-ndk.sh)‘. I don’t think it did that 
> when I run ./build.sh (I don’t remember if it did when I initially installed 
> built GNUstep in January.

Sorry, I just fixed this in the readme – this is no longer necessary. I 
recently updated the toolchain to use the Clang that’s bundled with the latest 
NDK (r21b), since it’s now recent enough to include all necessary fixes for 
Objective-C support, so we no longer have to assemble our own NDK/Clang.

Frederik



> Am 02.05.2020 um 12:14 schrieb Stefan Pauwels <stefan@pauwels.ch>:
> 
> The README says 'The toolchain automatically downloads and installs the NDK 
> and prebuilt Clang release (via install-ndk.sh)‘. I don’t think it did that 
> when I run ./build.sh (I don’t remember if it did when I initially installed 
> built GNUstep in January.
> 
> When I try to run 
> 
> ./install-ndk.sh -r 21 -c r377782d
> 
> manually I get an error, though
> 
> unzip:  cannot find zipfile directory in one of 
> android-ndk-21-darwin-x86_64.zip or
>        android-ndk-21-darwin-x86_64.zip.zip, and cannot find 
> android-ndk-21-darwin-x86_64.zip.ZIP, period.
> 
> 
>> Am 02.05.2020 um 09:38 schrieb Fred Kiefer <fredkiefer@gmx.de>:
>> 
>> i am no expert in this area, but my first idea would be that GNUstep base 
>> was build with ICU 67 installed and so this function got used (in the code 
>> we just reference text_setup) and now this version cannot be found during 
>> linking. On a normal Linux system I would suggest to use ldd on 
>> gnustep-base.so to see where the references point to. On Android I don’t 
>> know whether this command is available.
>> The easiest way out would be to rebuild GNUstep from scratch and see if the 
>> error persists.
>> 
>> Hope this helps,
>> Fred
>> 
>>> Am 01.05.2020 um 23:34 schrieb Stefan Pauwels <stefan@pauwels.ch>:
>>> 
>>> I rebuilt the Android Toolchain with the current state of master today and 
>>> updated the cmake arguments with "-DANDROID_STL=c++_shared“ according to 
>>> the examples, but now I’m getting a crash with
>>> 
>>>  java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol 
>>> "utext_setup_67" referenced by „(…)==/lib/x86/libgnustep-base.so"…
>>> 
>>> Any ideas?
>>> Thanks!
>>> 
>>> Stefan
>> 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]