Building ROOT against brew-installed python3, missing libraries

I’m trying to build ROOT against python3 installed via homebrew (linuxbrew) on an slc6 machine. I fail at the cmake ../<source_dir> step, which complains that the xpm and libXpm headers are not found:

...
-- Found X11: /usr/lib64/libX11.so
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:278 (message):
libXpm and Xpm headers must be installed.
Call Stack (most recent call first):
CMakeLists.txt:110 (include)
-- Configuring incomplete, errors occurred!

I however have those headers installed via linuxbrew at /home/linuxbrew/.linuxbrew/include/X11 or lib/X11. I guess they aren’t found because cmake looks only at /usr/include. I tried modifying the cmake command, setting the variables explicitly like so

cmake -DX11_INCLUDE_DIR=/home/linuxbrew/.linuxbrew/include/X11 -DX11_LIBRARIES=/home/linuxbrew/.linuxbrew/lib/X11/locale/common/x*.so* ../root-61404

which for some reason does not help:

...
-- X11_INCLUDE_DIR: /home/linuxbrew/.linuxbrew/include/X11;/usr/include
-- X11_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/home/linuxbrew/.linuxbrew/lib/X11/locale/common/x*.so*;/usr/lib64/libX11.so;/usr/lib64/libXext.so
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:278 (message):
libXpm and Xpm headers must be installed.
Call Stack (most recent call first):
CMakeLists.txt:110 (include)

Any help is greatly appreciated.


ROOT Version: (to be installed) 6.14
Platform: slc6
Compiler: gcc (Homebrew gcc 5.5.0_4) 5.5.0


Does brew install root not work? Linuxbrew is not something we have tried, so it’s a best effort case. We will try to help, but there’s no official support for that. You are likely missing essential dependencies for ROOT on your system. Is it a virtual machine?

No it doesn’t, that formula is not yet fixed for linuxbrew (see https://github.com/Linuxbrew/homebrew-core/issues/9765). I see… no it’s not a virtual machine. But is my strategy with trying to tell cmake where to find dependencies not the right approach?

I think that the problem is not in telling CMake, but actually missing dependencies not installed in your system.

But as I wrote in my first message, I do have those dependencies, installed via brew:

[psidebo@gluino ~]$ find /home/linuxbrew/.linuxbrew/ -name "xpm*"
/home/linuxbrew/.linuxbrew/include/X11/xpm.h
/home/linuxbrew/.linuxbrew/Cellar/libxpm/3.5.12/include/X11/xpm.h
/home/linuxbrew/.linuxbrew/Cellar/libxpm/3.5.12/lib/pkgconfig/xpm.pc
/home/linuxbrew/.linuxbrew/lib/pkgconfig/xpm.pc

but for some reason they are not picked up by cmake (I tried setting what I think are the relevant variables, but without success)

Try adding -DCMAKE_PREFIX_PATH=/home/linuxbrew/.linuxbrew/ to your cmake command line. That said, you’ll have a hard time if you mix system software with Homebrew or Linuxbrew, as there’s no guarantee that the libraries are ABI compatible. It’s better to install CMake, GCC, etc in Linuxbrew and use those for building ROOT.

Thanks a lot, this worked! (I forgot to mention that my cmake actually is from brew. Strange then that the prefix path is not correct automatically…)

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