chromebrew icon indicating copy to clipboard operation
chromebrew copied to clipboard

[ldc] Unable to execute ldmd2

Open uberhacker opened this issue 3 years ago • 6 comments

$ ldmd2
ldmd2: error while loading shared libraries: libLLVMLTO.so.5: cannot open shared object file: No such file or directory

uberhacker avatar Jul 10 '22 17:07 uberhacker

Does a rebuild fix it?

satmandu avatar Jul 10 '22 20:07 satmandu

No, this is an unusual build since the d compiler is needed to compile d itself. A true chicken before the egg scenario.

uberhacker avatar Jul 10 '22 20:07 uberhacker

Is there a bootstrap compiler available like Go and some of the Lisps both make available?

cstrouse avatar Jul 10 '22 22:07 cstrouse

There is another project: https://github.com/dlang/dmd. Even this needs a d compiler to build.

uberhacker avatar Jul 10 '22 23:07 uberhacker

doesn't the GNU Compiler Collection provide a D compiler?

Edit: yes it does, it's called gdc and should be bundled with the gcc package if we compiled it in a way that includes the D compiler

Edit 2: Additionally, if we compiled the package in question with gdc, it may lose its dependency on LLVM altogether.

Edit 3: I'm stupid, this is about the LLVM D compiler, not the reference D compiler, DMD. My bad. Maybe this will help a little bit as we could use GDC to compile DMD to compile LDMD2? Just spouting things off. How do other distros do it?

saltedcoffii avatar Jul 11 '22 16:07 saltedcoffii

Rebuilding gcc with d support might be sufficient to provide a bootstrapping d compiler for ldc... Feel free to try that?

satmandu avatar Jul 11 '22 16:07 satmandu

Building GCC 10 with D enabled then using the gdc from that to build the latest GCC with D enabled should allow us to have a proper package for ldc, but since we don't right now, this issue is no longer relevant.

Zopolis4 avatar Mar 09 '24 23:03 Zopolis4