[cfe-dev] Libclang runtime dependencies?

Jacob Carlborg doob at me.com
Fri May 11 05:45:29 PDT 2012


On 2012-05-11 13:11, Eran Ifrah wrote:

> When I build LLVM (and clang as tool inside the LLVM tree) for Linux /
> Mac / Windows using MinGW + MSYS
> I am using this configure line:
>
> ./configure --disable-assertions --disable-debug --enable-optimized
> --enable-optimized --disable-threads --disable-shared

I was hoping to use a pre-compiled library. I'm trying to stick to 
releases as much as possible.

Hmm, actually, if I run "otool -L libclang.dylib" it prints:

libclang.dylib:

@rpath/libclang.dylib (compatibility version 1.0.0, current version 0.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
125.2.11)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 
7.9.0)

Which seems to indicate that it only depends on the C++ standard library 
and the C system library (or what else is in libSystem). Those 
dependencies are easy enough to satisfy :)

> The last part: --disable-shared is the key switch, without it your
> libclang will depends on libLLVM.so (or something like that)
> To test the build, simply run 'ldd libclang.so'

Ok, I see.

> For me, I only provide (lib)clang.dylib / dll / so ( choose your suffix
> / prefix) and its enough
> code completion is working without a problem (a bit slow on Windows on a
> real world application and not 'Hello World') - but it is working properly

That's good.

> If you plan on providing the binary on Linux, I suggest that you use an
> older g++ version to build libclang with (I am using g++4.4.1, although
> I could use 4.7) this will "lower" the glibc requirements and you will
> be able
> to use the same binary on different distros
> HTH,

I have a virtual machine running Ubuntu 6.x just for this :)

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list