Thread overview
[Issue 17767] Dmd can't link recast.d, Gdc can't compile it and Ldc can perfectly compile it.
Aug 20, 2017
ecstatic.coder
Aug 20, 2017
Iain Buclaw
Aug 20, 2017
ecstatic.coder
Aug 21, 2017
ecstatic.coder
Aug 21, 2017
Iain Buclaw
Aug 22, 2017
ecstatic.coder
Aug 22, 2019
Iain Buclaw
August 20, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

ecstatic.coder <ecstatic.coder@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Dmd and Gdc report an       |Dmd can't link recast.d,
                   |internal error in the       |Gdc can't compile it and
                   |compiler when compiling     |Ldc can perfectly compile
                   |recast.d, but Ldc can       |it.
                   |perfectly compile it.       |

--
August 20, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(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?

--
August 20, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

--- Comment #2 from ecstatic.coder <ecstatic.coder@gmail.com> ---
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...

--
August 21, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

--- Comment #3 from ecstatic.coder <ecstatic.coder@gmail.com> ---
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 :)

--
August 21, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(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.

--
August 22, 2017
https://issues.dlang.org/show_bug.cgi?id=17767

--- Comment #5 from ecstatic.coder <ecstatic.coder@gmail.com> ---
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 !!!

--
August 22, 2019
https://issues.dlang.org/show_bug.cgi?id=17767

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Closing, as there's no issue here.

--