<div dir="ltr">Thank you!  I am afraid I still don't know where it goes, given the conda installation of vtk doesn't have a CMake subdirectory (<span style="line-height:1.5">miniconda2/pkgs/vtk-6.3.0-py27_1/).  Any suggestions how to proceed?</span></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 7, 2016 at 3:16 PM David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It is not the same directory.  FindOpenGL.cmake is part of cmake, but vtkOpenGL.cmake is part of VTK.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 12:50 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">If that is the same directory that FindOpenGL.cmake is in, then the path I sent should be correct, yes?  I installed cmake using Anaconda: "conda install --yes cmake"</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 7, 2016 at 12:15 PM David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>My fault, I should have mentioned that it needs to be in <vtk-source>/CMake/vtkOpenGL.cmake in order be used during the VTK build.</div></div><div dir="ltr"><div><br></div><div> - David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 9:59 AM, 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">Thank you for the suggestion, David.  I placed the vtkOpenGL.cmake file in 







<p><span>/Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules but still receive the same error.</span></p></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 7, 2016 at 11:44 AM David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There's also this patch to vtkOpenGL.cmake that you can try:<div><br></div><div><a href="https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe" target="_blank">https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe</a><br></div></div><div dir="ltr"><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 7:11 AM, 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">That was an excellent suggestion, but alas, even after replacing that file with the newer one from the link you shared I am still getting the same error!</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 7, 2016 at 8:34 AM David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>You can try replacing FindOpenGL.cmake with the latest one from the cmake master branch:</div><div><a href="https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake" target="_blank">https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake</a></div><div>On my machine, for example, the file is located here:</div><div>/Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake</div><div>That might help with AGL.</div></div><div dir="ltr"><div><br></div><div> - David</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 5:37 AM, 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">Yes, it should be building from miniconda2.  However, I can't find any instance of "AGL" or of "10.7" anywhere in the code base  (only within the bin directory after running cmake).  I am baffled and stuck.</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 6, 2016 at 9:36 PM David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>Are you still building against the Anaconda python?  The build has to be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in your CMakeCache.txt, then it must be coming from somewhere.</div></div><div dir="ltr"><div><br></div><div> - David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 7:19 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">Dear David,<div><br></div><div>When I clear the bin directory, then run "cmake .." and "make" I don't find any instance of 10.7 mentioned in any file, but still get "AGL.framework" in every subdirectory's build.make file.  The CMakeCache.txt file contains the following line:</div><div><br></div><div><div>CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</div><div><br></div></div><div>And yet I am still receiving the following error:</div><span><div>







<p><span>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.</span></p></div></span></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div><div><div>
<br><div class="gmail_quote">On Wed, Jan 6, 2016 at 8:48 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>It could be a stale dependency.  Remove everything after the "INTERNAL cache entries" comment in your CMakeCache.txt, and also search your cache to make sure that 10.7 does not appear anywhere.</div><div><br></div><div>Also do an "ls -l /System/Library/Frameworks/" to make sure that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't see how that could happen).</div><span><font color="#888888"><div><br></div><div> - David</div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 5:34 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">David --<div><br></div><div>There was no instance of "AGL" in CMakeCache.txt, but I replaced every instance of "AGL" with OpenGL" in all of the build.make files.  Without cmake, but with make I got the following error:</div><div><br></div><div>







<p><span>make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', needed by `travel_depth/TravelDepthMain'.  Stop.</span></p><p>It still calls 10.7 even though I have 10.11 installed on my Mac.</p></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div><div><div>
<br><div class="gmail_quote">On Wed, Jan 6, 2016 at 7:02 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Arno,<div><br></div><div>Look for the following line in your CMakeCache.txt:</div><div><br></div><div>OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework<br></div><div><br></div><div>Change it to the following and then recompile:</div><div><br></div><div>OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework<br></div><div><br></div><div>That should keep the problematic AGL library out of your build.</div><div><br></div><div>Please let me know if this works.</div><div><br></div><div>Cheers,</div><div> - David</div><div><div>







<div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 4:45 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><div><div dir="ltr"><span style="font-size:12.8px">Thank you all so much for your kind help.  Unfortunately, I am still unable to compile the C++ code in my project on MacOSX, even after setting the following in my top-level CMakeLists.txt file:</span><div style="font-size:12.8px">SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7")<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">When I type:</div><div style="font-size:12.8px">$ export VERBOSE=1</div><div style="font-size:12.8px">$ make</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I get the following even though I don't have /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ but instead have /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ on my computer:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">------------------</div><div style="font-size:12.8px">...</div><div style="font-size:12.8px"><p><b>Scanning dependencies of target TravelDepthMain</b></p><p>/Applications/Xcode.app/Contents/Developer/usr/bin/make -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make travel_depth/CMakeFiles/TravelDepthMain.dir/build</p><p>[ 57%] Building CXX object travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o</p><p>cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -I/software/install/miniconda2/include/vtk-6.3 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -isystem /software/install/miniconda2/include  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk   -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp</p><p>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.</p><p>make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2</p><p>make: *** [all] Error 2</p></div><div style="font-size:12.8px">-------------------</div><div style="font-size:12.8px"><br></div><div class="gmail_extra" style="font-size:12.8px"><div dir="ltr"></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div style="font-size:12.8000001907349px">Cheers,</div><div style="font-size:12.8000001907349px">@rno</div></div></div></div>
<br><div class="gmail_quote">On Fri, Dec 11, 2015 at 9:36 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><span><font color="#888888"><div><br></div><div> - David</div></font></span><span><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><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><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><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></span></div>
</blockquote></div><br></div></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>