Home | News | Documentation | Download

ROOT error Performing build step for 'OPENSSL' CMake Error at builtins/openssl/OPENSSL-prefix/src/OPENSSL-stamp/OPENSSL-build-RelWithDebInfo.cmake


ROOT Version: root-6.14.04
Platform: MacOS Mojave 10.14
Compiler: CMake 3.14 (no from Homebrew)

I was trying to install root on my MAC, avoiding use of Homebrew because of some different package version I need, with this command:

-> cmake  ../root-6.14.04  -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/ -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/Headers -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -Droofit=ON -Dtmva=ON
(also adding in a second try -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib before -DPYTHON)
and after that 
->cmake --build .
and I got this error:
--> [ 10%] Performing build step for 'OPENSSL'
CMake Error at MYPATH/myroot/builtins/openssl/OPENSSL-prefix/src/OPENSSL-stamp/OPENSSL-build-RelWithDebInfo.cmake:49 (message):
  Command failed: 2

   'make' '-j1' 'CC=/Library/Developer/CommandLineTools/usr/bin/cc -fPIC'
This is the output from MYPATH/myroot/builtins/openssl/OPENSSL-prefix/src/OPENSSL-stamp/OPENSSL-build-*.log :slight_smile:

 In file included from cryptlib.c:117:
./cryptlib.h:62:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>
1 error generated.
make[4]: *** [cryptlib.o] Error 1
make[3]: *** [build_crypto] Error 1
making all in crypto...


Please try with -Dbuiltin_openssl=ON instead of using the Homebrew version. That should work. I guess the OPENSSL_LIBRARIES you are passing to CMake are messing up the setup with the builtin OpenSSL, as it seems your external OpenSSL is not found (headers are likely missing or not found). Alternatively, replace your OPENSSL_* variables with only -DCMAKE_PREFIX_PATH=/opt/local, but that may pick up more than what you want from that path.


Hello, thank you for your reply.
Unfortunately I tried both your suggestion:

cmake …/root-6.14.04 -Dbuiltin_openssl=ON -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/ -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/Headers -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -Droofit=ON -Dtmva=ON


cmake …/root-6.14.04 -DCMAKE_PREFIX_PATH=/opt/local -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/ -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3/Headers -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -Droofit=ON -Dtmva=ON

but still I got the same error after trying
-> cmake --build .
I attach a txt file with the output from make compilation, hope this will help.

Thank yououtput_cmake1.txt (33.2 KB)


Your file indicate you are not starting a fresh build. Please start from a clean build directory and leave out options for Python (i.e. use the default one from the system). If that works, we can then try with the non-standard Python.
Just run cmake ../root-6.14.04 to configure and cmake --build . to build ROOT. You probably also need at least 6.14/08 if you are on Mojave (6.16/00 being recommended).


so I tried both configure and build root-6.14.06 and root.16.00 and both went fine.
Do you suggest to try with specific python version…as they both took the 2.7 version.
In addition, the command to specify the PYTHON version is the same in the two root version as in my first attempt?
Thank you.


If you need to change which python to use, just add -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 to cmake. Do not specify PYTHON_INCLUDE_DIR or PYTHON_LIBRARY, as this can cause inconsistencies. Once you build ROOT, you’ll have to use that particular python interpreter to be able to import ROOT.


Hello Amadio,
thank you for your help, input and kind clarification.
Now everything is working fine with the wanted python version.