Building Paraview in debug mode with gcc 9 fails
Hi, ParaView 5.9 cannot be built in debug mode with gcc 9.3. Compilation fails with the following error message:
VTK/ThirdParty/ioss/vtkioss/Ioss_Assembly.C <ligne-de-commande>: erreur: expected unqualified-id before numeric constant
VTK/ThirdParty/ioss/vtkioss/Ioss_Utils.h:527:24: note: dans l'expansion de la macro "DEBUG"
527 | inline std::ostream &DEBUG() { return *Utils::m_debugStream; }
The issue seems to be due to the declaration of DEBUG function which name matches the preprocessor macro DEBUG Maybe there is some more subtle fix, but renaming the function:
inline std::ostream &DEBUG() { return *Utils::m_debugStream; }
to:
inline std::ostream &STREAM_DEBUG() { return *Utils::m_debugStream; }
and changing all occurences of this function solves the reported issue.
HTH, nabil.
PS: the issue can be reproduced with Fedora 30 or CentOS 7 with devtoolset-9.
Edited by Nabil G.