I am trying to build ROOT on a shared system where I do not have administrator privileges. There are some headers and libraries missing on the system, which I have been trying to build locally from the source. However, I am having some trouble actually linking these during the ROOT build.
In particular, I am currently running into this error:
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:345 (message):
libXpm and Xpm headers must be installed.
So I have built
libXpm to my own local directory, and added
/path/to/libxpm/build/lib to both
LD_RUN_PATH, but still ROOT does not recognize that they exist.
I found one ancient forum discussion with a potentially helpful post: https ://root-forum.cern. ch/t/xpm-headers/11650/4
grep search did not reveal where this file to modify exists, if indeed it still exists at all.
Perhaps there is some argument I can pass into cmake to make it look for the library in the correct location? The ROOT standard installation dependencies page does not have recommendations for this custom case.
Many thanks in advance for any help!
ROOT Version: v6.24/06
Platform: SUSE Linux Enterprise Server 15 SP3
Compiler: GCC 11.2.0 20210728
You need to install the “
libXpm-devel” or “
libxpm-dev” package (I don’t know how it is called on your system).
Thanks – yes, I understand this, but I cannot install these packages globally since, as mentioned above, I do not have administrator privileges. So I am trying to build them locally, and have so far succeeded, except that I don’t know how to get ROOT to recognize their nonstandard whereabouts.
and welcome to the ROOT forum!
This is not strictly a ROOT-related issue, as ROOT simply invokes
find_package(X11) from cmake to search for X11 and, indirectly, xpm.
If xpm provides a
FindXpm.cmake script, or similar, you can point the ROOT build to it with
-DCMAKE_MODULE_PATH="path/to/dir/where/FindXpm/is", and ROOT’s cmake call to
find_package(X11) should find it.
Otherwise we’d have to check how
find_package(X11) looks for xpm and make that call happy. I have not dug further than that at this time.
It might be simpler to ask your system administrators to install the packages you need
Thanks a lot for the helpful reply. I don’t see anything like a
FindXpm.cmake script in the
libXpm package, unfortunately… and upon reading the CMake page, I also see this:
Find<PackageName>.cmake file is not typically provided by the package itself. Rather, it is normally provided by something external to the package, such as the operating system, CMake itself, or even the project from which the
find_package() command was called.”
I am thinking that your suggestion to contact administrators instead is maybe about right!