-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
bumped minimum requirements to GCC 5.1 / Clang 3.5 / Visual Studio 2015 / CMake 3.5 #5398
Conversation
This will also allow us to properly use These versions also represent the minimum required version to be able to use C++14 (based on llvm/llvm-project@20644a9). GCC 5.1 has been released on April 22, 2015 and Clang 3.5 is from 2014. I have not yet checked which version of Visual Studio has proper C++14 support - LLVM specified Visual Studio 2017 but they also had that for C++11 support. A side effect of this is that we no longer have systems in the CI which check the CMake 2.8 compatibility. But as features of that will no longer be supported in shortly upcoming version we can no longer rely on that and we already partially require CMake 3.9. I will check which version should be the new minimum. |
Current CMake already warns:
|
FYI CMake 3.28 removed support for Visual Studio 2012 and deprecated support for Visual Studio 2013. So no need to act on that. |
Here's a feature matrix which displays that GCC 5.x is required for "full" C++11 support: https://en.cppreference.com/w/cpp/11. But according to that you also need Clang 3.8 and Visual Studio 2015. I would still go by the LLVM reference (which was deemed sufficient for introducing C++14 feature) as a first step. |
Looking at https://en.cppreference.com/w/cpp/14 - GCC 5 (except for a partial feature), Clang 3.4 and Visual Studio 2015 provide full C++14 support. |
With Visual Studio 2012 out of support and Visual Studio 2013 support running out in April 2024 (see https://learn.microsoft.com/en-us/visualstudio/productinfo/vs-servicing#older-versions-of-visual-studio) I think we should bump it to Visual Studio 2015. As we are only actively testing with Visual Studio 2019 and up there's no guarantee it will be working anyways. (Also I could get rid of those old installations on my local system). |
a898e1c
to
5cdfe01
Compare
5a5e414
to
f82cda9
Compare
Time to merge this, isn't? |
Probably. At I intended to, but I as I am currently not in the state to do proper work or follow-up on things I have not been on top for things for the past week and it will possibly be like that for a bit longer. |
This is ready for review now. I think I will be able to guide this enough. I also have direct follow-up PRs which clean up the CMake part a bit. |
hmm.. what is the problem you try to solve.. on the sourceforge server, gcc 4.8 is installed and I cannot upgrade it easily. It is used to build the democlient: https://cppcheck.sourceforge.io/demo/ $ g++ --version we use the Makefile to build the democlient so the changes in the cmake does not matter much.. but if we don't compile with gcc 4.8 in the github actions anymore there will soon be code that is not handled.. |
We had very few breakage in that way. You could also build a static binary on a newer system to deploy to that system. Or you could build it using Clang - maybe that version matches the new requirement. |
I remember before they upgraded gcc to 4.8 it was horrible. I had sed scripts that changed certain code constructs before compiling.. I rather not go back to such solution..
clang is not available on the server.. but yeah it might be possible to compile a static binary.. but I assume I can't compile it on latest linux distros and expect that it works on their server.. |
are you saying that we haven't compiled with gcc 4.8 ? if we did manage to compile with 4.8 until now can we keep the build or what is the problem with that? |
That is the point of a static binary that it should work on any system as it is fully contained.
I meant that we seldom had build failures which were caused by GCC 4.8. |
I am not 100% sure. The linux kernel is not embedded into the binary. What if a system call interface or something is changed..
I would feel afraid that we will not discover this during development. And then I discover it after the release and it's much more complex to solve it then. |
I have tried to build a static cppcheck binary and uploaded it to the server.. and as far as I see it works fine to execute it in the server shell.. so as far as I see this is an option for me. I don't think we need to stick to gcc-4.8 for the democlient at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this.
I do not think that it is very likely. We also don't do that much stuff which should dependent on evolving syscalls. If you don't always use the the bleeding-edge glibc that can be circumvented I guess.
Great! |
The current versions only have partial C++11 support which fortunately has caused us only few issues so far but it would be good to finally have fully working C++11 support. This also gets rid of several CI builds on very outdated platforms.
The outdated platforms were used to also test CMake 2.8 but as future versions of CMake will drop combability with CMake < 3.5 this is a good time to also drop that requirement on our part.
This PR does not remove or update any outdated code.