Compiling with LDC2 and GDC

I had ldc2 and gdc compiled from source code and working up to a month ago. Nothing has changed, except that I can’t remember the variables that I would set in the terminal to work ldc2 and gdc.

When trying to compile the D source code, the following errors occur:

GDC:

$ / Home / Code / D / GDC / Bin / USR / local / bin / GDC -o t4 t4.d / home / Code / D / gdc / Bin / usr / local / bin /../ libexec / gcc / x86_64 -unknown-linux-gnu / 4.4.5 / cc1d: error loading shared libraries: libmpfr.so.1: cannot open shared object file: There is no such file or directory

ldc2:

$ / home / Code / D / ldc2 / bin / ldc2 -o t4 t4.d / home / Code / D / ldc2 / bin / ldc2: error loading shared libraries: libconfig ++. so.8: cannot open shared object file: No such file or directory

I can’t remember if it was just an addition to PATH or something in DFLAGS. Any ideas?


EDIT: Recompiling both LDC2 and GDC solved the problem, but I still don't know why I am getting errors.

+4
source share
2 answers

A bug with LDC means that you (re) moved libconfig ++ after compiling it. PATH and DFLAGS not related to each other, but, as Dan pointed out in his answer, LD_LIBRARY_PATH can be used to add additional places to the search path.

If you want to have a standalone installation for any reason, you can install RPATH in the bin directory and copy libconfig ++ there, as you would when creating binary packages: https://github.com/ldc-developers/ldc-scripts/blob/master/ ldc2-packaging / 2-build-ldc.sh # L18 .

The same story for the GDC error - it depends on the GNF MPFR library, which was either removed or replaced by an incompatible version during the upgrade.

+1
source

This error may occur if the .so files are not in your $LD_LIBRARY_PATH , I think.

0
source

All Articles