Compile ROOT in Mac OS X 10.7 Lion

Has anyone successfully gotten ROOT to compile in Mac OS X Lion? I’ve installed Lion, and Xcode 4 to get make etc. on the command line, but with both ROOT 5.30 and 5.28 make install ends in an error
/Applications/root_5.28/cint/reflex/src/Class.cxx: In member function ‘virtual Reflex::Object Reflex::Class::CastObject(const Reflex::Type&, const Reflex::Object&) const’:
/Applications/root_5.28/cint/reflex/src/Class.cxx:98: error: ‘__dynamic_cast’ is not a member of ‘abi’
make: *** [cint/reflex/src/Class.o] Error 1

(Just make doesn’t put anything in bin or lib.) I’ve tried a few different options with ./configure, but haven’t got it to work. My old version compiled in Snow Leopard still works–but it’s not a long term solution.

Anyone know something sensible to try?

Thanks.

Hello NonNormalizable !

I run OSX Lion (11A2063) I just built root v5-30-00 with success using XCode 4.1.1 compilers (updated a few days ago…)
i686-apple-darwin11-llvm-gcc-4.2
i686-apple-darwin11-llvm-g+±4.2

Once I forget to install gfortran and put the PATH into the .profile

My configuration command for build was the usual :
./configure
–with-pythia6-uscore=SINGLE
–with-alien-incdir=$GSHELL_ROOT/include
–with-alien-libdir=$GSHELL_ROOT/lib
–with-monalisa-incdir="$GSHELL_ROOT/include"
–with-monalisa-libdir="$GSHELL_ROOT/lib"
–with-xrootd=$GSHELL_ROOT
–with-f77=gfortran
–enable-minuit2
–enable-roofit
–enable-soversion
–disable-bonjour

Im not sure it will help you… But it simply worked for me so …
Anyway it seems there is a lot of problems with this version of Apple’s Compiler…

Let me now if you manage to do it …!
Good Luck ! … B.

Hello all !

I had to delete my working root version (see up) and now if I retry to built it exactly as last time I get this error …

bin/rmkdepend -R -fnet/rpdutils/src/rpdconn.d -Y -w 1000 – -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -D__cplusplus – /opt/alice/root/v5-30-00/net/rpdutils/src/rpdconn.cxx
g++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -o net/rpdutils/src/rpdconn.o -c /opt/alice/root/v5-30-00/net/rpdutils/src/rpdconn.cxx
/opt/alice/root/v5-30-00/net/rpdutils/src/rpdconn.cxx: In member function ‘int rpdconn::senddesc(int)’:
/opt/alice/root/v5-30-00/net/rpdutils/src/rpdconn.cxx:398: error: size of array ‘buf’ is not an integral constant-expression
make: *** [net/rpdutils/src/rpdconn.o] Error 1

Does anyone has an idea ? Thanks =) B.

Hello all ! Simple error from me …

The v5-30 release doesn’t work and give this error but thanks to the Root team this has already been corrected in the patches branch which I probably used the first time…

Rpdutils
Import patch #40120 fixing a compilation issue on OSX Lion.

B.

I got similar errors to this one compiling on my 10.7 machine (and now that I think back on it, I think I got them the last time I tried compiling on 10.6 as well). Both the problem and solution are quite simple. Some time around the release of 10.6 Apple changed the compiler to default to 64-bit code rather than 32-bit. Simply change the argument you pass to the “configure” script from “macosx” to “macosx64.” If you just download the 32-bit binaries of root, you can run them just fine, but any time you try to compile something that links against root, you will get errors about different root libraries being the wrong architecture (at least that was my experience).