ROOT compilation with X11 on macos


Due to various gui errors that I encounter since I am on macos, I wanted to try a ROOT compilation without cocoa and using X11. Here is the line I use:

cmake -DCMAKE_INSTALL_PREFIX=../../install/v6-20-00-X11 -Dmathmore=On -Dgdml=On -Dminuit2=On -Dx11=On -Dcocoa=Off -Dbuiltin_gsl=On -Dmacos_native=OFF ../../root

But I am facing exactly the same errors than in the following post: Crash when using TApplication on new macOS ROOT build

Is there a solution for that now ?

Thanks in advance

ROOT Version: 6-20-00
Platform: macos
Compiler: AppleClang

Hi @dudouet,
sorry for the delay. If it’s the same error as that other thread, maybe @amadio can help.


This is not a well supported combination (macos without cocoa, but with x11). Please make sure that in the final configuration you have what you want enabled, as the build system might change some options during configuration if things are not found. I recommend filing bugs for the problems you have with cocoa. The other thread seems to point to a problem external to ROOT, so maybe there’s something you need to fix in your configuration (i.e. installing X11 headers, etc).

1 Like


Thanks for your answer.

Actually I am facing many different errors seems I am on macos, so it is probably due to something badly configured on my laptop…

I have some “root” errors, no related to any code that I have written, like no possibility to draw the crossair on a pad, or not the possibility to write any characters like {,^,[ (actually alt gr + something) in the root interface (like the box SetTitle on an histogram)

Then I have errors that are certainly due to my code, but that was never crashing in linux. I have developed a GUI interface for gamma-ray spectroscopy. In this software, when I am fitting histograms, the fit results are printed in a TGListBox. If the window’s height is sufficient for the text that will be printed, all is fine, but if not, it crash.

Exemple here, Figure 1, The TGListBox is height enough, all is fine:

Figure 2, the TGList box heigh is not sufficient, The program crash:

I also have in an other part of my software a strange behavior, with an error related to cocoa classes (see Crash closing application with macos)

Since I am on macos I have seen many specific cases like this so I was wondering if this could be due to this cocoa stuff.

What do you think ?


The scope might be getting too large for us to be able to help effectively.

The best thing would be to make sure your ROOT installation works as expected (ROOT is expected to work properly on mac), and if not, open a bug report on jira or a dedicated topic on the forum, with a reproducer that is as simple as possible so we can debug what’s going wrong.


I guess that already the fact that the crosshair doesn’t work is suspicious right ? So you advice is to start by specific things like this on a dedicated topic to be sure of the ROOT installation, is it correct ?

Yes, first of all let’s make sure you have a working ROOT installation :smile:

So I succeeded to install ROOT using X11 and no more cocoa, by deactivating the opengl package.

This solve the crosshair issue, but I cannot check if it solve my software’s issues because it is depending on opengl…

Still me…

I have Temporarily removed the opengl dependancy in my code to try my software with the X11 version of ROOT and all is now working like before on linux. Si this seems really to be related to the cocoa implementation.

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