[gate-users] compiling on Mac OSX

Manuel Bardiès manuelbardies at mac.com
Wed May 12 17:02:35 CEST 2004


Hi Paul,

> OGLHOME=/usr
Shouldn't OGLHOME be set to /usr/X11R6?
I think this causes your problem...
Make sure that the X11 SDK is installed, not just the X11 app. You  
should have stuff in /usr/X11R6
> [4:56pm manu /sw/lib]% cd /usr/X11R6/
> [DING! manu /usr/X11R6]% l
> total 16
> -r--r--r--    1 root  wheel  1498 15 Sep  2003 ACKNOWLEDGEMENTS
> -r--r--r--    1 root  wheel  3589 15 Sep  2003 README
> drwxr-xr-x  139 root  wheel  4726  4 May 18:00 bin
> drwxr-xr-x    8 root  wheel   272  5 Jan 12:49 include
> drwxr-xr-x  139 root  wheel  4726  4 May 17:59 lib
> drwxr-xr-x    6 root  wheel   204  8 May 04:33 man

For info:
These are the settings on my TiBook (slightly different from what is  
indicated in the install guide, but both settings should work...).
> [4:46pm manu ~/projets/geant/geant4.5.2.p02]% source env.csh
> On this machine the G4SYSTEM=Darwin-g++
> On this machine the G4INSTALL=/Users/manu/projets/geant/geant4.5.2.p02
> On this machine the  
> G4INCLUDE=/Users/manu/projets/geant/geant4.5.2.p02/include
> On this machine the G4LIB=/Users/manu/projets/geant/geant4.5.2.p02/lib
> On this machine the  
> G4LEVELGAMMADATA=/Users/manu/projets/geant/geant4.5.2.p02/data/ 
> PhotonEvaporation
> On this machine the  
> G4RADIOACTIVEDATA=/Users/manu/projets/geant/geant4.5.2.p02/data/ 
> RadiativeDecay
> On this machine the  
> G4LEDATA=/Users/manu/projets/geant/geant4.5.2.p02/data/G4EMLOW2.2
> On this machine the  
> NeutronHPCrossSections=/Users/manu/projets/geant/geant4.5.2.p02/data/ 
> G4NDL3.7
> On this machine the CLHEP_BASE_DIR=/sw
> On this machine the CLHEP_INCLUDE_DIR=/sw/include
> On this machine the CLHEP_LIB_DIR=/sw/lib
> On this machine the CLHEP_LIB=CLHEP
> 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
> On this machine the G4VIS_USE_DAWN=1
> On this machine the G4VIS_USE_OPENGLX=1
> On this machine the G4VIS_USE_VRML=1
> On this machine the OGLHOME=/usr/X11R6
> On this machine the G4LIB_USE_GRANULAR=1
> In your environment you have the  
> G4WORKDIR=/Users/manu/projets/geant/geant4.5.2.p02
> [4:46pm manu ~/projets/geant/geant4.5.2.p02]%

Also, I see a difference in the Root settings:
these are my settings:
> ROOTSYS=/Users/manu/projets/root
> DYLD_LIBRARY_PATH=/Users/manu/projets/root/lib
> LD_LIBRARY_PATH=/Users/manu/projets/root/lib
This means that although I installed root via Fink, I created an alias  
of root/lib and root/include in a given place.
I see your ROOTSYS variable is set to /root, whereas DYLD_LIBRARY_PATH  
and LD_LIBRARY_PATH are set to /sw/lib/root, which looks strange to  
me...

Let me know if that helps. I may have to change the install guide if  
things are unclear...
Best regards,

Manu

Le 12 mai 04, à 16:22, Paul Vaska a écrit :

> 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 BARDIES
INSERM U 601
9 Quai Moncousu
44093 Nantes
France
-----------------------------
Tel:   (33) 2 40 41 28 21
Fax:  (33) 2 40 35 66 97
Sec:  (33) 2 40 08 47 47




More information about the Gate-users mailing list