-
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
octovis has link errors #132
Comments
That's weird, the build server compiles and links just fine (https://travis-ci.org/OctoMap/octomap). Do you have more details about your setup? Did you already try a make clean (+ removing CMakeCache)? You're not building with Qt5 by chance? Octovis is currently only working with Qt4. |
Not using Qt5. Hmm, there seems to be something broken/screwy about the way QGLViewer gets built (I noticed it appears to be built at configure time? Yike!). I'm trying to make some changes to another project that consumes octomap and was on some older SHA that has other build errors. If I try to build octomap by itself, clean, I don't get the QGLViewer errors, but do still get the Qt errors. This is not surprising, as I do not see that Qt is being linked anywhere. (And I do mean anywhere; not just in octovis where they are obviously needed given the above errors, but in the entire repo. How it's working anywhere is beyond me...) Fedora 21. |
AFAICT the answer is "linker voodoo"... |
Yeah, that was a rather quick hack to get a usable solution for people who don't have a system install of QGLViewer available. Patches welcome! ;) Here's the verbose linker output for Ubuntu 14.04, I do see the Qt libs in there.
|
Just ran into this issue when building 1.9.0 under Debian Jessie (8.9). octovis from the build directory works, but not the one that gets installed ( Here's the relevant part of the build log: Linking CXX executable ../../bin/octovis
/usr/bin/c++ -Wall -Wno-error -O3 -funroll-loops -DNDEBUG CMakeFiles/octovis.dir/src/main.cpp.o CMakeFiles/octovis.dir/src/ViewerGui.cpp.o CMakeFiles/octovis.dir/src/ViewerWidget.cpp.o CMakeFiles/octovis.dir/src/ViewerSettings.cpp.o CMakeFiles/octovis.dir/src/ViewerSettingsPanel.cpp.o CMakeFiles/octovis.dir/src/ViewerSettingsPanelCamera.cpp.o CMakeFiles/octovis.dir/src/CameraFollowMode.cpp.o CMakeFiles/octovis.dir/include/octovis/moc_ViewerGui.cxx.o CMakeFiles/octovis.dir/include/octovis/moc_ViewerWidget.cxx.o CMakeFiles/octovis.dir/include/octovis/moc_ViewerSettings.cxx.o CMakeFiles/octovis.dir/include/octovis/moc_ViewerSettingsPanel.cxx.o CMakeFiles/octovis.dir/include/octovis/moc_ViewerSettingsPanelCamera.cxx.o CMakeFiles/octovis.dir/include/octovis/moc_CameraFollowMode.cxx.o CMakeFiles/octovis.dir/qrc_icons.cxx.o -o ../../bin/octovis -rdynamic -lQtOpenGL -lQtGui -lQtXml -lQtCore ../../lib/liboctomap.so ../../lib/liboctomath.so ../../lib/liboctovis.so.1.9.0 -lGL -lGLU ../../lib/liboctomap.so ../../lib/liboctomath.so ../../octovis/src/extern/QGLViewer/libQGLViewer.so -Wl,-rpath,/home/pvt/Workspace/Libraries/octomap-1.9.0/lib:/home/pvt/Workspace/Libraries/octomap-1.9.0/octovis/src/extern/QGLViewer: octovis gets linked to a local copy of libqglviewer ( |
Could it be that you configured (cmake) OctoMap at one point where you didn't have the system-provided libqglviewer installed yet? This probably caused the build of the local copy, which later gets picked up. The behavior is a little buggy in that way (different locations of headers and libs get mixed up). You could clean the local lib (manually), reconfigure and then rebuild, that should fix the problem. |
That could have caused it, but I don't think that is the case - I had libqglviewer prior to building octomap from source. I did clean the build and rebuilt octomap after checking that libqglviewer was indeed installed, but got the same linking issue, so I ended up fixing it with ccmake as previously mentioned. |
A regular "make clean" is not enough, did you completely wipe the build directory, including CMakeCache? You also have to remove the locally build QGLViewer lib. Completely clean builds on the build server build and link fine: https://travis-ci.org/OctoMap/octomap |
It seems that Qt is not being linked at all, and there is something wrong with QGLViewer. Interestingly, if I use system-provided QGLViewer, I have fewer link errors, which makes me wonder if the internal version is not exporting symbols or something...
The text was updated successfully, but these errors were encountered: