Closed barsnick closed 1 year ago
Hi @barsnick
This is a bug in GCC 8.5.0.
I installed an RHEL8 VM which comes with this version of GCC and I got the error too.
GCC should not report this error. As you noted, the problem does no appear with other versions of GCC. So, the bug was fixed in GCC. Moreover, this bug is not even consistent because the exact same kind of structure exists in other TSDuck classes and GCC 8.5.0 complains on this one only, not on the others.
I have pushed a small workaround to make GCC 8.5.0 shut up. You may retry with the latest version of the repo (or apply the fix in commit b243fdb in your version of you prefer).
Wow, thanks for figuring this out and the workaround. I did suspect something like a compiler bug or an insufficient C++ standard implementation.
It builds successfully now with this patch.
Bug description:
When building with g++-8.5, the mentioned error occurs. (I assume the error would be a warning without
-Werror
?) No problems occur with newer compilers (g++-11.4 and up, on CentOS9, Fedora 37/38/39/Rawhide).How to reproduce:
Fedora infrastructure COPR, running EPEL8 in a mock infrastructure, using packages from rhel-baseos, rhel-appstream, epel. Notably gcc, g++:
Build using
Expected behavior:
Compiles successfully.
Errors and logs:
Environment:
Additional information:
Building in a Fedora COPR: https://copr.fedorainfracloud.org/coprs/barsnick/tsduck/
For all I know, building with EPEL8 may fail at a later stage. Perhaps someone should try
make -k
in a Docker. At least I was able to provide all dependencies (see that COPR repo).I have no "build root" systems with compilers between versions 8.5 and 11.4 to test with.
I am aware that I am (not) yet complying to the packaging rules set up in https://tsduck.io/doxy/building.html. That should have no impact whatsoever on the compilation.