Installation issue with MacOS

ROOT Version: 6.36.10
Platform: MacOS Tahoe 26.3
Compiler: Apple clang version 17.0.0


Hello,

I just installed ROOT on my new MacBook using a pre-compiled binary (the one marked as “latest stable”). I tried running a very simple C++ code:

#include <iostream>

#include "TApplication.h"
#include "TCanvas.h"
#include "TF1.h"

int main()
{
    TApplication *app = new TApplication("app", 0, 0);
    TCanvas *c = new TCanvas("c", "plot", 400, 300);
    TF1 *f = new TF1("f", "sin(x)", -5, 5);

    f -> Draw();
    c -> SaveAs("test.png");
    app -> Run();

    return 0;
}

and I get the following error:

cling::DynamicLibraryManager::loadLibrary(): dlopen(/opt/root/lib/libASImage.so, 0x0009): Library not loaded: /opt/local/lib/libgif.4.dylib
  Referenced from: <FF6D4CF6-C728-34CF-9BC0-C7B5AEBA785D> /opt/root/lib/libASImage.so
  Reason: tried: '/opt/root/lib/libgif.4.dylib' (no such file), '/opt/local/lib/libgif.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libgif.4.dylib' (no such file), '/opt/local/lib/libgif.4.dylib' (no such file)
cling::DynamicLibraryManager::loadLibrary(): dlopen(/opt/root/lib/libASImage.so, 0x0009): Library not loaded: /opt/local/lib/libgif.4.dylib
  Referenced from: <FF6D4CF6-C728-34CF-9BC0-C7B5AEBA785D> /opt/root/lib/libASImage.so
  Reason: tried: '/opt/root/lib/libgif.4.dylib' (no such file), '/opt/local/lib/libgif.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libgif.4.dylib' (no such file), '/opt/local/lib/libgif.4.dylib' (no such file)

Seems that the ROOT version I installed needs the old libgif.4, which is probably too old to run on my MacBook. Is it possible or did I just download the wrong binary?

Thanks in advance!

Hi msc,
Welcome to the ROOT forum. Thank you for your post.
Did you use the pkg or tarball version?
Do you also see the issue when you install root with homebrew: brew install root?
Lukas