-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in FindQGLViewer.cmake when using system's QGLViewer #96
Comments
It's not necessary to have 2.4.0 bundled explicitly, but the full source package should include a recent QGLViewer to enable a straightforward compilation from source for most users. It may be a good idea to move QGLViewer into an "external" top-level directory instead, to enable easier packaging of the subcomponents. In theory, the CMake script should look for system installations of QGLViewer and only build from source when it doesn't find one. This mechanism worked fine for Ubuntu and Debian so far, so maybe we just need a fix for Arch? |
After some more investigation, the problem comes down to this. The QGLViewer package on Arch is currently installed to However, if QGLViewer is in [100%] Linking CXX executable octovis/bin/octovis
CMakeFiles/octovis.dir/src/ViewerWidget.cpp.o: In function `octomap::ViewerWidget::resetView()':
ViewerWidget.cpp:(.text+0x250): undefined reference to `qglviewer::Camera::setOrientation(float, float)'
CMakeFiles/octovis.dir/src/ViewerWidget.cpp.o: In function `octomap::ViewerWidget::setCamPosition(double, double, double, double, double, double)':
ViewerWidget.cpp:(.text+0x8d3): undefined reference to `qglviewer::Camera::setOrientation(float, float)'
... Adding |
Ah, I see! So this is just about the include path? I think there could still be a confusion of different versions if a user has different versions e.g. in |
I am seeing the same issue, but the /usr/include/QGLViewer/* is present for me. To remind this the error I am seeing. CMakeFiles/octovis.dir/src/ViewerWidget.cpp.o: In function |
I tried the $ make clean (+ remove the CMakeCache.txt, and the CMakeFiles/*) and then tried rebuilding $ make, it worked. |
While packaging octovis for Arch Linux, I encountered the errors described in #73. It turns out that the problem comes from FindQGLViewer.cmake:
QGLVIEWER_BASE_DIR
targetssrc/extern/QGLViewer
instead of the system's QGLViewer (asQGLViewer_INCLUDE_DIR
), leading to clashes in the API.Is the 2.4.0 version of QGLViewer bundled with octovis really necessary? If not, the CMake module should be fixed accordingly. In the meantime, I made a quick and dirty patch for Arch's package that seems to solve it.
The text was updated successfully, but these errors were encountered: