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
Reconsider mingw-w64 i686 exception handling #56
Comments
It's sjlj for i686 and already seh for x86_64. |
Oh, you're right. Likely I've been looking in the wrong directory for the libgcc DLL. Then this topic actually becomes much less interesting because the most relevant architecture is using SEH already. I changed the issue description accordingly. That also answers my question "Does it work reliably?" because apparently it does.
Yes, I'm referring to Qt apps for instance. But I'm not sure about this myself. |
|
Unhandled exceptions in event handlers are not supported by Qt, probably for this specific reason. |
Thanks for these links. Considering that MSYS2 and Qt's official binaries are using DW2 I suppose it is save to use it as well. As far as I know @xantares already plans to do the switch when updating to GCC 10. However, it will take me a while to recompile all package of the binary repo. |
By the way, I'd simply increase the |
Why not just wipe all mingw packages from the repo and rebuild from scratch ? |
I will actually start with a wiped repo to avoid any old packages being accidentally pulled into the build of a new package. But that's not actually the problem I want to tackle by increasing |
hello, mingw-gcc 10.1 with dw2 seems to work fine, I plan to push the update when gcc 10.1 hits the regular repos (its in staging for now) |
Good to hear. I also need to create an own, separate staging repository for the rebuild, take care of the pkgrel versioning, decide which packages to get rid of (likely ANGLE and Qt 4) and handle potential build errors. I have also regular Linux and Android cross-packages in the repo which I need to take care of at the same time. So it will likely take me a while to rebuild everything and while the rebuild is ongoing I'm not going to update any packages built against the old GCC package anymore. |
gcc 10 uses dwarf2 now |
I'll start the rebuild this evening or tomorrow. Seems you've already rebuilt packages locally. Anything to watch out for? (I've already read your comment under mingw-w64-glib2.) |
Yes, I started to rebuild some packages and noticed a few issues:
|
I've rebuilt the core toolchain and started rebuilding other packages. Unfortunately I found already failures within the first batch (1): mingw-w64-fftw, mingw-w64-freeglut, mingw-w64-fribidi, mingw-w64-lua, mingw-w64-xerces-c, mingw-w64-rust, nsis2, mingw-w64-crossc, mingw-w64-spirv-tools (1) I'm splitting the rebuilding in batches similar to official rebuilds conducted on https://rebuilds.foutrelis.com/. |
freeglut, nsis2, xerces, fftw should be fixed |
@xantares Thanks for taking care (I've also just seen your update for In the meantime I tried my luck with Additionally, it seems that wine doesn't work in my chroot anymore (https://martchus.no-ip.biz/build-data/rebuild-dw2/mingw-w64-fribidi/pkg/build.log) so I have to figure out why that is the case. |
I finally was able to build rust, see my AUR comment regarding that package. freeglut and fftw work now as well. I'll come back to the other packages later. Luckily the 2nd batch seems already less problematic. By the way, the problems with WINE in my systemd-nspawn container were caused because no terminal was available. I'm using this rebuild to test a new build script/system which will help me maintaining the repository in the future. It runs as systemd service and simply forks makechrootpkg. Apparently starting |
I'm still having trouble with some Qt libraries (multimedia and virtualkeyboard). The error in Qt multimedia is especially strange as it seems completely unrelated to the GCC update and I'm wondering why I didn't run into it before. It fails in the line
with errors like
so Maybe this is a mingw-w64 bug? Unfortunately I couldn't find much information about these libraries. Likely I'll just workaround with |
that's definetely related to gcc 10. I guess this is a problem in crt. |
I've seen you've amended your comment. Neverthless I've tried the |
I've rebuilt everything now. I dropped the following packages in the process due to build errrors:
I have also removed some other package even before the rebuild because they are outdated and apparently not actively maintained (e.g. ANGLE, KDE libs, FileZilla, Geany, Evince). I can re-add removed packages when they are updated or fixed (or wanted in case of nsis2). I've also just briefly tested whether the resulting executables actually work natively under Windows. I've tested Qt apps, x264, x265, ffmpeg and PostgreSQL apps. It seems to be the case for both architectures. Statically linked Qt apps work as well. In particular, also the exception handling seems to work (the tested apps follow what @squeevee mentioned like every sane app should). So I'm going to move the packages from the staging repository to my regular repository tomorrow. By the way, I worked around the issue in qt5-multimedia via |
actually I pushed a fix for nsis, doesnt it build now ? |
I could not build Since all packages have been moved from the staging repository to the actual repository I'm closing the issue. |
Currently, the mingw-w64-gcc Arch Linux package is configured to use SJLJ for i686. This impairs performance even when no exceptions occur. However, it works reliably.
It seems MSYS2 is using different exception handling for their i686 mingw-w64 packages. It is using DW2 for i686 (for x86_64 they also use SEH). Maybe this change for i686 would also make sense under Arch Linux?
Possible downsides
I suppose it is only available under x86_64. Otherwise, why isn't MSYS2 using it for i686, too?Apparently SEH for i686 works quite differently than for x86_64. Only the x86_64 version has been implemented in GCC.Tasks
/SEHfor i686--disable-sjlj-exceptions --with-dwarf2
to enable DW2 for i686Usenot implemented in GCC???
to enable SEH for i686libgcc_s_sjlj-1.dll
tolibgcc_s_seh-1.dll
for SEH and tolibgcc_s_dw2-1.dll
for DW2(Only the i686 version would change because x86_64 already uses SEH. Since the archs are tied that wouldn't help much, though.)
References
The text was updated successfully, but these errors were encountered: