Control: tags -1 patch Please find a patch included.
From: Bastian Germann <[email protected]> Subject: Fix armhf build failure: OpenGL macro conflict with Coin3D headers Bug-Debian: https://bugs.debian.org/1132247
On armhf, Qt5 uses GLES2 headers (<GLES2/gl2.h>) rather than desktop <GL/gl.h>. As a consequence, the desktop GL include guard (__gl_h_) is never set when <QOpenGLExtraFunctions> is processed. OpenGlWrapper.h redefines standard GL function names as macros: #define glClearColor gSimWindow->glClearColor When Gui/View3DInventorViewer.h is included *after* MillSimulation.h (which pulls in OpenGlWrapper.h), the Coin3D headers it depends on include <GL/gl.h> for the first time on armhf. The macro substitution then corrupts the C function declarations inside <GL/gl.h>, e.g.: extern void glClearColor(GLfloat, ...) becomes extern void CAMSimulator::DlgCAMSimulator::GetInstance()->glClearColor(...) which is invalid C++, producing "expected type-specifier before 'glClearColor'". On x86/amd64, Qt5 desktop includes <GL/gl.h> via <QOpenGLExtraFunctions>, so its include guard is set before Coin3D's include attempt, which then becomes a no-op. Fix: include Gui/View3DInventorViewer.h before MillSimulation.h so that <GL/gl.h> (and its function declarations) is processed and guarded before the gl* macros are defined. --- --- a/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/DlgCAMSimulator.cpp @@ -25,8 +25,8 @@ #include "DlgCAMSimulator.h" -#include "MillSimulation.h" #include "Gui/View3DInventorViewer.h" +#include "MillSimulation.h" #include <Mod/Part/App/BRepMesh.h> #include <QDateTime> #include <QSurfaceFormat> #include <QPoint>

