Comment #0 by mihails.strasuns — 2018-02-26T18:52:37Z
Linux, both Ubuntu and Arch, both tarball downloads and from package manager:
---
$ cat main.c
extern int rt_init();
int main ( )
{
rt_init();
return 0;
}
$ gcc ./main.c /path/to/druntime.a
/usr/bin/ld: error: /path/to/libdruntime.a(dmain2_65f_2f9.o): size of section .dtors.d_dso_dtor[.data.d_dso_rec] is not multiple of address size
/usr/bin/ld: final link failed: Error reading (null): No error
---
Am I missing something obvious here? Adding trivial D wrapper like this:
---
extern(C) void rt_init ( );
extern(C) void foo ( )
{
rt_init();
}
---
.. fixes the problem, so the assumption is it is somehow related to how runtime library is built.
Comment #1 by robert.schadek — 2024-12-07T13:38:03Z