Xft/X11 problems when installing Root on cluster

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


I invite @oshadura and @Axel to have a look here.

Let’s look at ROOT 6. How did you configure (invoke CMake) and can you share CMakeCache.txt?

I invoked CMake like this:
cmake -Dxft=OFF -Dx11=OFF …/root-6.20.04/
which generated the attached CMakeCache.txt
When I try to build now, I get to ~95% before it stops with the error mentioned in my initial post.

If I run just cmake …/root-6.20.04/ I get

CMake Error at cmake/modules/SearchInstalledSoftware.cmake:326 (message):
  libXft and Xft headers must be installed.
Call Stack (most recent call first):
  CMakeLists.txt:168 (include)

CMakeCache.txt (124.1 KB)

Try to add: -Dopengl=OFF

Thank you, that worked.

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