Home | News | Documentation | Download

Latest ROOT6 from homebrew cannot find fonts and icons


#1

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


[SOLUTION]: ROOT6 (v6.10.04) installed via Homebrew on MacOS can't find fonts, symbols
#2

There seems to be no core ROOT developers in the contributors of the homebrew formula. Also our internal builds do not suffer from this problem as far as I know, so I would assume that it is a bug of the formula.


#3

So I’m assuming fonts and icons are intended to end up in $ROOTSYS, not $ROOTSYS/share/root? I see references to fonts and icons in both locations in the source code?


#4

Judging from the cmake install configuration I reckon you are right. Can’t say why they end up somewhere else though :confused:


#5

The brew formula is here. I don’t see anything to indicate that it is moving these folders into weird places. Will try building from source and see if I find any problems.


#6

Hi, I’ve just downloaded root trought homebrew and had the same problem. I was wondering if you could solve it?

Thank you.


#7

I fixed it locally by symlinking the fonts and icons folders into /usr/local/opt/root6/ and making sure you’ve run thisroot.sh or set $ROOTSYS to /usr/local/opt/root6/. Ideally it should be fixed in the homebrew formula or upstream.


#8

Hi,

Can you describe step by step what you’ve done? I’m not very good with it and could not fix the bug.

Thanks…


#9

Sure. In your shell do:

export ROOTSYS=/usr/local/opt/root6
cd $ROOTSYS
ln -s share/root/icons share/root/fonts .

The first line you will need to add to your shell configuration files, or otherwise run it every time you open a new shell. Also read the Caveats at the end of brew info root6 which tells you how to run a script which sets up ROOTSYS and other variables for you.


#10

Hi,

I’ve done it and worked nice. But I realized that when I start a new shell, the problem appears again. Do I need to run ". $(brew --prefix root6)/libexec/thisroot.sh;"every time?


#12

Hi,

this solution Latest ROOT6 from homebrew cannot find fonts and icons
alters the environment of the shell, you need to perform the steps every time you open a shell or to add them to the .bashrc or equivalent.


#13

Hi all, the underlying problem was identified by the homebrew maintainers as a bad path for CMAKE_INSTALL_ICONDIR and CMAKE_INSTALL_FONTDIR when performing a “fixed install” with the build flag -Dgnuinstall. See the linked github thread for full details.


#14

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


#15

Added JIRA ticket https://sft.its.cern.ch/jira/browse/ROOT-8970