MacOS/X OpenGL linking errors (CMake, C++)


while I can build my project locally on all three platforms (Win10, OSX 10.14 (and 10.15), and Ubuntu Linux), I struggle getting it tested via Github Actions on all three platforms. I can’t get around the following error wrt. MacOS/X platform.

[93%] Building CXX object src/contour/CMakeFiles/contour.dir/main.cpp.o

make[2]: *** No rule to make target <strong>/Applications/</strong>', needed by src/contour/’. Stop.

It seems it cannot find the folder OpenGL.framework. So I was trying to add some debug prints in the build job, where such a folder could be, but I wasn’t very successful in fixing this issue.

Does anyone have experience in building OpenGL-based apps via Github Actions?

The relevant CMake file entries look like this:

set(contour_LIBRARIES GLEW::GLEW OpenGL::GL glm glfw terminal_view ground yaml-cpp)
target_link_libraries(contour PRIVATE ${contour_LIBRARIES})

Many thanks in advance,

I have the same issue, did you solve it or if there is someone else can help us

Hey, sadly I couldn’t fix that yet. I tried a lot with some debug shell statements in order to find out what I *could* do, but failed, that’s how I ended up here, to see if somebody could chime in and help me out. I’ll try again, but if you find something (or someone else), please share.

See you,


I moved my to my /Applications forder then I did a ls command in it, the  MacOSX10.14.sdk was not there so I “copied” it manually from my and checked if the OpenGL.platform was there, it is but I have a new error now :

ld: can't map file, errno=22 file '/Applications/' for architecture x86_64
clang: error: linker command failed with exit code 1

Fixed for me, I just did rm -r * on my build folder to clean all the cmake caches and I did a brew upgrade 

brew update && brew upgrade

then I make again my project and the error was gone :slight_smile: hope that can help you

Hey @rawiamhiri 

that would be awesome if that’s fixing it. Can you share me your project link, so I can inspect your Github Actions file?

sorry I can not share my project link for condidentiality reasons, but I can explain what I did to solve the problem more in details.
For me the problem was not with my cmake or my project it was with the xcode-beta version because it seems like some sdk was missing I just “copied” that sdk from my xcode to my xcode-beta
Here, w hat I did, you can try to do same:

  1. check if your is in your application folder, command line: 

    cd /Applications/

if your is there go to next step if not find it in your computer, maybe in Downloads, and copy paste it in your Applications folder

  1. Now your is in your “Applications” you should have the folder  OpenGL.framework in this path " /Applications/"
    check that using this command lines:

    cd /Applications/

if you can not “cd” the folder Frameworks, you should get it from your (I suppose you have already installed, if not you should install xcode from the appstore ) 
3. You should copy the " MacOSX10.14.sdk" :
i) open your (click right and open the package) the go to the SDKs container “Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs” and copy the directory " MacOSX10.14.sdk" 


ii) open your (click right and open the package) the go to the SDKs container “Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs” and paste

Voilà :slight_smile:

At the end to be sure that every thing is ok, just upgrade your brew and clean your build directory

brew update && brew upgrade
cd yourBuildDirectory
rm -r *

then cmake your project again, it should fix the problem