Gepetto / gepetto-viewer

Graphical Interface for Pinocchio and HPP.
BSD 2-Clause "Simplified" License
40 stars 30 forks source link

Fixed compilation following issue: "error: unknown type name 'GLDEBUGROC' #190

Closed cmastalli closed 2 years ago

cmastalli commented 2 years ago

I am recently moving my development to a Mac M1 laptop. And unfortunately, the current Conda installation does not support my ARM chip.

In this setup, I installed the following packages from homebrew:

then, I installed form source osgQT using 3.5.7 version (the current master branch doesn't work as noticed by @nim65s).

After doing that, I realised that this package was not compiling neither. Below, you can see details of the compilation error.

And this PR is fixing that issue.


In file included from /Users/cm2099/Devel/gepetto-viewer/src/gui/node-action.cc:20:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/mainwindow.hh:27:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/dialog/pluginmanagerdialog.hh:26:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/plugin-interface.hh:21:
In file included from /opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/QtGui:49:
In file included from /opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/qopenglcontext.h:61:
/opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/qopenglversionfunctions.h:1096:23: error: unknown type name 'GLDEBUGPROC'
    QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);
                      ^
In file included from /Users/cm2099/Devel/gepetto-viewer/src/gui/node-action.cc:20:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/mainwindow.hh:27:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/dialog/pluginmanagerdialog.hh:26:
In file included from /Users/cm2099/Devel/gepetto-viewer/include/gepetto/gui/plugin-interface.hh:21:
In file included from /opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/QtGui:51:
/opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/qopenglextrafunctions.h:472:33: error: unknown type name 'GLDEBUGPROC'
    void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
                                ^
/opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/qopenglextrafunctions.h:758:23: error: unknown type name 'GLDEBUGPROC'
    QT_OPENGL_DECLARE(QT_OPENGL_EXTRA_FUNCTIONS)
                      ^
/opt/homebrew/opt/qt5/lib/QtGui.framework/Headers/qopenglextrafunctions.h:2213:59: error: unknown type name 'GLDEBUGPROC'
inline void QOpenGLExtraFunctions::glDebugMessageCallback(GLDEBUGPROC callback, const void * userParam)
```bash
cmastalli commented 2 years ago

Another important details is: I have to do not define CMAKE_OSX_ARCHITECTURE in osgQt. Otherwise, it defines as default x64.

cmastalli commented 2 years ago

@nim65s the format job is failing. Could you give me instructions of how to format this code? Or just do it yourself?

cmastalli commented 2 years ago

@nim65s the format job is failing. Could you give me instructions of how to format this code? Or just do it yourself?

Actually, this is not related with my PR. Perhaps, it should be handle in another PR or later.

nim65s commented 2 years ago

yes, don't worry about the format, this is handled in #188, and it will only work well in CI after that

cmastalli commented 2 years ago

I cannot merge this PR myself, neither defining reviewers or labels. It would convenient to have this freedom (at least to define reviewers or labels).

Please go ahead with the merging when you find convenient, or give me this right.