Hi,
I’m currently trying to get root running on my university’s HPC cluster, but I’m running into problems related to Xft / X11. When I initially ran Cmake, I got an error because Xft was not found, so I manually installed that and set the necessary PATH variables (LD_LIBRARY_PATH + CPLUS_INCLUDE_PATH), but the error persisted. Then I found out that you can disable Xft in the cmake options, but it only works if you also disable X11 completely (the -Dxft=OFF flag does not seem to have any effect by itself).
With X11 disabled I get through most of the building process, but when it reaches libRGL it crashes with
CMakeFiles/RGL.dir/src/TGLFormat.cxx.o:TGLFormat.cxx:function TGLFormat::InitAvailableSamples(): error: undefined reference to 'XGetVisualInfo'
CMakeFiles/RGL.dir/src/TGLFormat.cxx.o:TGLFormat.cxx:function TGLFormat::InitAvailableSamples(): error: undefined reference to 'XFree'
CMakeFiles/RGL.dir/src/TGLWidget.cxx.o:TGLWidget.cxx:function TGLWidget::CreateWindow(TGWindow const*, TGLFormat const&, unsigned int, unsigned int, std::pair<void*, void*>&): error: undefined reference to 'XCreateColormap'
CMakeFiles/RGL.dir/src/TGLWidget.cxx.o:TGLWidget.cxx:function TGLWidget::CreateWindow(TGWindow const*, TGLFormat const&, unsigned int, unsigned int, std::pair<void*, void*>&): error: undefined reference to 'XCreateWindow'
CMakeFiles/RGL.dir/src/TGLWidget.cxx.o:TGLWidget.cxx:function TGLWidget::~TGLWidget(): error: undefined reference to 'XFree'
collect2: error: ld returned 1 exit status
the undefined references are all part of X11. Does anyone have advice on how to solve this? Can I build root without RGL? Is there any older version of root that someone has tested without X11?
Update:
Looking into RootBuildOptions.cmake the xft flag doesn’t acutally exist in root 6, even though it is listed on https://root.cern.ch/building-root .
I’ve now tried root 5.34.38 where the flag exists at least, but seemingly has no effect either. Completely disabling X11 in root 5 has basically the same effect as in root 6, so I doubt it will work with any other version.
Further Update:
After writing a short test program that just includes Xft.h and prints the XFT_VERSION I can confirm that Xft is installed properly, yet root still does not find it.
ROOT Version: 6.20.04
Platform: linux
Compiler: gcc