pupil-labs / pyglui

cython powered OpenGL gui that works with glfw
MIT License
30 stars 20 forks source link

Issue with Recent OSX OpenGL Header relocation #30

Closed tstavropoulos closed 6 years ago

tstavropoulos commented 8 years ago

Migrating the issue to the correct repo.

For OSX: The setup.py for PyGlui expects to find the OpenGL headers in:

/System/Library/Frameworks/OpenGL.framework/Headers

They seem to have been moved in a (somewhat) recent OSX/Xcode updates to:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers

After updating the include directory in setup.py the install instructions worked properly. I'm running El Capitan with Xcode 7.3 installed. Something something... Apple -.-

Edit: Corrected Xcode version.

tstavropoulos commented 8 years ago

I'm not entirely sure how consistently and under what conditions the headers are located there, as opposed to elsewhere, which is why I opened this as an issue and not just a pull request. :)

mkassner commented 7 years ago

I could not recreate this. :-(

ignacioxd commented 7 years ago

I'm having this same issue. pip3 install git+https://github.com/pupil-labs/pyglui fails with a fatal error complaining it cannot find gl.h. Upon inspection, this file was not found in:

/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers

as specified in setup.py, but was instead in:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers/

I am on OSX 10.12.3.

laurentperrinet commented 6 years ago

Hi,

Similar error here which I fixed by adapting the response from @ignacioxd 👍

diff --git a/setup.py b/setup.py
index bebf312..6676a77 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ if platform.system() == 'Darwin':
     for root, dirs, files in os.walk('/usr/local/Cellar/glew'):
         if 'glew.h' in files:
             glew_header = os.path.join(root,'glew.h')
-    includes += ['/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/']
+    includes += ['/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/']
     link_args = []
     libs = ['GLEW']
     libglew = [] #we are using the dylib

I am on OSX 10.13.1.