#42098 closed defect (worksforme)
gr-fosphor can't find OpenGL
Reported by: | DanielO (Daniel O'Connor) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | mavericks | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | gr-fosphor |
Description
Hi, I tried to build gr-fosphor on OSX 10.9 Mavericks but it fails to find OpenGL.
I cloned the source from git://git.osmocom.org/gr-fosphor and after some fiddling found that the -DCMAKE_OSX_SYSROOT=/ is what stops it working.
i.e. if I use the cmake line from the log with the SYSROOT part removed it builds & works fine.
Attachments (2)
Change History (21)
Changed 11 years ago by DanielO (Daniel O'Connor)
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
comment:2 Changed 11 years ago by DanielO (Daniel O'Connor)
Is there a work around for now? I have built it from source but I would prefer the comforting security blanket of a registered port :)
comment:3 Changed 11 years ago by michaelld (Michael Dickens)
Owner: | changed from macports-tickets@… to michaelld@… |
---|
comment:4 Changed 11 years ago by michaelld (Michael Dickens)
Setting CMAKE_OSX_SYSROOT=/ works for me on 10.8 and 10.9; it's a little odd, but it does work.
According to Darwin.cmake:311, the condition for when that WARNING message will be printed is if /Library/Frameworks is not a link, but /Library/Frameworks/Frameworks is a link. Which is quite strange if that's true. Do you have OSX set up in some odd manner? This should not impact the CMake configuration, but it's still odd.
OpenGL should be found in /System/Library/Frameworks/OpenGL.framework/ -- do you find it there on your setup? Is some part of this path a link maybe?
comment:5 Changed 11 years ago by michaelld (Michael Dickens)
I do not even have /Library/Frameworks/Frameworks in either 10.8 or 10.9 ... what's in there?
comment:6 Changed 11 years ago by DanielO (Daniel O'Connor)
OpenGL is in /System/Library/Frameworks/OpenGL.framework/
/Library/Frameworks/Frameworks is a symlink.. lrwxr-xr-x 1 root wheel 19 1 Apr 2011 /Library/Frameworks/Frameworks -> /Library/Frameworks
This is a new laptop but I transferred my stuff from my old laptop via a TM backup.
comment:7 Changed 11 years ago by michaelld (Michael Dickens)
Try deleting the /Library/Frameworks/Frameworks symlink; it is unnecessary. Then:
sudo port clean gr-forphor sudo port selfupdate sudo port install gr-forphor
and see if that works. If the latter still fails on gr-forphor, post the new logfile.
Changed 11 years ago by DanielO (Daniel O'Connor)
Attachment: | main.2.log added |
---|
comment:9 Changed 11 years ago by michaelld (Michael Dickens)
OK. What do the following return:
ls -lAF /System/Library/Frameworks/OpenGL.framework/. ls -lAF /System/Library/Frameworks/OpenGL.framework/Headers/.
I'm assuming on the 2nd line that "Headers" exists inside the framework. If not, there's a problem!
comment:10 Changed 11 years ago by DanielO (Daniel O'Connor)
[ur 12:23] ~ >ls -lAF /System/Library/Frameworks/OpenGL.framework/. Then I have a problem :(
total 24 lrwxr-xr-x 1 root wheel 26 31 Oct 17:14 Libraries@ -> Versions/Current/Libraries lrwxr-xr-x 1 root wheel 23 31 Oct 17:14 OpenGL@ -> Versions/Current/OpenGL lrwxr-xr-x 1 root wheel 26 31 Oct 17:14 Resources@ -> Versions/Current/Resources drwxr-xr-x 4 root wheel 136 31 Oct 17:14 Versions/ -rw-r--r-- 1 root wheel 1044 31 Oct 17:18 module.map ls -lAF /System/Library/Frameworks/OpenGL.framework/Headers/. [ur 12:23] ~ >ls -lAF /System/Library/Frameworks/OpenGL.framework/Headers/. ls: /System/Library/Frameworks/OpenGL.framework/Headers/.: No such file or directory
Any idea how to rectify the problem?
comment:11 Changed 11 years ago by michaelld (Michael Dickens)
Should read:
lrwxr-xr-x 1 root wheel 24 Nov 12 09:11 Headers@ -> Versions/Current/Headers lrwxr-xr-x 1 root wheel 26 Mar 2 2013 Libraries@ -> Versions/Current/Libraries lrwxr-xr-x 1 root wheel 23 Mar 2 2013 OpenGL@ -> Versions/Current/OpenGL lrwxr-xr-x 1 root wheel 24 Mar 2 2013 PlugIns@ -> Versions/Current/PlugIns lrwxr-xr-x 1 root wheel 26 Mar 2 2013 Resources@ -> Versions/Current/Resources drwxr-xr-x 3 root wheel 136 Mar 2 2013 Versions/
So ... if everything else in your OS works, then just create the missing symlinks & maybe that's good enough? Try this first, see if gr-fosphor builds, and then you can figure out what else you -really- want to do :)
You can try running "Disk Utility.app" and "Repair Disk Permissions" though I'm not sure it will create missing files or even symlinks.
My top suggestion, since this is likely not the only issue in your OS install, is to back everything up somewhere, wipe this disk clean, reinstall the OS from scratch, and restore from backup just your personal files and settings.
comment:12 Changed 11 years ago by DanielO (Daniel O'Connor)
Sadly there is no Headers directory in Version/Current (which points to A which is the only version)
I can't find gl.h in /System at all, I did find it under the Xcode application though..
[ur 13:33] /System/Library/Frameworks/OpenGL.framework >sudo find /System -name gl.h [ur 13:34] /System/Library/Frameworks/OpenGL.framework > [ur 13:35] /System/Library/Frameworks/OpenGL.framework >sudo find /Applications/Xcode.app -name gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES1/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES3/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES1/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES2/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/ES3/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
I'm not sure if it's the same problem as http://stackoverflow.com/questions/19756694/qt-5-and-os-x-mavericks-issues (although I am at a bit of a loss to know what the actual underlying error IS there)
comment:13 follow-up: 15 Changed 11 years ago by michaelld (Michael Dickens)
On my 10.9 install (backup, clear drive, install from scratch, restore just my login & related data), all of these files and symlinks for OpenGL are properly in place. So, either your install got messed up; or, these files were overwritten or not property written in the first place.
In your Xcode.app, did you install the command line tools & related stuff? Xcode -> Preferences -> Downloads -> Command Line Tools (check)
I always to this manually instead of trying to use the command line; I've heard unsubstantiated reports of folks using the command line and having missing files and such. Can't prove that manually is best, but then I've never had an issue :)
As a possible solution, you can always just copy the files from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/
into /System/Library/Frameworks/OpenGL.framework/ and see if/how that works ...
comment:14 Changed 11 years ago by DanielO (Daniel O'Connor)
Hmm, I don't _have_ command line tools shown in Xcode -> Prefs -> Downloads :-/
There is a drop down box labelled Command Line Tools which says Xcode 5.0.2 (5A3005) and has /Applications/Xcode.app under it.
I copied the headers over and I had to do the same things (copy Headers & link) for OpenCL.
It seems odd that _both_ would be broken on a fresh install.. Perhaps there is a new way to detect framework paths you're supposed to use (but no idea what that is..)
So, I have it working now but it seems like a kludge :(
comment:15 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to michaelld@…:
In your Xcode.app, did you install the command line tools & related stuff? Xcode -> Preferences -> Downloads -> Command Line Tools (check)
That's not how you do that on Mavericks / in Xcode 5. Instead, you run xcode-select --install
to install the Xcode command line tools.
comment:16 Changed 11 years ago by DanielO (Daniel O'Connor)
OK, I ran xcode-select --install and it said I didn't have the command line tools installed(!!) and I went through the install and now the Header files are there.
Aaarragh.
All good :)
comment:17 Changed 11 years ago by michaelld (Michael Dickens)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I used Xcode to install the Command Line Tools manually, not via xcode-select --install; silly Xcode! Anyway, I'm glad all is good now!
comment:18 follow-up: 19 Changed 11 years ago by michaelld (Michael Dickens)
Just FYI: "xcode-select --install" with the latest Xcode (5.0.2) on 10.8 results in
xcode-select: Error: unknown command option '--install'. xcode-select: Report or change the path to the active Xcode installation for this machine. Usage: xcode-select --print-path Prints the path of the active Xcode folder or: xcode-select --switch <xcode_path> Sets the path for the active Xcode folder or: xcode-select --version Prints the version of xcode-select
So, that's not a good way to install the CLT's. I suppose if OSX knows that the CLT's are not already installed, it might prompt the user to do so. For me, doing it manually has never failed!
comment:19 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to michaelld@…:
Just FYI: "xcode-select --install" with the latest Xcode (5.0.2) on 10.8 results in
xcode-select: Error: unknown command option '--install'.
With Xcode 5 on Mountain Lion, you still use Preferences > Downloads to get the Command-Line Tools. xcode-select --install
is only for Mavericks.
In future we will change the cmake portgroup to use the correct SDK always. See also #41783.