Compiling using ldmd2 crashes, any ideas?

Kai Nacke kai at redstar.de
Thu Oct 10 04:51:19 PDT 2013


On Thursday, 10 October 2013 at 11:39:20 UTC, Gary Willoughby 
wrote:
> I've used the installation guide here: 
> http://wiki.dlang.org/Building_LDC_from_source
>
> And when i compile using the different switches i get these 
> errors:
>
> ---
>
> rdmd --build-only --compiler=ldmd2 --force -m64 -property 
> -release -w main.d
>
> 0  ldc2            0x00000000014a50a2 
> llvm::sys::PrintStackTrace(_IO_FILE*) + 34
> 1  ldc2            0x00000000014a4e99
> 2  libpthread.so.0 0x00007f3ef263b030
> 3  ldc2            0x0000000000735242 
> AndAndExp::toElem(IRState*) + 450
> 4  ldc2            0x000000000072e3ac 
> Expression::toElemDtor(IRState*) + 540
> 5  ldc2            0x000000000071fa4b 
> ExpStatement::toIR(IRState*) + 91
> 6  ldc2            0x000000000071f2e9 
> CompoundStatement::toIR(IRState*) + 89
> Error: Error executing /usr/local/bin/ldc2: Segmentation fault
>

Hm. Could you please provide some more details? LLVM version, OS, 
...

>
> rdmd --build-only --compiler=ldmd2 --force -m64 -property -w 
> main.d
>
> /tmp/.rdmd-1001/rdmd-main.d-2FB5FF642A0B7560CCCD18961A5DFC13/objs/main.o:(.rodata._D123TypeInfo_S3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted6__initZ[_D123TypeInfo_S3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted6__initZ]+0x60): 
> undefined reference to 
> `_D3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted10__postblitMFZv'
> collect2: error: ld returned 1 exit status
> Error: /usr/bin/gcc failed with status: 1

I think this is issue 454 
(https://github.com/ldc-developers/ldc/issues/454).

Kai


More information about the digitalmars-d-ldc mailing list