ROOT Version: 6.26/06
Platform: MacOS 13.2.1 (Ventura)
Compiler: XCode 14.2 (14C18)
Until recently I was running MacOS Monterey 12.6.3 with XCode 13.4.1. My root scripts were working. I recently upgraded the OS, XCode and XCode command line tools. I can compile and run simple c++ programs from the command line.
I tried to install root by downloading a tar file from the root web site. MacOS security blocked me from running because it was not properly signed by the developer. So I did a homebrew install. To use it I need to:
source /usr/local/Cellar/root/6.26.06_2/bin/thisroot.sh
I can view histogram/TTree files made previously.
The problem is that when I tried to run root code that compiles other code it fails. The stripped down example is two files:
hello.C
{
#include "hello.cc++"
hello();
}
hello.cc
#include <iostream>
void hello(){
std::cout << "Hi" << std::endl;
}
I tried to execute this with:
root -l hello.C
This works on other root installations but not on my recently upgraded machine. The error message is:
root [0]
Processing hello.C…
Info in TMacOSXSystem::ACLiC: creating shared library /Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing/hello_cc.so
clang: error: no such file or directory: ‘/usr/lib/libfakelink.dylib /usr/lib/libenergytrace.dylib /usr/lib/libz.1.dylib /usr/lib/libapple_nghttp2.dylib /usr/lib/libcompression.dylib /usr/lib/libnetwork.dylib /usr/lib/libsqlite3.dylib /usr/lib/libMobileGestalt.dylib /usr/lib/libcoretls.dylib /usr/lib/libcoretls_cfhelpers.dylib /usr/lib/libxar.1.dylib /usr/lib/libarchive.2.dylib /usr/lib/libxml2.2.dylib /usr/lib/swift/libswiftCore.dylib /usr/lib/swift/libswiftCoreFoundation.dylib /usr/lib/swift/libswiftDarwin.dylib /usr/lib/swift/libswiftDispatch.dylib /usr/lib/swift/libswiftIOKit.dylib /usr/lib/swift/libswiftObjectiveC.dylib /usr/lib/swift/libswiftXPC.dylib /usr/lib/swift/libswift_Concurrency.dylib /usr/lib/swift/libswift_StringProcessing.dylib /usr/lib/swift/libswiftos.dylib /usr/lib/libpcap.A.dylib /usr/lib/libdns_services.dylib /usr/lib/liblzma.5.dylib /usr/lib/libbz2.1.0.dylib /usr/lib/libiconv.2.dylib /usr/lib/libcharset.1.dylib /usr/lib/swift/libswift_RegexParser.dylib /usr/lib/libheimdal-asn1.dylib /usr/lib/libCheckFix.dylib /usr/lib/libmecab.dylib /usr/lib/libgermantok.dylib /usr/lib/libThaiTokenizer.dylib /usr/lib/libutil.dylib /usr/lib/libapp_launch_measurement.dylib /usr/lib/libmis.dylib /usr/lib/libxslt.1.dylib /usr/lib/libcmph.dylib /usr/lib/libTLE.dylib /usr/lib/libspindump.dylib /usr/lib/libate.dylib /usr/lib/libexpat.1.dylib /usr/lib/libAudioStatistics.dylib /usr/lib/libSMC.dylib /usr/lib/libperfcheck.dylib /usr/lib/libIOReport.dylib’
clang: error: no such file or directory: ‘/usr/lib/libncurses.5.4.dylib’
Error in : Executing ‘cd “/Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing” ; clang++ -fPIC -c -O3 -DNDEBUG -std=c++17 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -I/usr/local/Cellar/root/6.26.06_2/include/root -isysroot “/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/” -I"/usr/local/Cellar/root/6.26.06_2/etc/root" -I"/usr/local/Cellar/root/6.26.06_2/etc/root/cling" -I"/usr/local/Cellar/root/6.26.06_2/etc/root/cling/plugins/include" -I"/usr/local/Cellar/root/6.26.06_2/include/root" -I"/usr/local/Cellar/root/6.26.06_2/include" -D__ACLIC__ “/Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing/hello_cc_ACLiC_dict.cxx” ; clang++ -O3 -DNDEBUG “/Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing/hello_cc_ACLiC_dict.o” -dynamiclib -Wl,-headerpad_max_install_names -m64 -single_module -Wl,-dead_strip_dylibs -undefined dynamic_lookup “/usr/local/Cellar/zstd/1.5.4/lib/libzstd.1.dylib” “/usr/local/Cellar/zlib/1.2.13/lib/libz.1.dylib” “/usr/local/Cellar/lz4/1.9.4/lib/liblz4.1.dylib” “/usr/local/Cellar/xz/5.4.1/lib/liblzma.dylib” “/usr/local/Cellar/pcre/8.45/lib/libpcre.dylib” “/usr/local/Cellar/root/6.26.06_2/lib/root/libRint.so” “/usr/local/Cellar/root/6.26.06_2/lib/root/libCore.so” “/usr/local/Cellar/pcre/8.45/lib/libpcre.1.dylib” “/usr/local/Cellar/xz/5.4.1/lib/liblzma.5.dylib” “/usr/local/Cellar/lz4/1.9.4/lib/liblz4.1.9.4.dylib” “/usr/local/Cellar/zlib/1.2.13/lib/libz.1.2.13.dylib” “/usr/local/Cellar/zstd/1.5.4/lib/libzstd.1.5.4.dylib” “/usr/lib/libfakelink.dylib /usr/lib/libenergytrace.dylib /usr/lib/libz.1.dylib /usr/lib/libapple_nghttp2.dylib /usr/lib/libcompression.dylib /usr/lib/libnetwork.dylib /usr/lib/libsqlite3.dylib /usr/lib/libMobileGestalt.dylib /usr/lib/libcoretls.dylib /usr/lib/libcoretls_cfhelpers.dylib /usr/lib/libxar.1.dylib /usr/lib/libarchive.2.dylib /usr/lib/libxml2.2.dylib /usr/lib/swift/libswiftCore.dylib /usr/lib/swift/libswiftCoreFoundation.dylib /usr/lib/swift/libswiftDarwin.dylib /usr/lib/swift/libswiftDispatch.dylib /usr/lib/swift/libswiftIOKit.dylib /usr/lib/swift/libswiftObjectiveC.dylib /usr/lib/swift/libswiftXPC.dylib /usr/lib/swift/libswift_Concurrency.dylib /usr/lib/swift/libswift_StringProcessing.dylib /usr/lib/swift/libswiftos.dylib /usr/lib/libpcap.A.dylib /usr/lib/libdns_services.dylib /usr/lib/liblzma.5.dylib /usr/lib/libbz2.1.0.dylib /usr/lib/libiconv.2.dylib /usr/lib/libcharset.1.dylib /usr/lib/swift/libswift_RegexParser.dylib /usr/lib/libheimdal-asn1.dylib /usr/lib/libCheckFix.dylib /usr/lib/libmecab.dylib /usr/lib/libgermantok.dylib /usr/lib/libThaiTokenizer.dylib /usr/lib/libutil.dylib /usr/lib/libapp_launch_measurement.dylib /usr/lib/libmis.dylib /usr/lib/libxslt.1.dylib /usr/lib/libcmph.dylib /usr/lib/libTLE.dylib /usr/lib/libspindump.dylib /usr/lib/libate.dylib /usr/lib/libexpat.1.dylib /usr/lib/libAudioStatistics.dylib /usr/lib/libSMC.dylib /usr/lib/libperfcheck.dylib /usr/lib/libIOReport.dylib” “/usr/local/Cellar/root/6.26.06_2/lib/root/libRIO.so” “/usr/local/Cellar/root/6.26.06_2/lib/root/libThread.so” “/usr/local/Cellar/root/6.26.06_2/lib/root/libCling.so” “/usr/lib/libncurses.5.4.dylib” “/usr/local/Cellar/root/6.26.06_2/lib/root/libMathCore.so” “/usr/local/Cellar/root/6.26.06_2/lib/root/libImt.so” “/usr/local/Cellar/root/6.26.06_2/lib/root/libMultiProc.so” “/usr/local/Cellar/tbb/2021.8.0/lib/libtbb.12.8.dylib” “/usr/local/Cellar/root/6.26.06_2/lib/root/libNet.so” “/usr/local/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib” “/usr/local/Cellar/openssl@1.1/1.1.1t/lib/libcrypto.1.1.dylib” -o “/Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing/hello_cc.so”’ failed!
/Users/kutschke/Mu2e/GeometryViewer/GeometryBrowsing/./hello.C:3:10: fatal error: ‘hello.cc++’ file not found
#include “hello.cc++”
^~~~~~~~~~~~
root [1]
The only reference to ROOT in my environment is:
printenv | grep ROOT
ROOTSYS=/usr/local/Cellar/root/6.26.06_2
At first I wondered if any of the library path related variables need to be defined but then I remembered that MacOS has disabled DYLD_LIBRARY_PATH.
Any advice is appreciated.