Error compiling ROOT 5 on Mac OS X Yosemite

Hi,

I tried installing the latest patched version of ROOT 5.34 (after 5.34.22) after installing or updating all the prereqs of X11, Xcode command line tools, etc. in Mac OS X Yosemite with the following:

git clone -b v5-34-00-patches http://root.cern.ch/git/root.git root-v5-34
cd root-v5-34
./configure macosx64 --enable-gsl-shared --enable-roofit --enable-minuit2 
make -j 4

The configure command returns:

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, libcxx, cintex, cocoa, explicitlink, fink, fftw3, gviz, genvector, gsl_shared, krb5, ldap, mathmore, memstat, minuit2, opengl, python, reflex, roofit, rpath, shared, sqlite, ssl, tmva, vdt, xml.

and I get the following compilation error message after it compiles for a while:

ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 exit status
make: *** [bin/g2root] Error 1
make: *** Waiting for unfinished jobs....

Does anyone know the cause of this error?

Thanks,

Javier

When going to Yosemite I had to:

  1. re-install Xquartz
  2. take the latest Xcode and do xcode-select --install

I was able to get it working by

  1. re-installing Xquartz
  2. installing the latest Xcode and do xcode-select --install
  3. updating my macports prereqs by doing:
    sudo port selfupdate
    sudo port upgrade outdated

then my ROOT install worked.

Thanks for your help!

Javier

Hi,
I followed the instructions that where reported as working in this topic

  1. re-installing Xquartz
  2. installing the latest Xcode and do xcode-select --install
  3. updating my macports prereqs by doing:
    sudo port selfupdate
    sudo port upgrade outdated
  4. git clone -b v5-34-00-patches root.cern.ch/git/root.git root-v5-34
  5. cd root-v5-34
  6. ./configure
  7. make

but I get the following error:

clang: error: no such file or directory: 'misc/minicern/src/hbook.o’
clang: error: no such file or directory: 'misc/minicern/src/kernlib.o’
clang: error: no such file or directory: 'misc/minicern/src/zebra.o’
make: *** [lib/libminicern.so] Error 1

if I look into the misc/minicern/src/ folder, I see the following:
cernlib.c cernlib.d cernlib.o hbook.f kernlib.f zebra.f
so, it looks like it failed compiling the fortran stuff in there.
In the logs, I see
gfortran -O2 -m64 -std=legacy -o misc/minicern/src/hbook.o -c /Users/fabrizio/Downloads/root-v5-34/misc/minicern/src/hbook.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
gfortran -O2 -m64 -std=legacy -o misc/minicern/src/kernlib.o -c /Users/fabrizio/Downloads/root-v5-34/misc/minicern/src/kernlib.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
gfortran -O2 -m64 -std=legacy -o misc/minicern/src/zebra.o -c /Users/fabrizio/Downloads/root-v5-34/misc/minicern/src/zebra.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
but no errors or warnings…

Thanks for any help!

That’s weird, in my case I have:

imaccouet:root534-bin couet$ ls misc/minicern/src
cernlib.d	cernlib.o	hbook.o		kernlib.o	zebra.o

if I force the rebuild I get:

imaccouet:root534-bin couet$ rm misc/minicern/src/*.o
imaccouet:root534-bin couet$ rm misc/minicern/src/*.d
imaccouet:root534-bin couet$ make
bin/rmkdepend -R -fmisc/minicern/src/cernlib.d -Y -w 1000 -- -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude     -pthread -- /Users/couet/git/root534/misc/minicern/src/cernlib.c
clang -g -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common -Iinclude     -pthread -o misc/minicern/src/cernlib.o -c /Users/couet/git/root534/misc/minicern/src/cernlib.c
gfortran -g -m64 -std=legacy -o misc/minicern/src/hbook.o -c /Users/couet/git/root534/misc/minicern/src/hbook.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
gfortran -g -m64 -std=legacy -o misc/minicern/src/kernlib.o -c /Users/couet/git/root534/misc/minicern/src/kernlib.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
gfortran -g -m64 -std=legacy -o misc/minicern/src/zebra.o -c /Users/couet/git/root534/misc/minicern/src/zebra.f 2>&1 | sed -e s/arning:/arn-Ignore:/ >&2
clang++ -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name @rpath/libminicern.so -g -m64 -mmacosx-version-min=10.10 -stdlib=libc++ -o lib/libminicern.so misc/minicern/src/cernlib.o -ldl misc/minicern/src/hbook.o misc/minicern/src/kernlib.o misc/minicern/src/zebra.o /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../../x86_64/libgfortran.dylib /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../../x86_64/libgfortran.a /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64/libgfortranbegin.a
==> lib/libminicern.so done
Rsync'ing /Users/couet/git/root534/etc...
Rsync'ing /Users/couet/git/root534/macros...
Rsync'ing /Users/couet/git/root534/icons...
Rsync'ing /Users/couet/git/root534/fonts...
Rsync'ing /Users/couet/git/root534/README...
Rsync'ing /Users/couet/git/root534/tutorials...
Rsync'ing /Users/couet/git/root534/test...
Rsync'ing /Users/couet/git/root534/man...
Rsync'ing /Users/couet/git/root534/geom/gdml/*.py...
Rsync'ing /Users/couet/git/root534/tmva/test/*.C, *.gif, *.png...
 
   ============================================================
   ===                ROOT BUILD SUCCESSFUL.                ===
   === Run 'source bin/thisroot.[c]sh' before starting ROOT ===
   ============================================================
imaccouet:root534-bin couet$ 

Can you try ?

Thanks for you reply.
I tried but I get exactly the same error.
I do not get the .o files created for the fortran file.
I tried to remove the “2>&1 | sed -e s/arning:/arn-Ignore:/ >&2” part of the command and see that:

root-v5-34 fabrizio$ gfortran -g -m64 -std=legacy -o misc/minicern/src/hbook.o -c /Users/fabrizio/Downloads/root-v5-34/misc/minicern/src/hbook.f
Segmentation fault: 11

If I look to you output, I see that you are using i686-apple-darwin8/4.2.3 while I have i686-apple-darwin8.8.1/3.4.0.
This make me think I have to update something or to make a different configuration.
Can you tell me how you configured the installation? I just made “./configure”

Thanks, Fabrizio

it looks like your gfortran does not work properly … may be yes, you need to update somehow. can you execute “make” with the option “-k” to see how far it will go ?

I reinstalled gfortran and the problem was fixed.
Thanks for your support!