Since I updated root6 to 6.10.02 via homebrew recently, it started having problems finding fonts and icons. For example, when trying to work with a data file (without setting $ROOTSYS
, which is usually fine):
> % root -l data.root
root [0]
Attaching file data.root as _file0...
(TFile *) 0x7f82f04d6ca0
root [1] save->Draw("targetPos")
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/icons/Root6Icon.png, output: $ROOTSYS/icons/Root6Icon.png
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/fonts/symbol.ttf, output: $ROOTSYS/fonts/symbol.ttf
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/fonts/symbol.ttf, output: $ROOTSYS/fonts/symbol.ttf
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/fonts/symbol.ttf, output: $ROOTSYS/fonts/symbol.ttf
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/fonts/symbol.ttf, output: $ROOTSYS/fonts/symbol.ttf
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <TSystem::ExpandFileName>: input: $ROOTSYS/fonts/symbol.ttf, output: $ROOTSYS/fonts/symbol.ttf
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
root [2]
Of course I should be setting $ROOTSYS
to be sure. But it still can’t find fonts and icons with the variable set as intended (using env
here but same result after running thisroot.sh
):
> % env ROOTSYS=/usr/local/opt/root6 root -l data.root
root [0]
Attaching file data.root as _file0...
(TFile *) 0x7f808891da60
root [1] save->Draw("targetPos")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
Error in <FontCache::SelectSymbolFont>: symbol.ttf file not found
I noticed that the homebrew installation in fact does not have the fonts or icons folder in the top of the root directory, instead they are in $ROOTSYS/share/root
or equivalently via symlink /usr/local/share/root
. So I got it to work like this:
> % env ROOTSYS=/usr/local/opt/root6/share/root root -l data.root
root [0]
Attaching file data.root as _file0...
(TFile *) 0x7ff7e492f770
root [1] save->Draw("targetPos")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
But as far as I understand, the correct $ROOTSYS
should be at the top directory (/usr/local/opt/root6
) so this solution seems like it would just cause other problems. And to be clear, this does have user-visible effects, e.g. no minus signs on my axes and root applet shows another app’s registered .exe
icon instead of root’s. Is this a bug in ROOT or in the homebrew formula?
Thanks