How to use dub with a manual ldc installation?

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 4 10:12:42 PDT 2016


So I'm working on the checkedint pull request (really need to get that 
in...) and was trying to get some benchmarks going with ldc. The stock 
ldc on mint is outdated and it can't compile the code, so I needed to do 
a self-installation. I've put it in ~/bin/ldc2-1.1.0-beta3-linux-x86. Then:

$ PATH=~/bin/ldc2-1.1.0-beta3-linux-x86/bin:$PATH
$ dub test --compiler=ldc2

I get:

Performing "unittest" build using ldc2 for x86.
checkedint_andralex 0.0.8: building configuration "__test__library__"...
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1
ldc2 failed with exit code 1.

What happens here? I've added "-L-L/lib" and "-L-L/usr/lib" to ldc's 
configuration file, no avail.


Thanks,

Andrei


More information about the Digitalmars-d mailing list