Open MrSmith33 opened 1 year ago
This is most likely your default linker's fault, since LDC doesn't default to ld.gold
since v1.29 anymore. So depends on what your ld
is, otherwise play with -linker
to select a working one (lld or gold). CI tests that such trivial stuff works.
TL;DR gold
worked
> -link-internally
lld: error: unable to find library -lrt
lld: error: unable to find library -ldl
lld: error: unable to find library -lpthread
lld: error: unable to find library -lm
> -linker=lld-link
cc: error: unrecognized command line option ‘-fuse-ld=lld-link’; did you mean ‘-fuse-ld=lld’?
> -linker=lld
collect2: fatal error: cannot find ‘ld’
> -linker=gold
success
I had cc --version
-> cc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
But what I really want is to run ldc on github CI runners
Looks like you've been using default bfd then. - lld probably needs to be installed first.
To reproduce:
Ubuntu ldc-1.29.0
Ubuntu ldc-1.28.0
Windows ldc-1.30.0
The error is
The code is
Removing
-defaultlib=phobos2-ldc-lto,druntime-ldc-lto
fixes the compilation onUbuntu ldc-1.29.0