Bug 17767 – Dmd can't link recast.d, Gdc can't compile it and Ldc can perfectly compile it.

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-08-20T15:10:26Z
Last change time
2019-08-22T15:57:03Z
Assigned to
No Owner
Creator
ecstatic.coder

Attachments

IDFilenameSummaryContent-TypeSize
1655recast.dstandalone D file which crashes the Dmd and Gdc compilersapplication/x-dsrc87604

Comments

Comment #0 by ecstatic.coder — 2017-08-20T15:10:26Z
Created attachment 1655 standalone D file which crashes the Dmd and Gdc compilers Dmd and Gdc report an internal error in the compiler when compiling recast.d, but Ldc can perfectly compile it. https://github.com/senselogic/RECAST/blob/master/recast.d $ dmd --version DMD64 D Compiler v2.075.1 Copyright (c) 1999-2017 by Digital Mars written by Walter Bright eric@ENVY17 ~/data/WORK/PROJECT/TOOL/RECAST $ dmd -m64 recast.d recast.o : Dans la fonction « _D3std4conv17__T6toImplTAyaTsZ6toImplFNaNbNeskE3std5ascii10LetterCaseZAya » : recast.d:(.text._D3std4conv17__T6toImplTAyaTsZ6toImplFNaNbNeskE3std5ascii10LetterCaseZAya[_D3std4conv17__T6toImplTAyaTsZ6toImplFNaNbNeskE3std5ascii10LetterCaseZAya]+0x5f) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result » recast.o : Dans la fonction « _D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa » : recast.d:(.text._D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa[_D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa]+0xd) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result6lengthMFNaNbNdNiNfZm » recast.d:(.text._D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa[_D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa]+0x4f) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result5emptyMFNaNbNdNiNfZb » recast.d:(.text._D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa[_D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa]+0x5c) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result5frontMFNaNbNdNiNfZa » recast.d:(.text._D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa[_D3std5array96__T5arrayTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ5arrayFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZAa]+0x9f) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result8popFrontMFNaNbNiNfZv » recast.o : Dans la fonction « _D3std4conv17__T6toImplTAyaTiZ6toImplFNaNbNeikE3std5ascii10LetterCaseZAya » : recast.d:(.text._D3std4conv17__T6toImplTAyaTiZ6toImplFNaNbNeikE3std5ascii10LetterCaseZAya[_D3std4conv17__T6toImplTAyaTiZ6toImplFNaNbNeikE3std5ascii10LetterCaseZAya]+0x5e) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result » recast.o : Dans la fonction « _D3std4conv17__T6toImplTAyaThZ6toImplFNaNbNehkE3std5ascii10LetterCaseZAya » : recast.d:(.text._D3std4conv17__T6toImplTAyaThZ6toImplFNaNbNehkE3std5ascii10LetterCaseZAya[_D3std4conv17__T6toImplTAyaThZ6toImplFNaNbNehkE3std5ascii10LetterCaseZAya]+0x60) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result » recast.o : Dans la fonction « _D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya » : recast.d:(.text._D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya[_D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya]+0xb9) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result » recast.d:(.text._D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya[_D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya]+0xd1) : référence indéfinie vers « _D3std5array17__T8AppenderTAyaZ8Appender94__T3putTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ3putMFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZv » recast.d:(.text._D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya[_D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya]+0x114) : référence indéfinie vers « _D3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6Result » recast.d:(.text._D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya[_D3std4conv110__T8textImplTAyaTAyaTPvTAyaTiTAyaTiTAyaTaTAyaThTAyaThTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTbTAyaTAxaTAyaTAxaTAyaZ8textImplFNaNfAyaPvAyaiAyaiAyaaAyahAyahAyabAyabAyabAyabAyabAyabAyaAxaAyaAxaAyaZAya]+0x12c) : référence indéfinie vers « _D3std5array17__T8AppenderTAyaZ8Appender94__T3putTS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZ3putMFNaNbNfS3std4conv47__T7toCharsVii10TaVE3std5ascii10LetterCasei1TiZ7toCharsFNaNbNiNfiZ6ResultZv » collect2: error: ld returned 1 exit status Error: linker exited with status 1 $ gdc --version gdc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gdc -m64 recast.d recast.d:1:0: internal compiler error: in toSymbol, at d/d-decls.cc:75 /* ^ Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. $ ldc2 --version LDC - the LLVM D compiler (1.0.0): based on DMD v2.071.2 and LLVM 3.8.0 built with LDC - the LLVM D compiler (0.17.1) Default target: x86_64-pc-linux-gnu Host CPU: haswell http://dlang.org - http://wiki.dlang.org/LDC Registered Targets: aarch64 - AArch64 (little endian) aarch64_be - AArch64 (big endian) amdgcn - AMD GCN GPUs arm - ARM arm64 - ARM64 (little endian) armeb - ARM (big endian) bpf - BPF (host endian) bpfeb - BPF (big endian) bpfel - BPF (little endian) cpp - C++ backend hexagon - Hexagon mips - Mips mips64 - Mips64 [experimental] mips64el - Mips64el [experimental] mipsel - Mipsel msp430 - MSP430 [experimental] nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit ppc32 - PowerPC 32 ppc64 - PowerPC 64 ppc64le - PowerPC 64 LE r600 - AMD GPUs HD2XXX-HD6XXX sparc - Sparc sparcel - Sparc LE sparcv9 - Sparc V9 systemz - SystemZ thumb - Thumb thumbeb - Thumb (big endian) x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 xcore - XCore $ ldc2 -m64 recast.d $
Comment #1 by ibuclaw — 2017-08-20T19:41:16Z
(In reply to ecstatic.coder from comment #0) > Created attachment 1655 [details] > > $ gdc --version > > gdc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904 > Copyright (C) 2015 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $ gdc -m64 recast.d > > recast.d:1:0: internal compiler error: in toSymbol, at d/d-decls.cc:75 > /* > ^ > Please submit a full bug report, > with preprocessed source if appropriate. > See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. > That function doesn't exist anymore, or even that file. Care to try a newer version?
Comment #2 by ecstatic.coder — 2017-08-20T22:14:56Z
Indeed... I've downloaded the version on gdcproject.org, but same result... $ ./gdc --version gdc (gdcproject.org 20161225-v2.068.2_gcc6) 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ./gdc -m64 recast.d recast.d:1:0: internal compiler error: in get_symbol_decl, at d/d-decls.cc:136 /* Please submit a full bug report, with preprocessed source if appropriate. See <https://bugzilla.gdcproject.org> for instructions. And couldn't install gdc via your PPA, it says there is not support for Xenial...
Comment #3 by ecstatic.coder — 2017-08-21T12:57:41Z
Please could you simply download the latest file from Github and compile locally with your own version of gdc. https://github.com/senselogic/RECAST/blob/master/recast.d If it compiles fine with your version, then I know it's just a compiler version problem, not a compiler bug, and this will eventually be solved once I will be able to use the same version as you :)
Comment #4 by ibuclaw — 2017-08-21T22:21:00Z
(In reply to ecstatic.coder from comment #3) > Please could you simply download the latest file from Github and compile > locally with your own version of gdc. > > https://github.com/senselogic/RECAST/blob/master/recast.d > > If it compiles fine with your version, then I know it's just a compiler > version problem, not a compiler bug, and this will eventually be solved once > I will be able to use the same version as you :) I initially got a link error, but when pushing out phobos 2.076 it worked fine. The internal error in both places seem to suggest a bug in earlier versions of the front-end, in particular, a bogus Dsymbol was passed to the backend. You're going to have to try multiple versions of dmd here, possible starting from 2.066 or 2.068, and noting any differences between versions. What I expect you to find is, that 2.066 ICE'd, 2.071 works, 2.075 regressed and has linker errors, and 2.076 is fine again.
Comment #5 by ecstatic.coder — 2017-08-22T06:26:07Z
It works !!! With the 2.076 version everything is all right now :) Thank you so much Iain for all your efforts to help me solve this problem !!!
Comment #6 by ibuclaw — 2019-08-22T15:57:03Z
Closing, as there's no issue here.