Relocation error

SealabJaster sealabjaster at gmail.com
Wed Aug 4 20:24:28 UTC 2021


On Wednesday, 4 August 2021 at 19:47:42 UTC, Paul Backus wrote:
> ...

I am now getting this error:

```
/usr/bin/ld: -f may not be used without -shared
```

Adding -shared:

```
/usr/bin/ld: 
.dub/build/test-debug-linux.posix-x86_64-dmd_v2.097.1-3DC2262935789AAE4203853EDDD1C5A4/libd.o: relocation R_X86_64_32 against symbol `_D7runtime10entrypoint13g_programArgsS4libd14datastructures5array__T5ArrayTAxaSQBp6memory9allocator15systemallocator15SystemAllocatorSQDsQDq6growth__T6GrowthVii0S_DQEwQEuQBe__T6GrowToVmi8ZQmFNaNbNiNfZSQGhQGfQCp__T6GrowBySQHbQGzQDj__TQCfVmi8ZQCnFNbNiZ9__lambda1ZQBwVii8S_DQIzQIxQFh__T11GrowByScaleVmi2ZQsFNaNbNiNfZSQKqQKoQGy__TQEjSQLgQLeQHo__TQChVmi2ZQCpFNbNiZQEfZQFuZQIjZQLr' can not be used when making a shared object; recompile with -fPIC
```

-fPIE gives the exact same results.


More information about the Digitalmars-d-learn mailing list