Cmake failure in locating X11, XPM and XFT libraries, Ubuntu 20.04

Dear Rooters,

I am having troubles in building root-v6.24.00 on Ubuntu 20.04.
cmake fails to find the x11, xpm and xft libraries.
Just unpacking the tar and running cmake returns

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find X11 (missing: X11_X11_LIB)

I understand that the name of the exact library produced might change from system to system, to version to version… so I found the X11 library in my system via find /usr/lib -iname *x11*

/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0

and passed it in the CMakeCache.txt under

//Path to a library.                                                            
X11_X11_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0

after that is fixed we get…

-- Looking for X11
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:345 (message):
  libXpm and Xpm headers must be installed.

and again, finding the xpm library path and specifying it in the CMakeCache.txt, then cmake complains about not finding xft

Is something wrong with the cmake file supposed to locate these libraries, or with their installation in Ubuntu? Why are not they located automatically?

I have this OS since a while, so I thought I might have messed up some of the libraries.
I tried to purge them, run apt update, and reinstall again all of them: I still get the same problem.

The same error I get on a virtual machine with Ubuntu 20.04 I created yesterday with VirtualBox on macOS.

Thanks for your help.

ROOT Version: 6.24.00
Platform: Ubuntu 20.04

sudo apt-get install libx11-dev libxpm-dev libxft-dev libxext-dev mesa-common-dev

same: Could NOT find X11 (missing: X11_X11_LIB)

You probably need to destroy your “build directory” and start from scratch again.

I have done it, before retrying, and it did not work.

I had $ROOTSYS, $LD_LIBRARY_PATH and $PATH variables pointing to another root built via conda.
I unset them and the compilation worked fine.

Sorry to have opened this, 100% my fault!

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