Root 6.16 build failed on Mac os X 10.14

_ROOT Version:6.16

file was built for archive which is not the architecture being linked

the problem is the same @

but the old topic is closed, so I open a new one

Can you please post more information about how you are trying to build ROOT? Are you using XCode? Do you have Homebrew, are you mixing system libraries with Homebrew/MacPorts, etc? What is the command line that you passed to CMake? Do the binaries not work for you? Can you use brew install root to get ROOT installed?

Hi, Amadio:

Thank you for you reply.

I build ROOT on Mac using CMAKE

cmake -DCMAKE_INSTALL_PREFIX=${HOME}/software/ROOT/install/ …/root-6.16. 00
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python@2/2.7.15_2/Frameworks/ Python.framework/Versions/Current/include/python2.7/
-DPYTHON_LIBRARY=/usr/local/Cellar/python@2/2.7.15_2/Frameworks/Python. framework/Versions/Current/lib/libpython2.7.dylib

Yes I’m using Xcode? I have tried GCC but it make more problem than that
Yes I’m using Homebrew without macports

the home-brew version of ROOT don’t support <TFits.h> because it turn off the fits plugin. So I don’t use it.

You cannot mix Homebrew with system software to compile ROOT, since the libraries ABIs are not compatible. That’s why you see linking problems when building ROOT. You could try with -DCMAKE_PREFIX_PATH=/usr/local and pick all ROOT dependencies from Homebrew, including openssl and davix, but I bet the compilation will just fail at some other point if you don’t compile in a way that’s compatible with Homebrew. In particular, you should never mix Python from Homebrew with software compiled out of Homebrew. That is very likely going to create problems due to incompatible ABIs. Note that this is not a problem with ROOT, but with trying to link incompatible libraries (compiled with different compilers/options) into a single binary.

It work fine with ROOT version 6.14.04 and before.
when I try V6.16.00 still has the problem.
I’ve tried CMAKE_PREFIX_PATH=/usr/local. same problem.

should I modify env below? to use home-brew gcc?
CMAKE_LIBTOOL /Applications/…
LD64_EXECUTABLE /Applications/…
CMAKE_NM /Applications/…
CMAKE_OBJDUMP /Applications/…
CMAKE_RANLIB /Applications/…

Did you disable builtin_openssl and builtin_davix? Above I mentioned that you should pick dependencies from Homebrew, including openssl and davix.

I cannot set builtin_openssl by -Dbuiltin_openssl=OFF or ccmake.

it display “Recording the git revision now”, and automatically open builtin_openssl, I’m still trying how to solve this problem

Make sure that you have openssl library and headers in /usr/local. ROOT is enabling the builtin because it cannot find the external one.

openssl is keg-only, which means it was not symlinked into /usr/local,
my openssl(home-brew) is in /usr/local/opt/openssl

and I add below in my environment
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
still not working.

I del ssl plugin by -Dssl=ON ,and pass ssl errors,
and then the freetype plugin show the same errors as it

builtin_freetype: Enabled because needed for Cocoa graphics

ld: warning: ignoring file …/…/FREETYPE-prefix/src/FREETYPE/objs/.libs/libfreetype.a, file was built for archive which is not the architecture being linked (x86_64)

should I build freetype as a shared library?
may be the openssl meets the same problem.

Your problems arise because you are trying to combine things compiled with different (and incompatible) compilers. I recommend to not use Homebrew at all for compiling ROOT. Use only the system software and you should be ok (even with the builtin openssl, etc). I think you can enable macos_native option to ignore Homebrew.

There is another problem if you installed Homebrew binutils.
ar and ranlib in Homebrew binutils are not compatible with Apple LLVM.
You can try to remove /usr/local/opt/binutils/bin from your PATH.

thanks a lot for pointing that out @ betterwang @ amadio ,after several test,it’s the problem of my libtool, I reinstall libtool, and problem solved.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.