<div dir="ltr">Hi Arno,<div><br></div><div>I think that I've found out where the AGL link is coming from. It isn't via Carbon, it looks like it was linked directly into the VTK that you're using. And it looks like a bug within CMake itself.</div><div><br></div><div>CMake has a module called FindOpenGL.cmake that VTK uses to find OpenGL. It looks for both the OpenGL.framework and for the obsolete AGL.framework (which is only for Carbon, and is deprecated by Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses both, even though AGL.framework is really not needed for any modern software.</div><div><br></div><div>This means that a VTK that is built with (for example) Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is present in those older SDKs. It's a private link, though, so I'm surprised that it would cause the error. But you are building with Xcode 7 and you are seeing an error... that much is indisputable.</div><div><br></div><div>I suggest that you enable verbose error reporting so that you can see exactly what is being linked when the error occurs:</div><div><br></div><div>export VERBOSE=1</div><div>make</div><div>...</div><div><br></div><div>Use "unset VERBOSE" to turn off the verbosity.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein <span dir="ltr"><<a href="mailto:binarybottle@gmail.com" target="_blank">binarybottle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I tried again, and am still getting the AGL.framework error even when I set to 10.9 and the SDK to 10.11 (see: <a href="https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt" target="_blank">https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt</a>):<br><br>> [ 57%] Building CXX object travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o<span class=""><br>> make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', needed by `travel_depth/TravelDepthMain'. Stop.<br></span>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2<span class=""><br>> make: *** [all] Error 2<br><br></span>Could you please tell me how to ensure that there are no calls to Carbon APIs?<br><br>By the way, I am tracking this as an issue on Github:<div><a href="https://github.com/nipy/mindboggle/issues/69" target="_blank">https://github.com/nipy/mindboggle/issues/69</a><br></div><div><br>Cheers,<br>@rno<div><div class="h5"><br><div class="gmail_extra">
<br><div class="gmail_quote">On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>Using the macosx10.11 SDK is fine as long as it allows you to set this desired deployment target. So if you are able to compile with the following settings, then the result should run on OS X 10.7:</div><div><br></div><div><div>CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7</div><div>CMAKE_OSX_SYSROOT:STRING=macosx10.11</div></div><div><br></div><div>I'm not sure how far back you can set the deployment target with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9.</div><div><br></div><div>If if gives errors for the AGL.framework, then make sure that your code has no calls to Carbon APIs.</div><span><font color="#888888"><div><br></div><div> - David</div></font></span></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></div>