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

Anton Smirnov dev at antonsmirnov.name
Mon Oct 14 06:10:49 PDT 2013


The same problem if i recompile is in Debug mode and libclang.so is about
48Mb.

Any thoughts?


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

> Hey.
>
> I've compiled llvm/clang with arm-linux-gnueabi toolchain:
>
> BUILD=/home/asmirnov/llvm_33_arm_build_gnueabi_cmake
> rm -rf $BUILD
> mkdir $BUILD
> cd $BUILD
>
> cmake ../llvm_33 -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc
> -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ -DCMAKE_CROSSCOMPILING=True
> -DLLVM_TABLEGEN=/home/asmirnov/llvm_33_build/Release+Asserts/bin/llvm-tblgen
> -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabi -DLLVM_TARGET_ARCH=ARM
> -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_SYSTEM_NAME=Linux
> -DCMAKE_BUILD_TYPE=Release
>
> When i try to load library libclang.so.3.3 on android (linux), i'm getting
> an error:
>
> 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)
>
> The sources are extracted for clang release 3.3 (llvm, compiler-rt and
> clang). The build type is "Release". So what should i do in order to link
> it statically (or walk-around lib absence)?
>
> PS. "libclang.so.3.3" file size is about 14mb.
>
> Regards, Anton.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131014/1a977eb5/attachment.html>


More information about the cfe-dev mailing list