Root build MacBook M2 Sonoma 14.4

Hi!
I am facing some problems with installation of ROOT master version on my:
MacBook Air M2
Sonoma 14.4
Xcode 15.3
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0

I chose the master version as it was advised by experts in: ROOT 6.30.04 build failed on macOS 14.4 arm64 Xcode 15.3 - #19 by ferhue

However, after solving the problems listed in the above mentioned link, I am having this error:

[ 86%] Building CXX object geom/geom/CMakeFiles/Geom.dir/src/TGeoOpticalSurface.cxx.o
ld: archive member '/' not a mach-o file in '/Users/marias/Software/root_build/FREETYPE-prefix/src/FREETYPE/objs/.libs/libfreetype.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [graf2d/graf/CMakeFiles/Graf.dir/build.make:671: lib/libGraf.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:43022: graf2d/graf/CMakeFiles/Graf.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

I got root with:

git clone --depth=1 https://github.com/root-project/root.git root_src

I would appreciate your help! :slight_smile:

Hi,

I am sorry you are experiencing this issue.
How can we reproduce the problem?

Best,
Danilo

Did you completely erase the build directory folder contents before rebuilding? Try creating a new folder from scratch for the build-dir.

@ferhue, yes I did, removed everything, all the folders and started from the scratch - error is still there.

@Danilo I am not sure what you mean. I followed the instructions:

git clone --depth=1 https://github.com/root-project/root.git root_src
mkdir root_build root_install && cd root_build
cmake -Dbuiltin_glew=ON -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
cmake --build . -- install -j8

What other information I should provide? Thank you!

I confirm that I also observe the same issue with OSX 14.4 M1 and CLI 15.3. This happend before for Apple CLI upgrade.

My solution is to downgrade to CLI 15.1

Same problem with M3, OSX Sonoma 14.4.1, XCode 15.3. It is not viable that I roll back to 15.1, due to higher level management of my machine. Both master and latest-stable fail for same reason as above – xrootd build failure, it seems. I await the fix. Thx!

Here’s more detail, which perhaps implicates the recent arm64 fix for a similar issue:

