How to install ROOT from source on OSX with gcc?
Basically I fail to choose gcc as linker
“configure” script proposes to chose compiler, but not linker.
As result:
Checking for source directory … /Installed/root-v5-34
Configuring for macosx64
Checking for Fink/MacPorts directory … /sw
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … gcc
Checking for C++ compiler … g++
Checking for linker (LD) … clang++
and obviously:
clang: error: linker command failed with exit code 1
to set compilers and a linker. For gcc, I’m not sure what linker to use.
I’m currently trying to compile Root 6.06.02 on OS X 10.12.3 using this configuration method, and I’m using GCC/G++/GFortran 4.9 (installed using Homebrew). I’ve used
–with-ld=/usr/bin/ld
in compiling but it throws me the following error:
ld: unknown option: -O2
and a bunch of other garbage at some point in the output.
Is this the right linker to use with gcc? If I don’t select it specifically, it defaults to clang++, as ikualakov has above.