-
Notifications
You must be signed in to change notification settings - Fork 660
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
Compiling Issue on Mac OSX 10.8 #23
Comments
use c++ on osx 10.8 works fine without this problem However, there is a problem with compare_octrees.cpp By adding using namespace std, there is no problem with compilation on osx 10.8 now. |
I fixed the isnan issue in the latest commit, could you checkout (or download) the devel branch and confirm that it's compiling with OSX? You can run "make test" afterwards to check if all unit tests succeed. |
I cloned the latest "devel" branch, ran cmake .. and then make. It seems to compile fine, but the make command results in: make[2]: *** No rule to make target for octovis. If I do "make octomap" however, everything works. I followed this up with "make test"
Thanks! |
in octomap-config.cmake.in and octovis-config.cmake.in, library suffix has been hard coded as so while shared libs on osx ends with dylib. Quick work around can be if (APPLE) |
The second problem are the tests. Two of them fail, can you run them separately from a terminal?
from octomap/bin. |
Concerning your first problem: It looks like octovis can not be built against the octomap library ("make octovis", called by "make"). As yida wrote, OSX might need a workaround in the file octomap/octomap-config.cmake.in |
./test_color_tree I ran valgrind: stderr: http://pastebin.com/3rwqP9iB test_pruning yeilds an error: The stamped tree unit test works once in a while, but its error is: Let me know if this is helpful, or if you need more tests run. Thanks! |
I applied the simple apple patch. Running "git diff" yields: http://pastebin.com/QnbwPsMz Running make octovis seems to get further, but ends with this error: I ran "grep -nR lQGLViewer ." because this seems to be a framework issue. I replaced this line: ./octovis/CMakeFiles/octovis-shared.dir/link.txt:1:/usr/bin/c++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -framework OpenGL -o ../../lib/liboctovis.dylib -install_name /Users/stephen/src/octomap/lib/liboctovis.dylib CMakeFiles/octovis-shared.dir/src/SceneObject.cpp.o CMakeFiles/octovis-shared.dir/src/PointcloudDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/OcTreeDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/SelectionBox.cpp.o CMakeFiles/octovis-shared.dir/src/TrajectoryDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/ColorOcTreeDrawer.cpp.o -L/Library/Frameworks -framework OpenGL -framework AGL ../../lib/liboctomap.dylib ../../lib/liboctomath.dylib -lQGLViewer with /usr/bin/c++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -framework OpenGL -o ../../lib/liboctovis.dylib -install_name /Users/stephen/src/octomap/lib/liboctovis.dylib CMakeFiles/octovis-shared.dir/src/SceneObject.cpp.o CMakeFiles/octovis-shared.dir/src/PointcloudDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/OcTreeDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/SelectionBox.cpp.o CMakeFiles/octovis-shared.dir/src/TrajectoryDrawer.cpp.o CMakeFiles/octovis-shared.dir/src/ColorOcTreeDrawer.cpp.o -L/Library/Frameworks -framework OpenGL -framework AGL ../../lib/liboctomap.dylib ../../lib/liboctomath.dylib -framework QGLViewer I do a similar technique for another occurrence. The two commands, then, that I run in the "octomap/build/octovis" directory are: http://pastebin.com/8RtP9PfE I can run make and then make install with this. A screenshot of octovis running with a tree made on the Mac is attached. CMake is not my forte, but I will look to see if there is a simple fix for this framework issue. For reference, libqglviewer was installed with homebrew, with the extra linking instruction it stipulates. |
I may have a fix for the CMake issue, and the output of git diff is located here: http://pastebin.com/yA6qxLDz if you think this is ever a concern. With the linked patch, I build the whole thing with no errors, but do note that I am using Homebrew and NOT macports. Let me know if you need any more information. Thanks! |
@smcgill3 Thanks! Could you fork octomap here on GitHub, push that fix to your fork and then create a pull request? That makes it much easier to integrate patches back. I have no idea about the differences between Homebrew and Macports, so it would be good if someone using macports could test it. They can then directly do that from your fork. |
This fix makes problems in VC++. isnan() does not exist in VC++ and it is not std. This should help. #define isnan(x) _isnan(x) |
@tmdiv Could you fork the current devel branch, push the fix to your fork if it compiles for you and send me a pull request? That will be much easier for me and I can directly test it. |
I'm trying. I have problems with Pull request. Please give me some time. |
Sure, no problem! |
Fix missing isnan in Visual C++ (relates to #23)
Hello,
I downloaded your recent release of OctoMap - it looks great! I compiled and have a working example on my Linux Mint 64 bit machine. I am trying to port some code for use on my Mac. Following the simple installation method, I ran into difficulties.
mkdir build
cd build
cmake ..
This yields: http://pastebin.com/B6bgDUUu
make
This yields, in stderr: http://pastebin.com/wvGgyqxR
In stdout: http://pastebin.com/sS6HwXuC
I am not sure, but it may be related to clang:
http://clang.llvm.org/compatibility.html#cxx
Please let me know if you need anything else, or would like me to modify anything. Thanks a ton for your support.
Sincerely,
Steve McGill
The text was updated successfully, but these errors were encountered: