[cfe-dev] Static Linking and loading "libclang.so"

Anton Smirnov dev at antonsmirnov.name
Mon Oct 14 06:57:48 PDT 2013


I've found /system/lib/libdl.so on my android device. So i wonder why it's
not found and loaded.
Does the fact that i'm compiling on linux 64bit but it's running on linux
32bit (android) affect this?


2013/10/14 Anton Smirnov <dev at antonsmirnov.name>

> As target system is Android i can't just add packages without rooting
> which is not desired.
> That's why i'd like to link libclang statically in order to have all
> dependencies within .so.
>
> Is it possible?
>
>
> 2013/10/14 Renato Golin <renato.golin at linaro.org>
>
>> On 14 October 2013 08:42, Anton Smirnov <dev at antonsmirnov.name> wrote:
>>
>>> Caused by: java.lang.UnsatisfiedLinkError: Cannot load library:
>>> link_image[1891]:   185 could not load needed library 'libdl.so.2' for
>>> 'libclang.so.3.3' (load_library[1093]: Library 'libdl.so.2' not found)
>>>
>>
>> Hi Anton,
>>
>> libdl is required (as others) and probably not installed in your target
>> system. You should be able to install it via yum/apt-get etc.
>>
>> Installing Clang via packages would probably bring that dependency
>> automatically, but you compiled it from scratch on a separate machine, so
>> dependencies won't be met automatically.
>>
>> And, yes, Clang/LLVM libraries are huge, especially ones with debug
>> symbols in it.
>>
>> cheers,
>> --renato
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131014/4fd153b3/attachment.html>


More information about the cfe-dev mailing list