- MacOSX issues
ROOT on MacOSX Mavericks (10.9)
ROOT with CLANG (MacOSX default)
A few years ago it required somewhat tough work to install ROOT on MacOSX. However, by the developers' efforts, now we can install ROOT on MacOSX with a few commands like
./configure --all --prefix=/usr/local --enable-builtin-freetype make sudo make install
ROOT with GCC (installed with Homebrew)
However, if you want to combine ROOT with C++ and FORTRAN, you will want to compile ROOT with GCC.
Procedure to install GCC on OSX is now established; you should use Homebrew. You can install GCC 4.9 together with GFORTRAN by just typing brew install --enable-fortran gcc49. Very cool.
Yes, Homebrew is really cool. Most of the friend of mine working at IT companies use HomeBrew. Not MacPorts. Follow the professionals!
Now the time to install ROOT. For my case with Mavericks + "brewed" GCC4.9+GFORTRAN, I made it done by
./configure macosx64 --all --enable-builtin-freetype \ --with-cc=gcc --with-cxx=g++ --with-f77=gfortran --with-ld=g++ \ --disable-cocoa --disable-vc make sudo make install
Note that I chose macosx64 since my MacBookPro is with 64bit CPU.
Unfortunately vc and cocoa cannot be enabled perhaps because they severely depend on architecture. Anyway I made it done.
Also, in ROOT 6 you might encounter an error in compiling
TBonjourResolver.o, in which case you should add --disable-bonjour to the configure options.
libpng problem (ROOT v5.34.21 with homebrew-libpng)
See https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=17490#p77114 if you have a trouble with
Warning in <TASImage::GetMask>: No image libpng warning: Application built with libpng-1.5.18 but running with 1.6.13
In my case with ROOT v5.34.21,
./configure macosx64 --all --enable-builtin-freetype \ --with-cc=gcc --with-cxx=g++ --with-f77=gfortran --with-ld=g++ \ --disable-cocoa --disable-vc make cd graf2d/asimage/src/libAfterImage ./configure --with-ttf \ --with-ttf-includes="-I../../../../graf2d/freetype/src/freetype-2.3.12/include -I../../../../graf2d/freetype/src/freetype-2.3.12/include/freetype" \ --with-afterbase=no --without-svg --disable-glx --with-builtin-ungif --with-jpeg \ --with-jpeg-includes=/usr/local/include \ --with-png --with-png-includes=/usr/local/include \ --with-tiff-includes=/usr/local/include --with-builtin-png=yes make cd - make sudo make install
(Or I maybe should have added --with-builtin-png=yes in the first configure.)