-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 9.0.1 segfault while compiling GSdx #2948
Comments
I also include a copy of the preprocessed sources which gave the problem. |
If gcc segfault. It is a gcc bug. Even with invalid code, compiler shouldn't crash. |
Indeed; actually it appears that pcsx2 would be a good test for the functionality of gcc (every time I upgrade gcc, I find some issue with the compiler). |
Indeed, PCSX2 hit too much gcc bug. I already opened 2 or 3 gcc bugs... And we even have some cmake code to blacklist some gcc version |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Maybe @arcum42 can lend a hand here too. Cleanup the patch, maybe silence the warnings ..etc. |
That's a gcc patch, not a pcsx2 patch. I'm not familiar with gcc's code, nor do I have commit rights there. ^_^ If I knew what the warnings were, I could look at those, though. |
This comment has been minimized.
This comment has been minimized.
@orbea Thanks. Sounds like a bunch of explicitly telling it to use the default on constructors and destructors in places. I wish they had an option to automatically generate patches to fix warnings like this... |
There is a clang-based tool.that can improve code. Maybe they add this case. Otherwise you can silence the warning and we will fix it later |
Unless I'm mistaken, a lot of it will be taking a warning like this: And taking the bit in quotes and adding something like: Haven't tested that yet, though... |
Orbea search my name/email (note I mean in older gcc version). Arcum. Yes. My understanding is that either all constructors are user defined or all are default. So we need to add declaration of implicit constructor with = default. |
This comment has been minimized.
This comment has been minimized.
Btw does it fully work (no crash?) |
This comment has been minimized.
This comment has been minimized.
I went and installed gcc 9 in my 32-bit chroot. I had to do it from a ppm because apparently the chroot can't be upgraded because Ubuntu is thinking of getting rid of 32-bit builds, which is worrisome. I was able to replicate the segfault. Got rid of it, but commenting out compiling GSdx isn't exactly a solution we can use, though it's nice to know gcc 9 specifically doesn't like that plugin. I believe I've taken care of most or all of the new depreciated warnings, but unfortunately, the segfault doesn't appear related. Wish I knew specifically what that patch fixed so I could see if I could find a workaround. I'll have to look around. Here's some currently untested (but compiled) code that gets rid of the warnings:
diff --git a/common/include/x86emitter/x86types.h b/common/include/x86emitter/x86types.h
}; // -------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------- public:
@@ -167,6 +168,7 @@ protected: public:
diff --git a/plugins/GSdx/GSVector4.h b/plugins/GSdx/GSVector4.h
|
This comment has been minimized.
This comment has been minimized.
Yeah, I'm just mostly seeing if there's any sort of workaround I can put in place. I doubt this is the last time we'll have people compiling on gcc 9.x. Though it may end up just being a matter of blocking gcc 9.0.1-9.10. Though I should've read the thread a little more carefully, as it specifies that it is the fastcall attribute on DrawScanlinePtr that's crashing the compile, and that removing it causes the software renderer to stop working. |
This comment has been minimized.
This comment has been minimized.
Glad to hear that. The main issue will be distributions that haven't applied the patch. I went ahead and pushed the compiler warning fixes, though I've switched back to gcc 8.3 until the ppm I'm using updates. |
This should be the relevant GCC patch: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=275ab714637a64672c6630cfd744af2c70957d5a |
I also downgraded temporarily to 8.3.0 and the package was able to build with no issues. |
FYI: I don't know if it is related, but GCC's bug tracker has an open report entitled: pcsx2-git: "At global scope: cc1plus: internal compiler error: Segmentation fault" |
Also on here: https://bugzilla.redhat.com/show_bug.cgi?id=1707463 |
I stumbled across this today. I could work around this by removing USE_LTO flag. The compiler is GCC 9.2.0 (flatpak 19.08 SDK) so I did not get the warning from the SearchForStuff.cmake file. I think the warning should also be shown on GCC 9.2.x |
What's the status on this with latest master? |
No response, assume resolved. |
PCSX2 version:
git checkout: 56a976e
gcc version 9.0.1 20190312 (Red Hat 9.0.1-0.10) (GCC)
[fedora 30]
fails to compile the GSdx plugin with a segmentation fault.
Description of the issue:
(What's the problem? - Screenshots showing the issue if applicable)
gcc 9.0.1 segfaults while compiling GSdx
With the following patch, the compilation ends and the hw rasterizer works; however the software rasterizer does not work (as it should have been expected).
The text was updated successfully, but these errors were encountered: