iains / gcc-10-branch

[April 2021] 10.3 plus Darwin additions, initial 10.3 Arm64.
GNU General Public License v2.0
7 stars 2 forks source link

gcc 10.5.0 with add'l patches (or without) fails on Tiger PPC: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type #9

Closed kencu closed 5 months ago

kencu commented 5 months ago

Toolchain is:

apple-gcc-4.2, cctools 949, ld64-97,  gmake 3.81

gcc 10.5.0 as specified here:

https://github.com/macports/macports-ports/blob/master/lang/gcc10-bootstrap/Portfile

ie with most of the patches from

https://github.com/iains/gcc-10-branch/commits/gcc-10-3-darwin/

uses:

mpfr-4.1.0, gmp-6.2.1, mpc-1.2.1, isl-0.24

error is:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/fold-const.h:227: warning: ‘class operand_compare’ has virtual functions but non-virtual destructor
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c: In function ‘tree_node* c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20158: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20158: error:   trying to instantiate ‘template<class T> struct wi::int_traits’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20168: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20168: error:   trying to instantiate ‘template<class T> struct wi::int_traits’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20325: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20325: error:   trying to instantiate ‘template<class T> struct wi::int_traits’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20326: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20326: error:   trying to instantiate ‘template<class T> struct wi::int_traits’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20327: error: ‘c_parser_omp_context_selector(c_parser*, tree_node*, tree_node*)::<anonymous enum>’ is/uses anonymous type
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10-bootstrap/gcc10-bootstrap/work/gcc-10.5.0/gcc/c/c-parser.c:20327: error:   trying to instantiate ‘template<class T> struct wi::int_traits’
:info:build make[3]: *** [c/c-parser.o] Error 1

Looking over the comments and commits, is it fair to say that Darwin 8 is officially dropped now?

I am attempting the following, but only if it has a chance of working:

Tiger system roots -> apple-gcc42, cctools 943, ld64-97 -> gcc 10.5.0 with these patches -> gcc13.

iains commented 5 months ago

I cannot speak for macports but ..

Toolchain is:

apple-gcc-4.2, cctools 949, ld64-97,  gmake 3.81

That ought to work for 10.5 (which is the last one that can be bootstrapped with C++98 / gcc-4.2.1)

gcc 10.5.0 as specified here:

https://github.com/macports/macports-ports/blob/master/lang/gcc10-bootstrap/Portfile

ie with most of the patches from

https://github.com/iains/gcc-10-branch/commits/gcc-10-3-darwin/

There will be a Darwin 10.5 branch at some point (because it is the last one that can be bootstrapped with system tools on earlier boxes) - I have a branch under construction - but the priority at present is the newer branches on newer OS versions...

Looking over the comments and commits, is it fair to say that Darwin 8 is officially dropped now?

For my part, I no longer test on Darwin8 (the machines are too old) - but I have not (intentionally) done anything to stop it working.

iains commented 5 months ago

do you have an earlier GCC install > gcc.4.2.1 that could be used to bootstrap this? (it might be worth a try).

We have had various cases where gcc4.2 failed to bootstrap - but AFAIK those were fixed upstream, and last I tried Darwin9 would bootstrap with Xcode-3.1.4 + gcc-4.2.1. [at least that's a similar toolset, even if the OS version is newer].

kencu commented 5 months ago

Thanks, I will try a slightly newer gcc.

kencu commented 5 months ago

I had gcc7 installed on that Tiger machine, and it does indeed get past this issue bootstrapping gcc10.

I was trying to make a tidy bootstrapping path, but it looks like there will need to be an additional stepping stone for Tiger users.... which is small price to keep such an ancient machine going, IMO.

iains commented 5 months ago

It is my firm intention that 10.5-darwin should be bootstrappable with Apple's gcc-4.2.1 (but that technically only applies from Darwin9+ anyway). There are also multiple issues with the Xcode-2.5 on darwin8 - which force one to update to at least the Xcode-3.1.4 versions.

So, yeah, rather than building apple-4.2.1 and then some other compiler, it might be better to go straight to gcc-5 or gcc-7.5.

I understand the enthusiasm for Tiger etc. but my 10.4 box takes almost a week to bootstrap and test trunk - not to mention the power consumed .. so it's no longer a regular activity (although I generally try close to the branch releases)