gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.19k stars 480 forks source link

Gazebo default branch broken on osx #1765

Closed osrf-migration closed 9 years ago

osrf-migration commented 9 years ago

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


http://build.osrfoundation.org/job/gazebo-default-devel-homebrew-amd64-2/115

/Users/jenkins/workspace/gazebo-default-devel-homebrew-amd64-2/gazebo7/gazebo/rendering/WideAngleCamera.cc:19:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^
osrf-migration commented 9 years ago

Original comment by Mykola (Bitbucket: 0xb000).


I don't have OS X so can't test it, but I hope the following patch will help

#!diff

diff -r c5371e62e2ea77a0fa8c1ff812e952f5a61e8aa3 -r f17ce449071cef804762346366af4c14c6858855 gazebo/rendering/WideAngleCamera.cc
--- a/gazebo/rendering/WideAngleCamera.cc   Mon Oct 12 14:38:54 2015 -0700
+++ b/gazebo/rendering/WideAngleCamera.cc   Wed Oct 14 20:49:48 2015 +0300
@@ -16,10 +16,19 @@
 */

 #if defined(HAVE_OPENGL)
+
+#if defined(__APPLE__)
+#include <OpenGL/gl.h>
+#include <OpenGL/glext.h>
+#else
+#if defined(_WIN32)
+  #include <windows.h>
+#endif /* _WIN32 */
 #include <GL/gl.h>
 #include <GL/glext.h>
-#endif
+#endif /* __APPLE__ */

+#endif /* HAVE_OPENGL */

 #include "gazebo/rendering/ogre_gazebo.h"
 #include "gazebo/rendering/CameraLensPrivate.hh"
osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Thanks, I'm testing it now.

osrf-migration commented 9 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


looks good to me.

I don't have windows but looks like the windows.h include is indeed needed as described in here and here.

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


This patch is working for me.

I noticed that you included a windows.h include, which @iche033 didn't have in d4995f957c40fb061b70f0f4894e23d0c39de5e8. Have you tested this on Windows?

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Ok, sounds good, let's make a pull request with this patch, which should fix the homebrew build. We can ask @peter_mitrano if he has time to test the windows build.

osrf-migration commented 9 years ago

Original comment by Peter Mitrano (Bitbucket: peter_mitrano).


I can test the build on windows. Which PR is it?

osrf-migration commented 9 years ago

Original comment by Mykola (Bitbucket: 0xb000).


Not tested on windows, PR

osrf-migration commented 9 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


pull request #1948

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).