-
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
Improved documentation of supported toolchains #3596
base: main
Are you sure you want to change the base?
Conversation
I would prefer if we would define some target platforms and derive the minimum of a supported version from that - even if those might be already EOL or EOS. We also need to do builds with the actual available Qt and Python version provided by the platform since we "cheat" in the CI by installing a specific version. This is not possible for actual users of those platforms so building might not actually work for them. @danmar mentioned several times that there are some very specific platforms or configurations some users are building on so I would like to have some more details on that. This is not necessarily for CI (a single manual evaluation for a baseline might be enough) but just for documentation and decision purposes. |
Imho, we do not need to support very old tools. If somebody has a 10+ year old system he/she can still build the command line tool by running the compiler manually.
Imho it's ok to drop older VS support when we can't test it in CI anymore.
I don't remember details. But yes 10-20 year old distros are still used. |
@danmar I just gave it a spin with GCC 4.6 on Ubuntu 12.04 and it doesn't even compile. It bails out very early with lots of errors like these:
So I think we can toss that GCC 4.6 support into the bin and make GCC 4.8 the minimum since that works and we can actually test it in the CI. |
the users I have talked with can't upgrade so easily. especially upgrading a production system is not reasonable.
I would like that it is clear that we do support all other distros/OSes also. If a user with a non-listed OS/distro has problems I would try my best to help them. |
If such cases come up in the future it would be great if we could document it at least. If there is more common knowledge about such things it might help improve things and make it easier for the next user/support case.
This is just something to track so we can determine a baseline for the individual tooling and know what we should be testing with. This would not be a list of "supported" platforms but "tested" ones IMO. Like the minimum supported version of GCC 4.6 but that probably hasn't worked in years and has not been tested at all. If we make any claims we should be able to actually fulfill them and back them up with testing. |
I really dont see the need to support really old systems. Cppcheck is a dev tool which is meant to run in the dev environment not the the really old production systems that a user maybe targeting. A dev environment is usually much more recent. The user is either ssh-ing/rsyncing into an old system or cross-compiling for the old system, all from a recent OS/distro. Even if they need to build with an older compiler(ie Visual Studio 2012) they can still install a newer compiler to build and run cppcheck. Furthermore, I fail to see how a recent OS/distro is inaccessible to a developer targeting an old system. |
yes. I agree.
I looked up a discussion I had in 2017 with an engineer:
|
ok sounds good to me. I am not against that we document what we test on. If we can somehow add a CI pipeline that uses GCC 4.6 and it's not too much work to make that happy then I would like to stay with GCC 4.6. Otherwise.. yes I fear we have to change to 4.8. We can't claim we support 4.6 if it does not work at all. |
I tried that with #3545 but that system lacks symbols which are necessary to be run within the CI. And I guess it will be some work to get GCC 4.6 to work again.
If you integrate it within the CI it's not just a local system. But just like we are using older and newer systems for certain builds you should be able to do that within your CI nowadays. Unless you have some integration directly with the actual build like the CMake one.
That doesn't even supported C++11 at all I think - that probably hasn't been working in like longer than GCC 4.6 hasn't.
I always hated that there is only an installer. I prefer "portable" packages which allow me to just extract it somewhere and run it. I think we already do this packaging but just don't archive it with the releases. I think we should add that. We should add the change from the Debian package by Joachim which prefers the local configurations over the global path then. |
I compiled the democlient with gcc-4.4 until sourceforge finally upgraded it ~ 5-6 years ago. It was a pain though, I used a script to convert certain code constructs to be able to compile. For information.. sourceforge shell uses gcc-4.8.5 now.
yes maybe that is a way to get around the problem like that in some cases. as far as I know qt can't be executed on i.e. windows xp but probably it's possible to create a package with command line cppcheck.exe at least. I think it's ok that we can't offer the GUI. |
thanks for trying at least! well.. so I would also say it's ok to change to GCC 4.8. I don't volounteer to make GCC 4.6 work in a CI pipeline. |
If they are able to build/compile programs as a workaround, then why dont they build a newer gcc? Furthermore, cppcheck is a 100% volunteer effort. If companies are making it so difficult for developers to have a productive dev environment then they should be investing either money, effort, or resources in order to support cppcheck on such arcane systems. |
I am not sure what effort that is but I would assume it's not just the compiler itself also some libraries.
Yes :-) |
For information the engineer worked on NASA. I imagine it would be hard to convince NASA to fund Cppcheck, I guess we would need to get accepted at some high level as a prioritized tool. |
Good point. Why should be more generous than than the Linux kernel? If something cannot be maintained and bitrots we have to drop broker stuff unless somebody steps up.
NASA has shitloads of money and AFAIK they also open-source stuff and contribute to it. So if that is really LLVM for instance is very aggressive in dropping supported toolchains and moving up the C++ standard requirement. There's probably more people relying on clang-tidy and custom plugins for it than Cppcheck.
On Linux that will only work if you can target older runtimes libc and glibc runtimes (I have no idea how to do that). That's one of the problems why Ubuntu 12.04 doesn't work in the CI since those libraries are too old to run newer binaries.
Okay - so I place that in the decisions.
I am on board with Windows 7 support. But Windows XP support is madness. Lots of runtimes and libraries no longer work on that. And if you need it you need to you have to use an EOL Qt version (everything but Qt 6.2 is essentially EOL now since they changed their business model). The oldest Qt version we were using in the CI was 5.6 via Appveyor. So it's not clear if we might even build on ubuntu 14.04 with Qt 5.2. I would broaden that as a start and try to define it more clearly. |
Don't have too much pity on large orgs or corporation running legacy systems with unmaintained software, unless they're willing to fund work on supporting such old systems. And anyone wishing to run cppcheck of dusty old systems could make a static build of cppcheck using a recent compiler, then just copy the binary to that old dusty system. Bumping requirements to GCC 4.8 would help unlock C++11 usage. GCC 4.8's changelog describe their C++11 support as still being experimental, but it's the first major GCC release with virtually complete C++11 support. https://gcc.gnu.org/gcc-4.8/changes.html |
Didn't think of that. That's the obvious solution.
This and the previous point are something to consider if the next case comes up. Maybe it's something those people didn't think about or are not even aware of. Just because those people are being tasked with doing something on *nix doesn't mean they actually have any clue about it (I am speaking from experience).
Big emphasis on the "experimental" and "virtually". |
GCC 4.8 C++11 is pretty much complete. I said virtually complete because it lacks "Minimal support for garbage collection and reachability-based leak detection" (N2670) https://gcc.gnu.org/gcc-4.8/cxx0x_status.html At work I'm working on a reasonably large C++ codebase that we've been building continuously (we have CI) for a few years with GCC 4.8 + C++11 flag. We're not using every C++11 features but a number of common ones (TLS, lambda, regex, shared_lock, memory-safe function in libc, ..) without any compiler issue so far. |
Used it for years at my previous workplace as well. Main issue was with the initializer list stuff which it gets confused by often so you have to stick with simple braces in those cases. |
Compilation with Qt 5.2 on Ubuntu 14.04 fails:
|
On Ubuntu 16.04 is is not possible to build the GUI with CMake since The I really think we should give |
I don't have any issues dropping support for GUI in Ubuntu 16.04.
If we achieve feature parity.. then sure why not. |
Interestingly there is a compiler version check in |
The only thing which is exclusive to the Appveyor build is the usage of Visual Studio 2013 and Qt 5.6. The Visual Studio 2015 build was broken by ourselves and hasn't be enabled in quite a while. The Qt version can be simply added to the GitHub actions but is not really necessary since you can get any version for Windows easily - and since it is not part of the platform you actually have to get it, so fetching a different version is actually not a big issue. So I suggest we drop at least the Visual Studio 2013 support which would allow us to completely drop the Appveyor builds. There are some holes in the GitHub actions but that will be incrementally addressed in the future. |
this is OK for me. |
The |
this is ok for me. will be a relief. |
8829fa2
to
9c1d4d6
Compare
We should specify and properly check the tooling we (cl)aim to support. Please feel free to post any additions/omissions as well as opinions and open talking points. At the end I would like to add this list to the
readme.md
or s separate file we link form there.Here's a short overview:
Build systems (minimum):
2.83.5Qt qmake20132015Compilers (minimum):
4.64.85.12.93.518 (VS2013)19.0 (VS2015)Qt:
5.65.9.95.15.2Python:
2.73.4+3.6+Distros/OSes (initial summary to determine tasks):
Ubuntu 12.04 (requires EOL repos to install packages)Ubuntu 14.04Ubuntu 16.04Ubuntu 18.04CentOS 7Platforms:
x86Third-party libraries:
CI missing:
GCC < 4.82013/2015/2017/2022Clang (explicit build)(no need for explicit build - implicitly done with clang-tidy which also provides compiler warnings)Ubuntu 12.04 (for GCC 4.6 via(no longer necessary since we raised the minimum GCC version to 4.8)ppa
)Python 3.4 (no longer available)Visual Studio withmsbuild
(explicit build - implicitly done in release build - lost recently in regular CI)newer MacOS versionsCurrently not working:
Ubuntu 14.04 GUI build - Improved documentation of supported toolchains #3596 (comment)Ubuntu 16.04 GUI build with CMake - Improved documentation of supported toolchains #3596 (comment)Misc:
To be discussed:
remove support for older Visual Studio versionsremove support for EOL Python 3.x versions (depend on platform?)remove support for EOL Qt versions (depended on platform?)remove qmake supportremove "support" for Ubuntu 12.04 (and similar platforms) since it doesn't even have a proper CMake, Qt5 and Python 3.x versionraise the minimum GCC version (seems like we won't be able to run any system with it in the CI)remove Python 2.x support since all platforms seem to have at least Python 3.4remove support for EOS Ubuntu versionsTasks:
raise minimum supported GCC version to 4.8- bumped minimum supported GCC version to 4.8 #3768add Python 3.4 to CI- scriptcheck.yml: added Python 3.4 #3683Makefile
targets/functionality into CMake - added make targetscheckCWEEntries
,validateXML
andvalidateRules
to CMake #4010 / added remaining make targets to CMake #4026integrate all qmake targets/functionality into CMake- refs #12066 - added CMake optionBUILD_ONLINE_HELP
to conditionally addonline-help.qhc
target to CMake #6818build with Qt version provided by platform on Linux- CI-unixish.yml: Use Qt version provided by the distro #3729determine actual minimum supported Clang version- bumped minimum requirements to GCC 5.1 / Clang 3.5 / Visual Studio 2015 / CMake 3.5 #5398create Windows portable archive (release files without installer)- installer: added missing library configurations and removed unneeded Qt DLLs / refs #10771 - added initial portable package #4669remove- removed OVERRIDE and FINAL defines and use the keywords directly #3767OVERRIDE
/FINAL
remove unnecessary- fail__cplusplus
checksrun-clang-tidy
in case of compiler warnings / fixed Clang warnings / cleanups #4036 / 81efa0fprefer Python 3.x over Python 2.x- use Python version provided by platform in CI / prefer python3 #3776 / use python3 on debians too #3812 / fixed #12682 - deprecated support for Python 2.7 #6369restore- CI-windows.yml: added windows-2022, removed QT 5.9.9 and use msbuild instead of CMake for now #3730msbuild
Visual Studio build in CIadd Visual Studio 2022 to CI- CI-windows.yml: added windows-2022, removed QT 5.9.9 and use msbuild instead of CMake for now #3730add newer MacOs versions to CI- CI-unixish.yml: addedmacos-11
andmacos-12
#4117run-clang-tidy
in case of compiler warnings / fixed Clang warnings / cleanups #4036 / refs #12021 - CI-windows.yml: fail build on compiler warnings / some cleanups #6982move remaining stuff from defunct Travis configuration to GitHub Actions- Moved some stuff from Travis to GitHub Actions / Cleanups #3715 / refs #8659 - fixed CMake installation / added tests for make and CMake install targets to CI #7100