[gate-users] Re: compiling on Mac OSX - which GUI and visualization options to choose in Geant4 install?

Manuel Bardiès manuelbardies at mac.com
Wed May 12 21:32:13 CEST 2004


Le 12 mai 04, à 20:28, Paul Vaska a écrit :
> So I realized that I need the _complete_ OSX Developers installation  
> to be able to use the g++3 command (which corresponds to gcc 3.1, not  
> the latest version 3.3).  With that change, I was just able to compile  
> Geant successfully _without_ any visualization features turned on  
> (which is the default Geant4 installation).
Yes but for Gate you should have some visualization tools.
Here are those I chose :
> On this machine the G4VIS_BUILD_DAWN_DRIVER=1
> On this machine the G4VIS_BUILD_OPENGLX_DRIVER=1
> On this machine the G4VIS_BUILD_VRML_DRIVER=1
You may - or may not have - installed the X11 SDK, which is an option  
when you install the dev tools.
If you have, then you'll get stuff in /usr/X11R6 (check my previous  
mail).

Then you'll need to perform a CLEAN install of Geant (again... but it's  
not that long on a dual G5 ;-)
Make sure you indicate /usr/X11R6 when asked for OGLHOME (default is  
/usr, but it's not good for your system).

You should be able to compile Geant with visualization options.
Try the NOVICE tests to make sure it works.

Then re-install Gate (again, clean install).
> warning: this program uses gets(), which is unsafe.
> Using granular libraries ...
> Linking Gate ...
> g++3: unrecognized option `-rdynamic'
This is OK, (should not harm...)
> ld: can't locate file for: -lG4OpenGL
This is probably because OGLHOME is not correctly set
> make: *** [bin/Darwin-g++/Gate] Error 1

Good luck,

Manuel

>
> It seems that it is looking for the G4OpenGL stuff after all, which  
> unfortunately doesn't seem to compile when selected in the Geant  
> install (errors are the same as below, although in a slightly  
> different format due to the different compiler gcc 3.1).
>
> Perhaps I am choosing the wrong GUI and visualization options in the  
> Geant installer.  Which GUI and visualization options should be  
> specified in the Geant installation?
>
> Paul
>
> Paul Vaska, Ph.D.
> Medical Department, Building 490
> Brookhaven National Laboratory
> Upton, NY 11973
> vaska at bnl.gov (631)344-6228 fax:(631)344-5311
> On May 12, 2004, at 10:22 AM, Paul Vaska wrote:
>
>> Hello,
>>
>> I'm trying to compile GATE on my spiffy new dual 2-GHz Macintosh G5  
>> running the latest OSX 10.3.3 and have run into compiler errors while  
>> making Geant 4.5.2.p02 apparently having to do with the G4OpenGL  
>> code.  I know this is a Geant problem, but since Mac is not  
>> officially supported by Geant and the Gate pages say this should  
>> work, I thought someone here might know best.  This error seems to  
>> prevent Gate from compiling successfully.
>>
>> I used all the defaults for the Geant installer (except for /sw for  
>> the clhep directories) and managed to eliminate some initial compiler  
>> errors.  The first was that g++3 is not recognized, so I changed it  
>> to just g++ in geant4.5.2.p02/con g/sys/Darwin-g++.gmk.  The second  
>> was that certain include files could not be found which were being  
>> sought in /usr/include/GL (I added a link to  
>> /sw/lib/root/cint/include/GL which seemed to have the necessary  
>> files).  But I don't know what to do about the remaining errors:
>>
>> Compiling G4OpenGLImmediateSceneHandler.cc ...
>> In file included from src/G4OpenGLImmediateSceneHandler.cc:42:
>> include/G4OpenGLSceneHandler.hh:105: error: parse error before `['  
>> token
>> include/G4OpenGLSceneHandler.hh:106: warning: ISO C++ forbids  
>> declaration of `
>>    GLubyte' with no type
>> include/G4OpenGLSceneHandler.hh:106: error: parse error before `['  
>> token
>> In file included from src/G4OpenGLImmediateSceneHandler.cc:44:
>> include/G4OpenGLTransform3D.hh:47: warning: ISO C++ forbids  
>> declaration of `
>>    GLdouble' with no type
>> include/G4OpenGLTransform3D.hh:47: error: parse error before `*' token
>> include/G4OpenGLTransform3D.hh:49: error: parse error before `[' token
>> src/G4OpenGLImmediateSceneHandler.cc: In member function `virtual void
>>    G4OpenGLImmediateSceneHandler::BeginPrimitives(const  
>> G4Transform3D&)':
>> src/G4OpenGLImmediateSceneHandler.cc:74: error: `glPushMatrix'  
>> undeclared
>>    (first use this function)
>> src/G4OpenGLImmediateSceneHandler.cc:74: error: (Each undeclared  
>> identifier is
>>    reported only once for each function it appears in.)
>> src/G4OpenGLImmediateSceneHandler.cc:87: error: `GetGLMatrix'  
>> undeclared (first
>>    use this function)
>> src/G4OpenGLImmediateSceneHandler.cc:87: error: `glMultMatrixd'  
>> undeclared
>>    (first use this function)
>> src/G4OpenGLImmediateSceneHandler.cc: In member function `virtual void
>>    G4OpenGLImmediateSceneHandler::EndPrimitives()':
>> src/G4OpenGLImmediateSceneHandler.cc:91: error: `glPopMatrix'  
>> undeclared (first
>>    use this function)
>> src/G4OpenGLImmediateSceneHandler.cc:93: error: `glFlush' undeclared  
>> (first use
>>    this function)
>> make[2]: ***  
>> [/Users/paulvaska/geant4.5.2.p02/tmp/Darwin-g++/G4OpenGL/ 
>> G4OpenGLImmediateSceneHandler.o] Error 1
>> make[1]: *** [granular] Error 2
>> make libmap
>>
>> and so on...
>>
>>
>>
>> As instructed, I have the developers package (gcc 3.3) and X11  
>> installed, and used finkcommander to install and compile clhep and  
>> root3 (installing binaries failed perhaps due to a proxy problem?).   
>> Also, I think have set  my environment variables properly:
>>
>> G4INSTALL=/Users/paulvaska/geant4.5.2.p02
>> GATEHOME=/Users/paulvaska/gate/gate_v1.0
>> G4SYSTEM=Darwin-g++
>> G4LIB=/Users/paulvaska/geant4.5.2.p02/lib
>> G4LEVELGAMMADATA=/Users/paulvaska/geant4.5.2.p02/data/ 
>> PhotonEvaporation
>> G4RADIOACTIVEDATA=/Users/paulvaska/geant4.5.2.p02/data/RadiativeDecay
>> G4LEDATA=/Users/paulvaska/geant4.5.2.p02/../G4EMLOW2.2
>> NeutronHPCrossSections=/Users/paulvaska/geant4.5.2.p02/../G4NDL3.7
>> CLHEP_BASE_DIR=/sw
>> CLHEP_INCLUDE_DIR=/sw/include
>> CLHEP_LIB_DIR=/sw/lib
>> CLHEP_LIB=CLHEP
>> G4VIS_BUILD_OPENGLX_DRIVER=1
>> G4VIS_USE_OPENGLX=1
>> OGLHOME=/usr
>> G4LIB_USE_GRANULAR=1
>> G4WORKDIR=/Users/paulvaska/geant4
>> G4VERSION=5.2
>> ROOTSYS=/root
>> DYLD_LIBRARY_PATH=/sw/lib/root
>> LD_LIBRARY_PATH=/sw/lib/root
>>
>> Any ideas from Mac users out there?
>>
>> Thanks for your help!
>>
>> Paul
>>
>>
> Paul Vaska, Ph.D.
> Medical Department, Building 490
> Brookhaven National Laboratory
> Upton, NY 11973
> vaska at bnl.gov (631)344-6228 fax:(631)344-5311
>>
>
> _______________________________________________
> gate-users mailing list
> gate-users at lphe1pet1.epfl.ch
> http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users
>
>
Manuel Bardiès
INSERM UMR 601
9 Quai Moncousu
44093 Nantes cedex
-----------------------------
Tel:   02 40 41 28 21
Fax:  02 40 35 66 97
Sec:  02 40 08 47 47




More information about the Gate-users mailing list