Compilation error due to 'font not found in path'


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 6.36.04
Platform: RedHat9
Compiler: gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)


Dear rooters,

I am trying to compile and install ROOT v6.36.04, and the compilation fails at the end, when trying to process the tutorials/hsimple.C

The compilation runs smoothly but crashes at the very end, as shown below:

[2459/2459] Generating tutorials/hsimple.root
FAILED: tutorials/hsimple.root build_v6-36-04/tutorials/hsimple.root
cd build_v6-36-04/tutorials && LD_LIBRARY_PATH=build_v6-36-04/lib ROOTIGNOREPREFIX=1 ROOT_HIST=0
build_v6-36-04/bin/root.exe -l -q -b -n -x root/tutorials/hsimple.C -e return

Processing root/tutorials/hsimple.C...
Error in <TTF::SetTextFont>: font file texgyreheros-bold.otf not found in path
Error in <TTF::SetTextFont>: font file texgyreheros-regular.otf not found in path
Error in <TTF::SetTextSize>: current font index out of bounds
Error in <TTF::SetTextFont>: font file texgyreheros-regular.otf not found in path
Error in <TTF::SetTextSize>: current font index out of bounds

Not sure it is related, but I use to redefine where to put things in the final PREFIX, such as:
-DCMAKE_INSTALL_PREFIX=/redhat-9-x86_64/root/6.36.04/ \
-DCMAKE_INSTALL_BINDIR=/redhat-9-x86_64/root/6.36.04/bin/ \
-DCMAKE_INSTALL_LIBDIR=/redhat-9-x86_64/root/6.36.04/lib/ \
-DCMAKE_INSTALL_DATAROOTDIR=/redhat-9-x86_64/root/6.36.04/share/ \
-DCMAKE_INSTALL_SYSCONFDIR=/redhat-9-x86_64/root/6.36.04/etc/ \

and finally I am using ninja instead of cmake (mostly because it is a bit faster than the latter).

Not sure any of these is important, it just seems that the font is not found, though it is in the expected directory, i.e. in fonts/

What am I doing wrong to end up with this font issue once the compilation is almost completed?

Thanks!

Regards,

Sébastien

The error message you get points to a missing file font: texgyreheros-bold.otf. This file is in the$ROOTSYS/fonts folder. Is it the case on your machine ?

Hi !

Yes, the file is actually is the build_root/fonts directory.

I just don’t understand why it is not found.

Thanks!

Sébastien

Ok, I knew I was doing something stupid!

I have a (very) custom and (very) old .rootrc in my HOME, and the default fonts directory was modified…

[487/487] Generating tutorials/hsimple.root
Processing /redhat-9-x86_64/root/tutorials/hsimple.C…hsimple   : Real Time =   0.15 seconds Cpu Time =   0.07 seconds
(TFile *) 0x2d3b640

Sorry for the noise,

Regards,

Sébastien

1 Like