CGNS 3.4.1 reverts the CPEX 41 NGON changes
See https://github.com/CGNS/CGNS/releases for details. But in any case, 3.4.1 removes functions like cg_poly_section_write() so with the current conditional the build fails with:
/builddir/build/BUILD/ParaView-v5.8.0/VTKExtensions/CGNSWriter/vtkCGNSWriter.cxx:292:7: error: 'cg_poly_section_write' was not declared in this scope; did you mean 'cg_section_write'?
292 | cg_poly_section_write(info.F, info.B, info.Z, "Elem_NFACE_n", CGNS_ENUMV(NFACE_n), 1 + ngons,
| ^~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/ParaView-v5.8.0/VTKExtensions/CGNSWriter/vtkCGNSWriter.cxx:63:16: note: in definition of macro 'cg_check_operation'
63 | if (CG_OK != op) \
| ^~
/builddir/build/BUILD/ParaView-v5.8.0/VTKExtensions/CGNSWriter/vtkCGNSWriter.cxx:303:24: error: 'cg_poly_section_write' was not declared in this scope; did you mean 'cg_section_write'?
303 | cg_check_operation(cg_poly_section_write(info.F, info.B, info.Z, "Elem_NGON_n",
| ^~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/ParaView-v5.8.0/VTKExtensions/CGNSWriter/vtkCGNSWriter.cxx:63:16: note: in definition of macro 'cg_check_operation'
63 | if (CG_OK != op) \
| ^~
make[2]: *** [VTKExtensions/CGNSWriter/CMakeFiles/VTKExtensionsCGNSWriter.dir/build.make:83: VTKExtensions/CGNSWriter/CMakeFiles/VTKExtensionsCGNSWriter.dir/vtkCGNSWriter.cxx.o] Error 1
4.0.0 adds it back, so I'm afraid you are going to need a more complex conditional to handle this (if you want to - I think Fedora is going to quickly jump to 4.0.0).