Install ROOT 6.16.00

I am trying to install ROOT on RHEL 7 and have successfully made it through ‘cmake path/to/source’. Next I invoke the following command:

cmake --build . – -j8

I make it to the following spot:

[ 28%] Built target Meta
gmake[2]: *** No rule to make target /usr/lib64/libGLX.so', needed bylib/libGLEW.so’. Stop.
gmake[1]: *** [graf3d/glew/CMakeFiles/GLEW.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
gmake[2]: *** No rule to make target /usr/lib64/libGLX.so', needed bylib/libFTGL.so’. Stop.
gmake[1]: *** [graf3d/ftgl/CMakeFiles/FTGL.dir/all] Error 2

I had read in a prior post that if I invoke the following command:

cmake . -Dbuiltin_GL=off

and reissue the command:

cmake --build . – -j8

And I make further into the build to this point:

[ 55%] Built target Meta
gmake[2]: *** No rule to make target /usr/lib64/libGLX.so', needed bylib/libGLEW.so’. Stop.
gmake[1]: *** [graf3d/glew/CMakeFiles/GLEW.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
[ 56%] Built target mathtext
gmake[2]: *** No rule to make target /usr/lib64/libGLX.so', needed bylib/libFTGL.so’. Stop.
gmake[1]: *** [graf3d/ftgl/CMakeFiles/FTGL.dir/all] Error 2

It appears the identical problem reappears. If I issue the same command:

cmake . -Dbuiltin_GL=off

I can re-invoke the command and it stops at the earlier error. Does anyone have any idea how to rectify this problem? I appreciate any ideas.

Thanks,
Tom Eden

You probably need cmake . -Dbuiltin_glew=OFF -Dbuiltin_ftgl=OFF -Dopengl=OFF in the build directory for it to work. There is no -Dbuiltin_GL option in ROOT.

Thanks for the message, Amadio. Your suggestion got me past these sticking points; however, later in the build, I run into another problem:

[ 84%] Generating G__ProofPlayer.cxx, …/…/lib/libProofPlayer_rdict.pcm, …/…/lib/libProofPlayer.rootmap
/usr/bin/ld: /usr/local/lib/libpython3.7m.a(myreadline.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libpython3.7m.a(abstract.o): relocation R_X86_64_32S against symbol_Py_NotImplementedStruct’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libpython3.7m.a(boolobject.o): relocation R_X86_64_32S against symbol `_Py_FalseStruct’ can not be used when making a shared object; recompile with -fPIC

I notice that suggestion to each error says to recompile with -fPIC. Question: How do I implement this suggestion in the build command?

Thanks,
Tom Eden

It’s not ROOT that needs to be changed, but the Python installation that you have. Static libraries need to be compiled with -fPIC in order to be able to link dynamic libraries against them. It seems you have a statically compiled version Python that is not position-independent. Please try to use shared libraries instead or recompile Python with -fPIC. Cheers,

Thanks for your reply, Amadio. I rebuilt Python 3.7.3 using the --enable-shared option to create a shared library environment. I then reran the ROOT build:

cmake . -DPYTHON_EXECUTABLE=/usr/local/bin/python3.7 -Dbuiltin_glew=OFF -Dbuiltin_ftgl=OFF -Dopengl=OFF

and the build failed. A snapshot of the screen output shows this error:

CMake Error at interpreter/llvm/src/CMakeLists.txt:613 (if):
if given arguments:

"VERSION_LESS" "2.7"

Unknown arguments specified

– Configuring incomplete, errors occurred!

Do you have any idea about the cause of this error?

Thanks, Tom

It seems that using only -DPYTHON_EXECUTABLE might not be enough for LLVM. I think either starting from scratch (or just removing CMakeCache.txt and reconfiguring) or adding also -DCMAKE_PREFIX_PATH=/usr/local could help. Otherwise, just remove the check for the version in LLVM’s CMakeLists.txt, it shouldn’t matter if you are using Python 3.7.

Another thing, LLVM has this comment right before that version check:

# Verify that we can find a Python 2 interpreter.  Python 3 is unsupported.
# FIXME: We should support systems with only Python 3, but that requires work
# on LLDB.

Could it be the case that you only have Python 3.x installed (or found by LLVM)?

I am not so sure where this LLVM verification statement resides.

Anyways, I reverted back to using the built-in REHEL version of Python and retried the following cmake command:

cmake /tmp/cernroot/root-6.16.00 -DPYTHON_EXECUTABLE=/usr/bin/python -DPYTHON_LIBRARY=/usr/lib64/python2.7.so.1.0 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -Dbuiltin_glew=OFF -Dbuiltin_ftgl=OFF -Dopengl=OFF

– Found PythonInterp: /usr/bin/python (found version “2.7.5”)
– Found PythonLibs: /usr/lib64/python2.7.so.1.0
– Looking for numpy (python package)
– Found NUMPY: /usr/lib64/python2.7/site-packages/numpy/core/include (found version “1.7.1”)
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:480 (message):
Version mismatch between Python interpreter (2.7.5) and libraries ().

ROOT cannot work with this configuration. Please specify only
PYTHON_EXECUTABLE to CMake with an absolute path to ensure matching
versions are found.
Call Stack (most recent call first)
CMakeLists.txt:150 (include)

This type of error is what I initially got before. So I only used the PYTHON_EXECUTABLE option:

– Found PythonInterp: /usr/bin/python (found version “2.7.5”)
CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.14/Modules/FindPythonLibs.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/modules/SearchInstalledSoftware.cmake:9 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:467 (find_package)
CMakeLists.txt:150 (include)

As you can see, it now wants the include dirs and the python libraries. It seems I am in a vicious circle! Any suggestions to remedy this problem??

Thanks,
Tom Eden

Which versions of python-devel you have installed on the system? It seems the version of the python libraries is not detected properly.

I have the native installation python 2.7, and I just removed the python 3.7. Am I correct that the native installation should work fine with root?

Amadio,

I was able to get the build done. I went back and installed Python 3.7.3 with shared libraries, but I used an additional option:

./configure
–prefix=/usr/local
–enable-optimizations
–enable-shared
LDFLAGS="-Wl,-rpath /usr/local/lib"

So, the shared libraries are now recognized by the root build! The root build command I used was:

cmake . -DPYTHON_EXECUTABLE=/usr/local/bin/python3.7
-DCMake_PREFIX_PATH=/usr/local -Dxml=ON
-Dbuiltin_glew=OFF -Dbuiltin_ftgl=OFF -Dopengl=OFF

And finally:

cmake --build . – -j8

produced the root executable. Thanks for your help in diagnosing my problems!

Tom Eden

2 Likes

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