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

Hello,

I had downloaded the tarball version

	root_v6.36.10.macos-26.3-arm64-clang170.tar.gz

Now I installed root with homebrew, I have been testing some code and everything seems to work.

Thanks for your answer!

Glad to hear that it works. Thanks for letting us know.
Just as an additional note. Homebrew only installs the latest version (as of today 6.38.04), not necessarily the latest stable version (6.36.10). If you need a different root version than brew provides, consider installing root via conda [1,2].

[1] Installing ROOT - ROOT
[2] Anaconda.org

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