[vtkusers] Migration to VTK6

Arno Klein binarybottle at gmail.com
Fri Jan 8 14:27:10 EST 2016


Thank you for all of your help, David! I really appreciate it.  I have
written to the anaconda forum and will tell you what I learn...

On Fri, Jan 8, 2016, 10:46 AM David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Arno,
>
> I'm afraid you're on your own at this point.  I have no real experience
> with Anaconda, all my experience is purely with CMake and VTK, and I'm not
> going to go so far as to install miniconda on my own system to investigate.
>
>  - David
>
>
> On Fri, Jan 8, 2016 at 8:18 AM, Arno Klein <binarybottle at gmail.com> wrote:
>
>> I made the edits you recommended (AGL to OpenGL and 10.7 to 10.11) in all
>> miniconda2 files and rebuilt my mindboggle package, and still get the same
>> error!  Should I have done something more with miniconda2's cmake or vtk?
>>
>> On Fri, Jan 8, 2016, 12:10 AM David Gobbi <david.gobbi at gmail.com> wrote:
>>
>>> Hi Arno,
>>>
>>> The fact that a specific SDK has been hard-coded into all those
>>> dependency paths is very, very ugly.  The Anaconda folks should know better
>>> than that.
>>>
>>> You can't get away with just commenting out those lines.  Instead, I
>>> recommend that you do the following search and replace within each of those
>>> files:
>>> 1) replace 10.7.sdk with an SDK that you actually have on your system
>>> 2) replace AGL.framework with OpenGL.framework
>>>
>>> However, the fact that you got the _same_ error after commenting out
>>> those lines, instead of getting a different error, suggests that your build
>>> did not pick up the change.  After changing the files, did you erase your
>>> build directory and do a full rebuild?
>>>
>>>  - David
>>>
>>>
>>> On Thu, Jan 7, 2016 at 9:40 PM, Arno Klein <binarybottle at gmail.com>
>>> wrote:
>>>
>>>> Thank you again, David.
>>>>
>>>> The find command turned up one file within the
>>>> miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake"
>>>> Within this file, I commented out lines with AGL and 10.7 (see below),
>>>> but I still get the same error!
>>>>
>>>>
>>>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion:
>>>>
>>>> # find . -name "*.cmake" -exec fgrep -l AGL {} +
>>>>
>>>> set_target_properties(vtkRenderingOpenGL PROPERTIES
>>>>
>>>>   INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa"
>>>>
>>>> )
>>>>
>>>> #set_target_properties(vtkRenderingOpenGL PROPERTIES
>>>>
>>>> #  INTERFACE_LINK_LIBRARIES
>>>> "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\
>>>>
>>>>
>>>> latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\
>>>>
>>>>
>>>> work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\
>>>>
>>>> acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework
>>>> Cocoa"
>>>>
>>>> #)
>>>>
>>>>
>>>> # Create imported target vtkRenderingContextOpenGL
>>>>
>>>> add_library(vtkRenderingContextOpenGL SHARED IMPORTED)
>>>>
>>>>
>>>> set_target_properties(vtkRenderingContextOpenGL PROPERTIES
>>>>
>>>>   INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL"
>>>>
>>>> )
>>>>
>>>>
>>>> # Create imported target vtkgl2ps
>>>>
>>>> add_library(vtkgl2ps SHARED IMPORTED)
>>>>
>>>>
>>>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion:
>>>>
>>>> # find . -name "*.cmake" -exec fgrep -l AGL {} +
>>>>
>>>> set_target_properties(vtkgl2ps PROPERTIES
>>>>
>>>> INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;"
>>>>
>>>> )
>>>>
>>>> #set_target_properties(vtkgl2ps PROPERTIES
>>>>
>>>> #  INTERFACE_LINK_LIBRARIES
>>>> "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\
>>>>
>>>>
>>>> latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\
>>>>
>>>>
>>>> s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\
>>>>
>>>> tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m"
>>>>
>>>> #)
>>>>
>>>> On Thu, Jan 7, 2016 at 4:17 PM David Gobbi <david.gobbi at gmail.com>
>>>> wrote:
>>>>
>>>>> I apologize for that... I had forgotten that you were using a binary
>>>>> distribution of VTK rather than building VTK from source.  My recent
>>>>> thinking was that the only binary piece you were using from Anaconda was
>>>>> python itself, I didn't go back and re-read our entire conversation.
>>>>>
>>>>> This means that all of my recent advice to you has been totally
>>>>> irrelevant.  (It would be very relevant to the Anaconda folks if they plan
>>>>> to put out a new vtk package soon... they could save people like yourself a
>>>>> lot of difficulty.)
>>>>>
>>>>> If you're using a binary vtk, then you'll have to dig into the cmake
>>>>> exports for VTK and perform some surgical changes to them.  Somewhere in
>>>>> your Anaconda VTK, there should be a directory called the following:
>>>>>
>>>>> cmake/vtk-6.3
>>>>>
>>>>> Once you find that directory, "cd" into it, and it should be full of
>>>>> cmake files.  These cmake files list the dependencies for your VTK
>>>>> package.  If you edit these files to remove all references to "AGL" and the
>>>>> problematic SDK, then your compile difficulties should go away.  For
>>>>> example, use this to find all the files that reference AGL:
>>>>>
>>>>> find . -name "*.cmake" -exec fgrep -l AGL {} +
>>>>>
>>>>> But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1,
>>>>> and then re-do your build there.
>>>>>
>>>>>  - David
>>>>>
>>>>>
>>>>> On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein <binarybottle at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> 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 (miniconda2/pkgs/vtk-6.3.0-py27_1/).
>>>>>> Any suggestions how to proceed?
>>>>>>
>>>>>> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi <david.gobbi at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> It is not the same directory.  FindOpenGL.cmake is part of cmake,
>>>>>>> but vtkOpenGL.cmake is part of VTK.
>>>>>>>
>>>>>>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein <binarybottle at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> 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"
>>>>>>>>
>>>>>>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi <david.gobbi at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Arno,
>>>>>>>>>
>>>>>>>>> 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.
>>>>>>>>>
>>>>>>>>>  - David
>>>>>>>>>
>>>>>>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein <binarybottle at gmail.com
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>> Thank you for the suggestion, David.  I placed the
>>>>>>>>>> vtkOpenGL.cmake file in
>>>>>>>>>>
>>>>>>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules
>>>>>>>>>> but still receive the same error.
>>>>>>>>>>
>>>>>>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi <
>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> There's also this patch to vtkOpenGL.cmake that you can try:
>>>>>>>>>>>
>>>>>>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe
>>>>>>>>>>>
>>>>>>>>>>>  - David
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein <
>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> 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!
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi <
>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>
>>>>>>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one
>>>>>>>>>>>>> from the cmake master branch:
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake
>>>>>>>>>>>>> On my machine, for example, the file is located here:
>>>>>>>>>>>>>
>>>>>>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake
>>>>>>>>>>>>> That might help with AGL.
>>>>>>>>>>>>>
>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein <
>>>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi <
>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein <
>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Dear David,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> And yet I am still receiving the following error:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>> @rno
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi <
>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> 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).
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein <
>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> David --
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on
>>>>>>>>>>>>>>>>>> my Mac.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>> @rno
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi <
>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Change it to the following and then recompile:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> That should keep the problematic AGL library out of your
>>>>>>>>>>>>>>>>>>> build.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Please let me know if this works.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein <
>>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7")
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> When I type:
>>>>>>>>>>>>>>>>>>>> $ export VERBOSE=1
>>>>>>>>>>>>>>>>>>>> $ make
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> ------------------
>>>>>>>>>>>>>>>>>>>> ...
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain*
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make
>>>>>>>>>>>>>>>>>>>> -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make
>>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> [ 57%] Building CXX object
>>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> 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
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> make[1]: ***
>>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> make: *** [all] Error 2
>>>>>>>>>>>>>>>>>>>> -------------------
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>>>> @rno
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi <
>>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so
>>>>>>>>>>>>>>>>>>>>> that you can see exactly what is being linked when the error occurs:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> export VERBOSE=1
>>>>>>>>>>>>>>>>>>>>> make
>>>>>>>>>>>>>>>>>>>>> ...
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein <
>>>>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt
>>>>>>>>>>>>>>>>>>>>>> ):
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object
>>>>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o
>>>>>>>>>>>>>>>>>>>>>> > 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.
>>>>>>>>>>>>>>>>>>>>>> > make[1]: ***
>>>>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2
>>>>>>>>>>>>>>>>>>>>>> > make: *** [all] Error 2
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are
>>>>>>>>>>>>>>>>>>>>>> no calls to Carbon APIs?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github:
>>>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>>>>>> @rno
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi <
>>>>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Hi Arno,
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> 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:
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7
>>>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> 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.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make
>>>>>>>>>>>>>>>>>>>>>>> sure that your code has no calls to Carbon APIs.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>  - David
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160108/990b6887/attachment.html>


More information about the vtkusers mailing list