-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc: update to 11.2.0 #9088
gcc: update to 11.2.0 #9088
Conversation
I don't see the i386 PEH fix here. Is that intentional? |
Are you sure? it's rebased on master. |
I missed that bit. Sorry for the noise. |
My build failed at the usual point, so it would be a surprise if this PR succeeds. I propose either go through the path @revelator suggests or drop Ada on i686 altogether. It is a dying platform that attracts less and less attention from upstream and it is very likely that future releases will be problematic too. There are about a dozen packages that depend on Ada, mostly developer tools. It doesn' t look as if dropping Ada on i686 would cause any major problem to our users or to the MSYS2 ecosystem. |
It's not only about Ada. We should not ship compiler with broken exception handling. |
But again: is there proof that the exception handling is broken beyond Ada? (supposing that the broken thing is the EH) The Ada compiler/runtime might be using on a specific way that does not affect C/C++. And are we sure that the broken thing is on 11 but not on 10? Because the fact that the bootstrap completes when initiated with gcc-10 sjlj points to gcc-10's DWARF EH as the culprit. Let's remember that gcc-11 successfully compiles itself on the bootstrap process, so we have an indication that 10 is defective while 11 is fine. It would be interesting to bootstrap 11 from @revelator's 11 packages. If it succeeds, IMO we would have a strong indication that whatever is broken in 10 was fixed on 11. |
I can try that if I get the packages |
uploading now :) |
and he is right if it turns out we can bootstrap it again using my packages it indicates that something might have been broken in the earlier version (not the first time either, it does happen). |
https://sourceforge.net/projects/cbadvanced/files/bootstrap/ give it a little if all the packages are not there yet, sourceforge can be a bit slow at times to show newly uploaded items. i hope it helps. |
thanks, I'll try tomorrow. |
Just tried building PR #8320 with @revelator's packges. It fails earlier (stage 1) on Ada too. @lazka : please go ahead with your build, maybe my setup is botched.
|
hmm does indeed sound like something might have broken on your end :S but just to be sure ill try setting up a local version to bootstrap from. |
local bootstrap also fails here in the exact same spot, so it seems this is indeed an upstream bug :S
|
Tried Then compiled a "Hello world" Ada program to check that the gcc 11 Ada toolset provided by @revelator's packages is minimally functional. It worked fine. Then tried building today's gcc 11 snapshot. Failed at Some web searching hinted at a filesystem related problem (file path length exceeded some limit). Launched the build in |
OTOH a simple Maybe our Configuring like this:
triggers the |
guess we need to report this upstream, maybe fixed in the next version then :/. |
interresting, though odd unless something changed recently in the autotools build scripts. |
there was a similar bug back on gcc-4.8.0 i dont remember how it was fixed unfortunatly, though at that time the package was built using mingw.orgs old msys shell which sadly does not work to well with win10, it did have one plus though as it did not hide some errors which made finding the bugger a lot easier ugh... |
sorry was gcc-4.1.0 so long ago my memory fades :S the fix was compiling it with the old gcc-3.3.6 sadly this does not apply here as that build was 32 bit only. The culprit was that 4.1.0 produced corrupt code when bootstrapping https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23894 |
Of course it does: Ada is an optional language, so the above command does not build it :-/ Tried At least we can file a bug report upstream without throwing at them an screenfull of configure options. |
Aye |
i commented in the upstream bug report about the new build error with the successfull bootstrap. |
https://aur.archlinux.org/packages/gcc-ada-git/ huh arch is also running into problems with ada :S |
This was almost 2 years ago, this AUR package uses latest commit again. |
must have been some heavy changes to cause so many problems heh. noticed it now also has preliminary support for C++20 modules via libcody which still seems to be in a preliminary state. i wonder if the best thing to do would be waiting untill the next version of it is out ? we could still report bugs upstream to make things happen sooner. unless someone has an ephiphany and spots the culprit. |
Building i686 10.3 PKGBUILD with @revelator's 11.1 packages also fails with
Seems that the problem is on 11.1 itself (either on those packages or on upstream, dunno). |
it would seem so indeed :( |
For the record: A new build bug was fixed upstream. Applying that patch to the latest GCC 11 snapshot does not fix our problem. On that bug report, the reporter says Maybe the problem is our binutils? |
Extracted the zip without making any changes into clean master branch checkout and the build failed with no specific error: gcc-err.txt |
hmm odd the first error points to this line in make-lang.in
strangely it builds here but i bootstrapped my dwarf version using the sjlj compiler to get the missing files installed first. |
well heres something mighty interresting bootstrapping 32 bit dwarf gcc-10.3.0 with 32 bit dwarf gcc-11.2.0 works with ada Oo EDIT: no still crashes but a bit later on :S |
yep gnat with dwarf exceptions is broken, compiling gprbuild-bootstrap with the sjlj bootstrapped dwarf version aborts at the first ada source file. Even the simplest ada example will segafult it so there is something not right with it. |
I built an Ada-less gcc 11.2.0 with our
Using a gcc built with debug info, I see on
This causes a call to BTW, mingw32 gdb is broken ( |
One more detail: compiling with our clang has the same effect, so the problem is in the gcc support libraries which are also used by clang. This could be a great bisection project, but bootstrapping gcc takes two hours here, so... |
stack handler broken maybe ?, hmm there was a report on the gcc bug list for m68k which seemed to have a similar problem with memory corruption, i think lazka mentioned our problem there. |
Weirdly reminiscent of #9091's unwinder issues, though that's LLVM's libunwind rather than libgcc (though the function names look much the same - did they end up both using libunwind or something?) |
does clang even get installed beforehand in a ci build ?. |
thinking about it i tried bootstrapping it with a different gcc than ours and hit the same problem (no libunwind present in that build) so that cant be it :/. |
No, looking at the code I think it's just that the function names are similar because they're doing similar things |
aye clangs libunwind uses several unwinders, the main difference compared to the gcc unwinders is that all clangs unwinders are present in the unwinder library though it defaults to one specific model you can actually select a totally different one. |
@oscarfv seems it is crashing in some newer code that was added as far back as gcc-7 in the atomic fde path... specifically in this function _Unwind_Find_FDE where it returns a null pointer ->
im going to try disabling ATOMIC_FDE_FAST_PATH for mingw builds to see what it gets us. |
That check should only be returning NULL if no |
might be it then :) though something must have broken it after as it worked in gcc-7 as far as im aware. |
I would also try setting a breakpoint/stepping through |
good point, probably need to build the first dwarf version with this disabled using the sjlj compiler to avoid any nastiness, then ill try bootstrapping it using that. |
damnation still fails in the exact same spot when building gnat :( |
Replacing gcc-11 Anyway, a quick method for pinpointing the source of the problem is simply stepping through all the exception-related code in parallel for executables built with each version, noting where the execution diverges, reverting the associated commit, checking if the problem gets fixed, rinse, repeat. The EH-related machinery has very few changes from version 10 to 11, so it is faster than Actually, reverting all EH-related changes from 10 to 11 in libgcc probably would fix the problem without introducing regressions ;-) |
Based on what @revelator said, I'm guessing it's failing to register its |
one mighty interresting thing is if i build it using a very old gcc-4.9.1 it actually fails in the libstdc++ build but not in gnat, strangely it first fails on stage2 of the bootstrap so i guess oscarfv might be onto something with the problem being in the libstdc++ code. |
@revelator Did you disable that part of the code for MINGW32 now - and did it get you anything further? In general: could this be pushed for now with MINGW32 building GDB 10.2 as before and MINGW64 building current gdb? |
aye unfortunatly it still fails so that was not it :/ in fact the code there was made as part of an effort to fixup dwarf exceptions for mingw* builds i found out, so disabling it would lead to even more problems. so far any effort has been in vain and i dont know enough about exception models to do much further :(, guess it will be upto upstream to get this one sorted out. |
An update on upstream's bug report: The problem with Ada is that on the bootstrap gcc-10's exception system somehow "mixes" with stage 2 gcc-11 Ada code. The possibility of this occurrence was known but not addressed because in practice it was not happening... until now. They say that our build environment might be tainted on a similar way of grep's case, bringing in the conditions required for the Ada problem to surface, but that's just speculation. They are trying to fix the problem with Ada exception propagation, but no promises made. So we now know that the breakage is specific of Ada, it does not affect C++. Therefore I propose that we wait a couple of weeks for a fix. If the problem remains unfixed, we release gcc 11.2 without Ada on i686. |
aye i also suspect something more than grep might have breakage that contributes to this since i tried bootstrapping it using several older versions of gcc which was newer built with grep-3.6 in the first place but all of them fails just as well when using a version that sports dwarf exceptions. Guess we now see the effects of having continual (and maybe unstable) updates. |
bug found and squashed upstream https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486 ;) |
Yay, so I guess that means building 11.2 release + that patch integrated for this single release, correct? Note: that may not worth it if the 11.3 will stay in the 2-4 months release., because then 11.3 is likely to be released in the next two weeks and this can be adjusted to build the fixed 11.3 instead. |
Closing in favor of #9825 |
Continuing from #8320