Compiling using ldmd2 crashes, any ideas?
Gary Willoughby
dev at nomad.so
Thu Oct 10 04:39:19 PDT 2013
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
---
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
---
If i add the -O compiler flag to the second example it compiles
without error.
Any ideas what could be the problem? I haven't tried the ldc2
executable because i need rdmd to correctly gather the
dependencies.
More information about the digitalmars-d-ldc
mailing list