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
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?
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.