[vtkusers] SimpleCocoaVTK problems
Corrie
lonewolfbiosci at verizon.net
Fri Dec 1 03:42:59 EST 2006
SimpleCocoaVTK is working now on my little G3. Thanks to all who
helped, especially Mike and Sean. The crux of the problem was the
setting of gcc and g++ to 3.3 in environmental variables in csh.login
in /etc. (Misposted earlier that csh.login was in /local/bin - tired
fingers). That must have been done years ago when GCC 3.3 was the
rage, the iMac was new, and the hard setting didn't make a
difference. Once I got everything compiled under GCC 4.0, everything
slipped into place. Thanks again.
Corrie
.
On Nov 30, 2006, at 4:38 PM, Mike Jackson wrote:
> I think that there is something wrong with your Xcode/gcc install
> OR there is an environment variable set that you are unaware of:
>
> to check the second part from a brand new terminal:
> echo $CC
> echo $CXX
>
> If they come back with ANYTHING.. then that might be part of the
> problem.
>
> Using gcc_select and then cmake on a clean build tree should have
> solved the problem. I am lost at this point as to what the problem is.
>
> Also, try creating a brand new user account and log into that and
> try all this over again. Does Gcc 3.3 stick around?
>
> Also, in ccmake under the advanced options, there is an option to
> turn on verbose make files. Turn that on and look at the compile
> lines. They will be very long so start the compile then kill it and
> take a look. I think that the absolute path to the compiler will be
> listed..
>
>
> other than those ideas, I am coming up empty.. Unless GCC 4.0 will
> NOT run on a G3 machine.. which I don't think is the case...
>
> --
> Mike Jackson Senior Research Engineer
> Innovative Management & Technology Services
>
>
> On Nov 30, 2006, at 5:19 PM, Corrie wrote:
>
>> 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