shared static this not invoked on almalinux 8.5, all is well on fedora 35
ichneumwn
idonotenjoyemail at idonotenjoyemail.org
Thu Jun 9 12:25:01 UTC 2022
On Thursday, 9 June 2022 at 11:19:48 UTC, kinke wrote:
> On Thursday, 9 June 2022 at 08:54:51 UTC, ichneumwn wrote:
>> So it seems there is a difference in how gcc 8.5.0 and gcc
>> 11.2.1 handle something in the linking process, but I assume
>> it requires knowledge of ldc to know what that might be, which
>> is why I am posting here.
>
> gcc probably doesn't matter, but the actual linker does. v1.28
> still defaults to `ld.gold`, so that seems problematic for
> almalinux. - Anyway, DSO registration was revamped in v1.29,
> and it's now using the default linker (can choose with
> `-linker` option), so I'd recommend checking whether the
> problem still persists with v1.29.
Thanks, that (the linker) solved it (I thought is was part of the
gcc package). I just noticed meson tells me which linker is used.
On AlmaLinux:
D compiler for the host machine: ldc2 (llvm 1.28.0-git "LDC -
the LLVM D compiler (1.28.0-git-5a28329):")
D linker for the host machine: ldc2 ld.bfd 2.30-108
I downloaded and installed version 2.37 of binutils to match my
Fedora system. Meson did not allow me to specify an absolute path
to the linker, but putting it first in my PATH worked. With that
the problems disappeared.
I very briefly tried v1.29 a little while ago, but my application
compiled, started and then hung with 1.29. Haven't had time to
isolate the problem area yet.
Would you have a pointer to information about "DSO registration"
in ldc / D in general? Have only been able to piece together
scraps of information so far, such as
pragma(crt_constructor)
// extern (C) routine here that starts the D runtime rt_init()
More information about the digitalmars-d-ldc
mailing list