[vtkusers] SimpleCocoaVTK problems

Corrie lonewolfbiosci at verizon.net
Thu Nov 30 17:19:08 EST 2006


Please see my notes below.  It still appears that CMake doesn't want  
me to compile in GCC 4.0.  I'll let you know how the building goes.  
Corrie
On Nov 30, 2006, at 1:32 PM, Mike Jackson wrote:

> Corrie,
>    Lets start over. What we need to do is match the compilers for  
> both VTk and SimpleCocoa.
>
>  So..
>    Go into the directory where vtk was built. Blow everything away.
>    Go into the directory where SimpleCocoa was built. Blow it all  
> away.
>

Here goes:
> now from a terminal type:
> sudo gcc_select 4.0 -force


Default compiler has been set to:
gcc version 4.0.1 (Apple Computer, Inc. build 5367)

>
> This will make the system compiler be the latest 4.x from Apple.
>
Then I ran ccmake toward a completely empty build folder.
One of the messages that flashes by is something about checking for a  
working gcc compiler: 3.3. Huh?
After it's done checking, I edit the Carbon/Cocoa fields, the VTKdata  
path field, I toggle the advanced settings and find, among other things:

CMAKE_COLOR_MAKEFILE            *ON
CMAKE_CXX_COMPILER              */usr/bin/g++-3.3
CMAKE_CXX_FLAGS                 *
CMAKE_CXX_FLAGS_DEBUG           *-g
CMAKE_CXX_FLAGS_MINSIZEREL      *-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE         *-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO  *-O2 -g
CMAKE_C_COMPILER                */usr/bin/gcc-3.3
CMAKE_C_FLAGS

For laughs, I edit the two compiler settings to be 4.0, as seen below

CMAKE_CXX_COMPILER              */usr/bin/g++-4.0
CMAKE_CXX_FLAGS                 *
CMAKE_CXX_FLAGS_DEBUG           *-g
CMAKE_CXX_FLAGS_MINSIZEREL      *-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE         *-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO  *-O2 -g
CMAKE_C_COMPILER                */usr/bin/gcc-4.0

Then tell it to configure (c)

Then, when I take a peek at those compiler setting again, they're  
baaack:
CMAKE_CXX_COMPILER               /usr/bin/g++-3.3
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG            -g
CMAKE_CXX_FLAGS_MINSIZEREL       -Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE          -O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO   -O2 -g
CMAKE_C_COMPILER                 /usr/bin/gcc-3.3

Now it's off to the build.  How does one tell which version of GCC  
really was used for a compile?


> Now Rebuild VTK
> Now Rebuild Simplecocoa.
>
> Then let's see what happens after that.
>
> Mike Jackson
>
>
> -----Original Message-----
> From:	vtkusers-bounces+mike.jackson=imts.us at vtk.org on behalf of  
> Corrie
> Sent:	Thu 11/30/2006 3:48 PM
> To:	Sean McBride
> Cc:	vtkusers at vtk.org
> Subject:	Re: [vtkusers] SimpleCocoaVTK problems
>
> Now I'm really confused.  I've tried to edit the CMAKE_CXX_COMPILER
> and CMAKE_C_COMPILER's in cmakecache.txt to g++-4.0 and gcc-4.0,
> respectively.  Then, after I save the file and cmake it a couple of
> times, it (cmakecache.txt) has reverted to having 3.3's in those
> fields.  Any idea why CMake can't get this to change?   I even tried
> putting "powerpc-apple-darwin8-gcc-4.0.1" in there and it still
> reverted back to gcc-3.3 in the cmakecache.txt file.   All this
> despite the fact when I ask gcc -v, I get "gcc version 4.0.1 (Apple
> Computer, Inc. build 5367)" in response.   How can I exorcise this
> ghost in the machine?
>
> Corrie
>
> On Nov 30, 2006, at 11:14 AM, Sean McBride wrote:
>
>> On 2006-11-30 12:45, Corrie Allen, Ph.D. said:
>>
>>> Oddly enough, the reason I am using GCC-3.3 is that when I try to
>>> configure the VTK build with CCmake, it refuses to change from
>>> using GCC
>>> 3.3 to GCC 4.
>>
>> If you do 'sudo gcc_select 4.0' then gcc 4 will be your default
>> compiler
>> and CMake should use it.  I do strongly recommend 4.0 over 3.3.
>> For one
>> thing, you can't build Universal Binaries (or any Intel code) with
>> 3.3.
>>
>>> VTK was built as PPC.  I tried both Debug and release
>>> builds -> same problem.
>>
>> It occurs to me now that the Release config of SimpleCocoaVTK will  
>> not
>> link if you did not build VTK as Universal.  The debug config of
>> SimpleCocoaVTK is not Universal so would be OK.  But this isn't
>> your problem.
>>
>>> VTK was rebuilt several times just as described
>>> in the wiki except that I used Ccmake to edit cmakecache.txt
>>> rather than
>>> directly editing.
>>
>> I've just updated the wiki, you might want to take a look.
>>
>> Give it a try with gcc 4 again, I think it will work better that way.
>>
>> --
>> ____________________________________________________________
>> Sean McBride, B. Eng                 sean at rogue-research.com
>> Rogue Research                        www.rogue-research.com
>> Mac Software Developer              Montréal, Québec, Canada
>>
>>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/ 
> Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>




More information about the vtkusers mailing list