www.digitalmars.com         C & C++   DMDScript  

D.gnu - GDC 5.1.0 fails building.

reply Jens Bauer <doctor who.no> writes:
I just started building GDC-5, so I figured I'd use GCC-5.1.0 
(for easy transition from 4.9).

It turns out that GDC-5 will not build; the file ...

gcc/d/d-lang.cc

... fails on this line ...

3c59416a gcc/d/d-lang.cc 2016-10-29 00:51:04 +0200 1517)
        debug_hooks->register_main_translation_unit 
(global_context);

... because register_main_translation_unit is not a member of 
gcc_debug_hooks.
I've found out that this member was first seen in GCC-5.2.0.

Note: I'm now attempting to build GDC-5.2.0.
Apr 19 2017
parent reply "Iain Buclaw via D.gnu" <d.gnu puremagic.com> writes:
On 20 April 2017 at 08:05, Jens Bauer via D.gnu <d.gnu puremagic.com> wrote:
 I just started building GDC-5, so I figured I'd use GCC-5.1.0 (for easy
 transition from 4.9).

 It turns out that GDC-5 will not build; the file ...

 gcc/d/d-lang.cc

 ... fails on this line ...

 3c59416a gcc/d/d-lang.cc 2016-10-29 00:51:04 +0200 1517)
        debug_hooks->register_main_translation_unit (global_context);

 ... because register_main_translation_unit is not a member of
 gcc_debug_hooks.
 I've found out that this member was first seen in GCC-5.2.0.

 Note: I'm now attempting to build GDC-5.2.0.
I'm not so sure such a change would happen in a minor release. But in any case I'd say it can't be assumed that a version branch will work with anything except the latest release in that series.
Apr 20 2017
parent reply Jens Bauer <doctor who.no> writes:
On Thursday, 20 April 2017 at 07:06:40 UTC, Iain Buclaw wrote:
 On 20 April 2017 at 08:05, Jens Bauer via D.gnu 
 <d.gnu puremagic.com> wrote:
 It turns out that GDC-5 will not build ... 
 register_main_translation_unit
 is not a member of gcc_debug_hooks.

 Note: I'm now attempting to build GDC-5.2.0.
My attempt to build 5.2.0 also failed, but with a more fatal error: /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c: In function '__muldc3': /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c:1992:1: internal compiler error: in create_edge, at cgraph.c:869
 I'm not so sure such a change would happen in a minor release.  
 But in any case I'd say it can't be assumed that a version 
 branch will work with anything except the latest release in 
 that series.
OK, I'll attempt to build 5.3.0 and 5.4.0 but I will not expect 5.3.0 to work. ;)
Apr 20 2017
parent reply Johannes Pfau <nospam example.com> writes:
Am Thu, 20 Apr 2017 07:42:39 +0000
schrieb Jens Bauer <doctor who.no>:

 On Thursday, 20 April 2017 at 07:06:40 UTC, Iain Buclaw wrote:
 On 20 April 2017 at 08:05, Jens Bauer via D.gnu 
 <d.gnu puremagic.com> wrote:  
 It turns out that GDC-5 will not build ... 
 register_main_translation_unit
 is not a member of gcc_debug_hooks.

 Note: I'm now attempting to build GDC-5.2.0.  
My attempt to build 5.2.0 also failed, but with a more fatal error: /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c: In function '__muldc3': /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c:1992:1: internal compiler error: in create_edge, at cgraph.c:869
That's not GDC related though ;-) -- Johannes
Apr 20 2017
parent reply Jens Bauer <doctor who.no> writes:
On Thursday, 20 April 2017 at 20:25:21 UTC, Johannes Pfau wrote:
 My attempt to build 5.2.0 also failed, but with a more fatal 
 error:
 
 /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c: 
 In function '__muldc3': 
 /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c:1992:1: internal
compiler error: in create_edge, at cgraph.c:869
That's not GDC related though ;-)
It's a bug in GCC, which is triggered only when building GDC, not when building GCC with c,c++and lto (same configuration otherwise). GCC-4.9.3 builds OK. GCC-4.9.3+GDC builds OK. GCC-4.9.4 builds OK. GCC-4.9.4+GCC fails. GCC-5.1.0+GDC fails (due to register_main_translation_unit) GCC-5.2.0+GDC fails (internal compiler error) GCC-5.3.0+GDC fails (internal compiler error) GCC-5.4.0+GDC fails (internal compiler error) This means my latest GDC is 4.9.3. When the current build is finished, I'll try and revert back to an old gdc-5 (before the register_main_translation_unit change) and see if that will build.
Apr 20 2017
parent Jens Bauer <doctor who.no> writes:
On Friday, 21 April 2017 at 06:05:52 UTC, Jens Bauer wrote:
 On Thursday, 20 April 2017 at 20:25:21 UTC, Johannes Pfau wrote:
 My attempt to build 5.2.0 also failed, but with a more fatal 
 error:
 
 /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c: 
 In function '__muldc3': 
 /Users/build/toolchain/Source/gcc-5.2.0+gdc/libgcc/libgcc2.c:1992:1: internal
compiler error: in create_edge, at cgraph.c:869
That's not GDC related though ;-)
It's a bug in GCC, which is triggered only when building GDC, not when building GCC with c,c++ and lto (same configuration otherwise).
Sorry, I was wrong; I confused myself by building GCC_5.1.0 as stand-alone (argh). Building GCC-5.2.0 to GCC-5.4.0 (with or without GDC) fails with the error mentioned above. I'll try and contact the GCC team; maybe they have a suggestion for a fix or workaround.
Apr 23 2017