Building ROOT on macOS Catalina (10.15.3)

Dear ROOTers,

I’m trying to build ROOT from source on the latest version of macOS, but I’m running into some issues (I see that there are a few posts on this topic, but the reported errors appear different and their solutions don’t seem to work for me).

I’ve tried ROOT version 6.18.04 as well as the master branch on GitHub – in both cases the build with cmake fails after a certain point, with this error message:

[ 56%] Built target G__Net
[ 56%] Linking CXX shared library …/…/lib/libNet.so
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64

The binary provided by Axel @ (Root catalina bug report - #3 by Axel) does work – however it would be great to be able to build things from source, for linking external libraries, Python3 etc.

ROOT Version: 6.19 (GitHub master, hash is 63f5742)
Platform: macOS Catalina (10.15.3)
Compiler: Apple clang version 11.0.0


I am not sure if disabling SIP will help here. Did you try to build with disabled SIP (System Integrity Protection)? @Axel do you know if it will help?

Oksana.

Please don’t disable SIP.

I don’t know why the build fails. Can you post the complete output of make VERBOSE=1?

Cheers, Axel

Hi Oksana & Axel,

Thanks for the quick responses! I’ve attached the full output of make VERBOSE=1 in a plaintext file.
root_make_error.txt (270.0 KB)

I encountered a similar problem. In my case, the error is:

ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/local/Cellar/mysql/5.7.20/lib/libcrypto.dylib for architecture x86_64

The solution is

cd /usr/local/Cellar/mysql/5.7.20/lib/
rm libcrypto.dylib ; ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.dylib
rm libssl.dylib ; ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libssl.dylib

The idea is to use the libcrypoto.dylib installed from brew install openssl instead of that from system.

Best regards
Xiangyang

Dear Xiangyang,

Thanks for the reply!

Unfortunately in my case, it seems like the issue is coming from /usr/lib/libcrypto.dylib, which is a system file that I cannot delete.

Was this ever resolved? Trying to build git tag -v6-220-02 from source fails on mac os with the same error:

[I] src/XrdVersion.hh successfully generated

ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[5]: *** [src/libXrdHttpUtils.1.0.0.dylib] Error 1

make[4]: *** [src/CMakeFiles/XrdHttpUtils.dir/all] Error 2

make[3]: *** [all] Error 2

Cheers,

Mark

well building with xrootd off resolves this for me (and I don’t believe I need that on my MacBook).

Cheers,

Mark

I’ve opened https://github.com/xrootd/xrootd/issues/1302

Did this ever get sorted out? I’ve been trying to compile root_v6-22-00 from source on my iMac 10.15.7 via GitHub, and am running into the same dylib problem. I’ve turned off xrootd and I’ve also tried other versions of root (6-20-04 and 6-22-06) but to no avail.

Hi @dhorns,
At least on my end, I think that turning off xrootd for the build (as Mark did) solved the problem – this installation wasn’t being done on my own machine and I run an earlier OS, so unfortunately I don’t have the environment readily available for reference. It’s unfortunate that this didn’t work for you – I was going to suggest looking at Axel’s Github issue post above, but this also involves the build of xrootd. Perhaps it wouldn’t hurt to ping him and provide some more info on the issue you’re running into?
Sorry to not be of more help.

Thanks @jaofferm. I’m really at a loss as to why this is happening and I’m surprised it isn’t more prevalent, but I’ll probably upgrade to to OS11 soon anyway. The pre-compiled code works, but for some strange reason I prefer to use code I’ve compiled myself.

Update: I’m running OS11.1 and with the newly updated Xcode 12.4 and ROOT v6-23-01, everything compiles and runs without ANY problems.

1 Like