Failing to build root on OS X 10.12

Trying to follow instructions on root.cern.ch/building-root the installation fail due to library inconsistencies. Does anyone know the remedy?


ld: warning: ignoring file /sw/lib/libfftw3.dylib, file was built for i386 which is not the architecture being linked (x86_64): /sw/lib/libfftw3.dylib
Undefined symbols for architecture x86_64:
"_fftw_destroy_plan", referenced from:
TFFTComplex::~TFFTComplex() in TFFTComplex.cxx.o
TFFTComplex::Init(char const*, int, int const*) in TFFTComplex.cxx.o
TFFTComplexReal::~TFFTComplexReal() in TFFTComplexReal.cxx.o
TFFTComplexReal::Init(char const*, int, int const*) in TFFTComplexReal.cxx.o
TFFTReal::~TFFTReal() in TFFTReal.cxx.o
TFFTReal::Init(char const*, int, int const*) in TFFTReal.cxx.o
TFFTRealComplex::~TFFTRealComplex() in TFFTRealComplex.cxx.o

"_fftw_execute", referenced from:
TFFTComplex::Transform() in TFFTComplex.cxx.o
TFFTComplexReal::Transform() in TFFTComplexReal.cxx.o
TFFTReal::Transform() in TFFTReal.cxx.o
TFFTRealComplex::Transform() in TFFTRealComplex.cxx.o
"_fftw_free", referenced from:
TFFTComplex::~TFFTComplex() in TFFTComplex.cxx.o
TFFTComplexReal::~TFFTComplexReal() in TFFTComplexReal.cxx.o
TFFTReal::~TFFTReal() in TFFTReal.cxx.o
TFFTRealComplex::~TFFTRealComplex() in TFFTRealComplex.cxx.o
"_fftw_malloc", referenced from:
TFFTComplex::TFFTComplex(int, bool) in TFFTComplex.cxx.o
TFFTComplex::TFFTComplex(int, int*, bool) in TFFTComplex.cxx.o
TFFTComplexReal::TFFTComplexReal(int, bool) in TFFTComplexReal.cxx.o
TFFTComplexReal::TFFTComplexReal(int, int*, bool) in TFFTComplexReal.cxx.o
TFFTReal::TFFTReal(int, bool) in TFFTReal.cxx.o
TFFTReal::TFFTReal(int, int*, bool) in TFFTReal.cxx.o
TFFTReal::Init(char const*, int, int const*) in TFFTReal.cxx.o

"_fftw_plan_dft", referenced from:
TFFTComplex::Init(char const*, int, int const*) in TFFTComplex.cxx.o
"_fftw_plan_dft_c2r", referenced from:
TFFTComplexReal::Init(char const*, int, int const*) in TFFTComplexReal.cxx.o
"_fftw_plan_dft_r2c", referenced from:
TFFTRealComplex::Init(char const*, int, int const*) in TFFTRealComplex.cxx.o
"_fftw_plan_r2r", referenced from:
TFFTReal::Init(char const*, int, int const*) in TFFTReal.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libFFTW.so] Error 1
make[1]: *** [math/fftw/CMakeFiles/FFTW.dir/all] Error 2
make: *** [all] Error 2

I guess you need to re-install your FFTW library. Or use the option -Dbuiltin_fftw3=ON if you have a recent version of ROOT.

Thank you. Works fine!

Sten