ldc link error on new machine: undefined reference to `_D6object9Throwable7messageMxFNbNfZAxa'

mw mingwu at gmail.com
Thu Jun 15 00:49:30 UTC 2023


Hi,

I switched to a different machine to build my project, suddenly I 
got lots of link errors. (It builds fine on the old machine, and 
my software version are the same on both machines LDC - the LLVM 
D compiler (1.32.2))

e.g.:
```
...
/usr/bin/ld: 
/home//.dub/cache/cachetools/0.3.1/build/library-unittest-linux.posix-x86_64-ldc_v1.32.2-71414BF132F687B008642EB263AC23264B21497EA1FEF7D8AFA169EDF7967ADF/libcachetools.a(cachetools.containers.hashmap.o):(.data.rel.ro._D10cachetools10containers7hashmap11KeyNotFound6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFNbNfZAxa'
```

even manually specify
```
         "lflags-ldc": [
                 "-ldruntime-ldc"
         ],
```
does not solve the problem, while the symbol is there:

```
$ nm /project/ldc2/lib/libdruntime-ldc.a | grep 
_D6object9Throwable7messageMxFNbNfZAxa
                  U _D6object9Throwable7messageMxFNbNfZAxa
                  U _D6object9Throwable7messageMxFNbNfZAxa
                  U _D6object9Throwable7messageMxFNbNfZAxa
                  U _D6object9Throwable7messageMxFNbNfZAxa
                  U _D6object9Throwable7messageMxFNbNfZAxa
0000000000000000 T _D6object9Throwable7messageMxFNbNfZAxa
```

Anything else I should check?

Thanks.



More information about the Digitalmars-d-learn mailing list