tail -200 builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-.log
In file included from /Users/chur558/root_bld/builtins/xrootd/XROOTD-prefix/src/XROOTD/src/XrdSecsss/XrdSecsssKT.cc:41:
In file included from /Users/chur558/root_bld/builtins/xrootd/XROOTD-prefix/src/XROOTD/src/./XrdSecsss/XrdSecsssKT.hh:35:
/Users/chur558/root_bld/builtins/xrootd/XROOTD-prefix/src/XROOTD/src/./XrdSys/XrdSysPthread.hh:352:31: warning: unused parameter ‘ptype’ [-Wunused-parameter]
XrdSysRWLock(PrefType ptype)
^
/Users/chur558/root_bld/builtins/xrootd/XROOTD-prefix/src/XROOTD/src/./XrdSys/XrdSysPthread.hh:367:35: warning: unused parameter ‘ptype’ [-Wunused-parameter]
inline void ReInitialize(PrefType ptype)
^
2 warnings generated.
Undefined symbols for architecture arm64:
“_EVP_PKEY_CTX_set1_rsa_keygen_pubexp”, referenced from:
XrdCryptosslRSA::XrdCryptosslRSA(int, int) in XrdCryptosslRSA.cc.o
XrdCryptosslX509CreateProxy(char const
, char const*, XrdProxyOpt_t*, XrdCryptogsiX509Chain*, XrdCryptoRSA**, char const*) in XrdCryptosslgsiAux.cc.o
XrdCryptosslX509CreateProxyReq(XrdCryptoX509*, XrdCryptoX509Req**, XrdCryptoRSA**) in XrdCryptosslgsiAux.cc.o
“_EVP_PKEY_CTX_set_rsa_keygen_bits”, referenced from:
XrdCryptosslRSA::XrdCryptosslRSA(int, int) in XrdCryptosslRSA.cc.o
XrdCryptosslX509CreateProxy(char const*, char const*, XrdProxyOpt_t*, XrdCryptogsiX509Chain*, XrdCryptoRSA**, char const*) in XrdCryptosslgsiAux.cc.o
XrdCryptosslX509CreateProxyReq(XrdCryptoX509*, XrdCryptoX509Req**, XrdCryptoRSA**) in XrdCryptosslgsiAux.cc.o
“_EVP_PKEY_CTX_set_rsa_padding”, referenced from:
XrdCryptosslRSA::EncryptPrivate(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::EncryptPublic(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::DecryptPrivate(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::DecryptPublic(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
“_EVP_PKEY_dup”, referenced from:
XrdCryptosslX509SignProxyReq(XrdCryptoX509*, XrdCryptoRSA*, XrdCryptoX509Req*, XrdCryptoX509**) in XrdCryptosslgsiAux.cc.o
“_EVP_PKEY_eq”, referenced from:
_XrdCryptosslX509ParseFile in XrdCryptosslAux.cc.o
XrdCryptosslX509ParseBucket(XrdSutBucket*, XrdCryptoX509Chain*) in XrdCryptosslAux.cc.o
“_EVP_PKEY_get_bits”, referenced from:
XrdCryptosslX509::BitStrength() in XrdCryptosslX509.cc.o
XrdCryptosslX509CreateProxyReq(XrdCryptoX509*, XrdCryptoX509Req**, XrdCryptoRSA**) in XrdCryptosslgsiAux.cc.o
“_EVP_PKEY_get_bn_param”, referenced from:
XrdCryptosslRSA::XrdCryptosslRSA(XrdCryptosslRSA const&) in XrdCryptosslRSA.cc.o
“_EVP_PKEY_get_size”, referenced from:
XrdCryptosslRSA::XrdCryptosslRSA(int, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::GetOutlen(int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::GetOutlen(int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::EncryptPrivate(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::EncryptPublic(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::DecryptPrivate(char const*, int, char*, int) in XrdCryptosslRSA.cc.o
XrdCryptosslRSA::DecryptPublic(char const*, int, char*, int) in XrdCryptosslRSA.cc.o

“_SSL_get1_peer_certificate”, referenced from:
XrdTlsNotary::Validate(ssl_st const*, char const*, XrdNetAddrInfo*) in XrdTlsNotary.cc.o
XrdTlsSocket::Accept(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>*) in XrdTlsSocket.cc.o
XrdTlsSocket::getCerts(bool) in XrdTlsSocket.cc.o
“_X509_NAME_hash_ex”, referenced from:
XrdCryptosslX509::IssuerHash(int) in XrdCryptosslX509.cc.o
XrdCryptosslX509::SubjectHash(int) in XrdCryptosslX509.cc.o
XrdCryptosslX509Req::SubjectHash(int) in XrdCryptosslX509Req.cc.o
XrdCryptosslX509Crl::IssuerHash(int) in XrdCryptosslX509Crl.cc.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [src/libXrdUtils.3.0.0.dylib] Error 1
make[4]: *** [src/CMakeFiles/XrdUtils.dir/all] Error 2
make[3]: *** [all] Error 2

@Danilo just sending to your attention

Hi,

Welcome to the ROOT community! Thanks for the post (over here the past few days were a national holiday). I am sorry you are experiencing this issue, let’s have a look to this.

In our CI, we have macOS nodes we keep at the bleeding edge of OS and XCode versions, that are currently configured as follows:

% sw_vers
ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224
% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.3.0.0.1.1708646388

The 6.28, 6.30 and master branches build fine on those: there must be other differences between your and those systems (and the development platforms we use in the team, for what that counts). I am confident we can debug this together.

The warnings you see when building xrootd are real, this does not depend on ROOT (xrootd is a different package) but they should not be the cause of the missing symbols. What CMake version do you use?

Best,
Danilo

I just did:

cmake ../root "-DCMAKE_CXX_STANDARD=20" "-DLLVM_ENABLE_ASSERTIONS=on" "-Dalien=off" "-Dall=off" "-Darrow=off" "-Dasan=off" "-Dasimage=on" "-Dasserts=off" "-Dbuiltin_afterimage=on" "-Dbuiltin_cfitsio=on" "-Dbuiltin_clang=on" "-Dbuiltin_cling=on" "-Dbuiltin_cppzmq=on" "-Dbuiltin_davix=on" "-Dbuiltin_fftw3=on" "-Dbuiltin_freetype=on" "-Dbuiltin_ftgl=on" "-Dbuiltin_gl2ps=on" "-Dbuiltin_glew=on" "-Dbuiltin_gsl=on" "-Dbuiltin_gtest=on" "-Dbuiltin_llvm=on" "-Dbuiltin_lz4=on" "-Dbuiltin_lzma=on" "-Dbuiltin_nlohmannjson=on" "-Dbuiltin_openssl=on" "-Dbuiltin_openui5=on" "-Dbuiltin_pcre=on" "-Dbuiltin_tbb=on" "-Dbuiltin_unuran=on" "-Dbuiltin_vc=on" "-Dbuiltin_vdt=on" "-Dbuiltin_veccore=on" "-Dbuiltin_xrootd=on" "-Dbuiltin_xxhash=on" "-Dbuiltin_zeromq=on" "-Dbuiltin_zlib=off" "-Dbuiltin_zstd=on" "-Dccache=on" "-Dcefweb=off" "-Dclad=on" "-Dclingtest=off" "-Dcocoa=on" "-Dcoverage=off" "-Dcuda=off" "-Dcudnn=off" "-Dcxxmodules=off" "-Ddaos=off" "-Ddataframe=on" "-Ddavix=on" "-Ddcache=off" "-Ddev=off" "-Ddistcc=off" "-Dfail-on-missing=on" "-Dfcgi=off" "-Dfftw3=on" "-Dfitsio=on" "-Dfortran=off" "-Dgdml=on" "-Dgminimal=off" "-Dgnuinstall=off" "-Dgsl_shared=off" "-Dgviz=off" "-Dhttp=on" "-Dimt=on" "-Djemalloc=off" "-Dlibcxx=off" "-Dmacos_native=off" "-Dmathmore=on" "-Dmemory_termination=off" "-Dminimal=off" "-Dmonalisa=off" "-Dmpi=off" "-Dmysql=off" "-Dodbc=off" "-Dopengl=on" "-Dpgsql=off" "-Dpyroot=on" "-Dpythia6=off" "-Dpythia6_nolink=off" "-Dpythia8=off" "-Dqt5web=off" "-Dqt6web=off" "-Dr=off" "-Droofit=on" "-Droofit_multiprocess=off" "-Droot7=on" "-Drootbench=off" "-Droottest=on" "-Droottest_force_checkout=off" "-Drpath=on" "-Druntime_cxxmodules=on" "-Dshadowpw=off" "-Dshared=on" "-Dsoversion=off" "-Dspectrum=on" "-Dsqlite=on" "-Dssl=on" "-Dtcmalloc=off" "-Dtest_distrdf_dask=off" "-Dtest_distrdf_pyspark=off" "-Dtesting=on" "-Dtmva-cpu=on" "-Dtmva-gpu=off" "-Dtmva-pymva=on" "-Dtmva-rmva=off" "-Dtmva-sofie=off" "-Dtmva=on" "-Dunfold=on" "-Dunuran=on" "-During=off" "-Dvc=off" "-Dvdt=on" "-Dveccore=off" "-Dvecgeom=off" "-Dwebgui=on" "-Dwin_broken_tests=off" "-Dwinrtdebug=off" "-Dx11=off" "-Dxml=on" "-Dxproofd=off" "-Dxrootd=on"

On a M2 machine, with:

sftnight@macphsft33 ~ % sw_vers                                             
ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224

sftnight@macphsft33 ~ % pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.3.0.0.1.1708646388

And ROOT master installed without problem

Same problem, even with all of couet’s flags. (pulling out all tmva related ones)

(.venv) chur558@WE49820 root_bld % pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.3.0.0.1.1708646388
volume: /
location: /
install-time: 1711771136

(.venv) chur558@WE49820 root_bld % uname -a
Darwin WE49820 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64

(.venv) chur558@WE49820 root_bld % sw_vers
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224

(.venv) chur558@WE49820 root_bld % /usr/sbin/sysctl -a machdep.cpu
machdep.cpu.cores_per_package: 11
machdep.cpu.core_count: 11
machdep.cpu.logical_per_package: 11
machdep.cpu.thread_count: 11
machdep.cpu.brand_string: Apple M3 Pro

(.venv) chur558@WE49820 root_bld % ~/cmake-3.29.0/bin/cmake --version
cmake version 3.29.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).

Perhaps not a big insight, but if I turn -Dxrootd=off AND -Dbuiltin_xroot=off I have success building latest-stable. Just doing one or the other did not help. Certainly it’s possible this is a symptom of a problem on my end? I don’t remember ever installing xrootd before building ROOT in the past. Sorry for the noise,

Hi,

Thanks for the investigation. The version of CMake is recent enough (and then some).
Do you manage to build xrootd, without ROOT, just the standalone package?
So far, I was not able to reproduce the issue.

Best,
Danilo

I haven’t tried to build xrootd, as I don’t anticipate needing it on my laptop installation of ROOT. I’m happy with my current build. (This – xrootd – seems like a new dependence.)

Hi,

No, it’s not. It’s the package that makes the ROOT build fail on your system - I was trying to solve this for good and transform this to a report to the xrootd devs. However, glad to see you solved the issue for your case!

Thanks again.

Cheers,
Danilo

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