Relocation error

Paul Backus snarwin at gmail.com
Wed Aug 4 19:47:42 UTC 2021


On Wednesday, 4 August 2021 at 18:52:40 UTC, SealabJaster wrote:
> However, I'm now running into the following linker error that I 
> really don't know what to do with:
>
> ```
> /usr/bin/ld: 
> .dub/build/test-debug-linux.posix-x86_64-dmd_v2.097.1-6FDCEE655D96859081886B42E500F838/libd.o: relocation R_X86_64_32 against symbol [...] can not be used when making a PIE object; recompile with -fPIE
> collect2: error: ld returned 1 exit status
> ```

You need to add `-fPIC` to your `dflags`. Normally this is done 
automatically by `/etc/dmd.conf`, but you've disabled that with 
`-conf=`.


More information about the Digitalmars-d-learn mailing list