New comment by oreo639 on void-packages repository https://github.com/void-linux/void-packages/issues/39809#issuecomment-1336554579 Comment: The ldc build failure seems to be a segfault in ldc2. Even after updating it still crashes. The crash location I got was: https://github.com/ldc-developers/ldc/blob/master/gen/target.cpp#L180 ``` Program received signal SIGSEGV, Segmentation fault. Target::_init (this=0xbc7d78 , params=...) at /builddir/ldc-1.30.0/gen/target.cpp:180 180 RealProperties.min_10_exp = -4931; (gdb) (gdb) bt #0 Target::_init (this=0xbc7d78 , params=...) at /builddir/ldc-1.30.0/gen/target.cpp:180 #1 0x000000000081acfd in mars_mainBody(Param&, Array&, Array&) (params=..., files=..., libmodules=...) at /builddir/ldc-1.30.0/dmd/mars.d:336 #2 0x00000000009d1f0e in cppmain () at /builddir/ldc-1.30.0/driver/main.cpp:1148 #3 0x000000000091a04d in _Dmain (_param_0=...) at /builddir/ldc-1.30.0/driver/main.d:27 ``` Here is a snippet of the disas: ``` ... 0x000000000095e6ca <+1402>: xor %esi,%esi 0x000000000095e6cc <+1404>: mov $0xaaf859,%edi 0x000000000095e6d1 <+1409>: fstpt 0x180(%rbx) 0x000000000095e6d7 <+1415>: call 0x913210 <_ZN7CTFloat5parseEPKcPb> 0x000000000095e6dc <+1420>: xor %esi,%esi 0x000000000095e6de <+1422>: mov $0xaaf864,%edi 0x000000000095e6e3 <+1427>: fstpt 0x190(%rbx) 0x000000000095e6e9 <+1433>: call 0x913210 <_ZN7CTFloat5parseEPKcPb> 0x000000000095e6ee <+1438>: movdqa 0x15138a(%rip),%xmm0 # 0xaafa80 0x000000000095e6f6 <+1446>: fstpt 0x1c0(%rbx) => 0x000000000095e6fc <+1452>: movaps %xmm0,0x1d0(%rbx) ``` I assume this has to do with LLVM and libstdc++, alpine uses LLVM 14 although even after updating to that the crash still occurs (albeit in a slightly different place, but still in `Target::_init()`). I can also confirm that updating musl and using the gcc git snapshot alpine uses doesn't fix the crash either. The build failure also occurs with clang/clang++ and libstdc++ although when I try to build it with libc++ I get a bunch of undefined references to LLVM. Also, sidenote but libexecinfo is broken on musl: https://github.com/alpinelinux/aports/commit/50795a14dee639ce2dcc836e2b2baca9bad4a1b1 Although removing it/stubbing it out didn't fix the issue it did stop libexecinfo from messing up the gdb backtrace. EDIT 1: compiling ldc without dmd works fine.