On Sunday, 14 December 2014 at 16:57:24 UTC, Gabor Mezo wrote:
/home/gabor/dev/ldc2-0.15.0-beta1-linux-x86_64/bin/../lib/libdruntime-ldc.a(eh.o): relocation R_X86_64_32 against `.rodata..str1' can not be used when making a shared object; recompile with -fPIC

Hm, the problem here is that LDC uses a static runtime build, while dynamic libraries require Phobos and druntime to be built as shared libraries. The latter has actually been supported since quite a few months now, but IIRC still isn't shipped as part of the binary packages: https://github.com/ldc-developers/ldc/issues/807

If you want to give it a try, you can quickly build LDC from source (http://wiki.dlang.org/Building_LDC_from_source) and pass the -DBUILD_SHARED_LIBS=ON flag to CMake. Building shared libraries should then succeed.

David

Reply via email to