Hi,
I am preparing the computer lab machine for a course this summer and I am running into a strange "ninja issue".
[tru@optiplex7020 ninja]$ cmake ../imp-2.6.1 -DCMAKE_BUILD_TYPE=Release -G Ninja -DIMP_MAX_CHECKS=NONE -DCMAKE_INSTALL_PREFIX=/isb2016/imp-2.6.1 -DCMAKE_INCLUDE_PATH="/isb2016/Python-2.7.11;/isb2016/Python-2.7.11/include" -DCMAKE_LIBRARY_PATH="/isb2016/libTAU-1.0.1/lib;/isb2016/Python-2.7.11/lib" -DPYTHON_LIBRARY=/isb2016/Python-2.7.11/lib -DPYTHON_INCLUDE_DIR="/isb2016/Python-2.7.11;/isb2016/Python-2.7.11/include/python2.7" -DLIBTAU_INCLUDE_DIR="/isb2016/libTAU-1.0.1" CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER CMake Error: Could not find cmake module file:/home/tru/ISB2016/build/ninja/CMakeFiles/2.8.11/CMakeCCompiler.cmake CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_COMPILER CMake Error: Could not find cmake module file:/home/tru/ISB2016/build/ninja/CMakeFiles/2.8.11/CMakeCXXCompiler.cmake -- Configuring incomplete, errors occurred! [tru@optiplex7020 ninja]$ type ninja ninja is /isb2016/ninja-1.7.1/ninja
ninja was built from source with "./configure.py --bootstrap". I tried Ninja 1.7.1 1.6.0 and 1.5.3 without success (same error).
If I run the same command without the '-G Ninja', cmake completes properly and make -j8 completes without issue.
[tru@optiplex7020 fast]$ cmake ../imp-2.6.1 -DCMAKE_BUILD_TYPE=Release -DIMP_MAX_CHECKS=NONE -DCMAKE_INSTALL_PREFIX=/isb2016/imp-2.6.1 -DCMAKE_INCLUDE_PATH="/isb2016/Python-2.7.11;/isb2016/Python-2.7.11/include" -DCMAKE_LIBRARY_PATH="/isb2016/libTAU-1.0.1/lib;/isb2016/Python-2.7.11/lib" -DPYTHON_LIBRARY=/isb2016/Python-2.7.11/lib -DPYTHON_INCLUDE_DIR="/isb2016/Python-2.7.11;/isb2016/Python-2.7.11/include/python2.7" -DLIBTAU_INCLUDE_DIR="/isb2016/libTAU-1.0.1" -- Running check_common_problems -- Running clean_build_dir -- Running setup_cmake -- GCC version: 4.8.5 -- Enabling g++ C++11 support -- GCC version: 4.8.5 -- No conversion issue -- Doxygen is /isb2016/doxygen-1.8.6/bin/doxygen, version 1.8.6 -- Running setup_doxygen -- Python binary is /isb2016/Python-2.7.11/bin/python (version 2.7.11) -- Found PythonLibs: /isb2016/Python-2.7.11/lib (Required is exact version "2.7.11") -- Running setup -- Running setup_all -- Running making containers -- Boost version: 1.53.0 -- Found the following Boost libraries: -- system -- filesystem -- thread -- program_options -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success ... Configuring module integrative_docking ...yes -- Running setup_swig_wrappers integrative_docking -- Running IMP.integrative_docking making all header -- Running setup_swig_dependencies -- Creating thread pool with 16 threads -- Running setup_imppy -- Configuring done -- Generating done -- Build files have been written to: /home/tru/ISB2016/build/fast [tru@optiplex7020 fast]$ nice make -j8 Scanning dependencies of target IMP.kmeans-all-header Scanning dependencies of target IMP.parallel-all-header Scanning dependencies of target IMP.kernel-all-header Scanning dependencies of target IMP.test-all-header ...
Best regards
Tru
On 5/23/16 1:58 PM, Tru Huynh wrote: > I am preparing the computer lab machine for a course this summer > and I am running into a strange "ninja issue". ... > CMake Error: CMake was unable to find a build program corresponding > to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a > different build tool.
Odd, but this certainly looks like a cmake/ninja issue, nothing IMP-specific. You might need to explicitly set CMAKE_MAKE_PROGRAM - I think cmake only looks in /usr/bin/ for ninja. Alternatively, make a minimal CMakeLists.txt that demonstrates the problem and report it to the cmake folks.
Ben
On Wed, May 25, 2016 at 11:47:25AM -0700, Ben Webb wrote: > On 5/23/16 1:58 PM, Tru Huynh wrote: > >I am preparing the computer lab machine for a course this summer > >and I am running into a strange "ninja issue". > ... > >CMake Error: CMake was unable to find a build program corresponding > >to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a > >different build tool. > > Odd, but this certainly looks like a cmake/ninja issue, nothing > IMP-specific. You might need to explicitly set CMAKE_MAKE_PROGRAM - > I think cmake only looks in /usr/bin/ for ninja. Alternatively, make > a minimal CMakeLists.txt that demonstrates the problem and report it > to the cmake folks.
Thanks for your reply.
cmake for CentOS-7 is 2.8.11, and it fails event with the basic oneline CMakeLists.txt (even if I export CMAKE_MAKE_PROGRAM=/.../ninja-1.7.1/ninja):
$ echo 'project(TOTO)' > CMakeLists.txt $ cmake . -G Ninja CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. ....
If I use the cmake3 (cmake 3.5.2) from EPEL instead that works: $ cmake3 . -G Ninja -- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 ... -- Build files have been written to: /tmp/tmp.gfrIX6M2A7
Bottom line, use cmake3 for IMP :D
RFE for IMP CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) -> cmake_minimum_required(VERSION 3.0) ?
Best regards
Tru
On 5/25/16 12:33 PM, Tru Huynh wrote: > cmake for CentOS-7 is 2.8.11, and it fails event with the basic oneline > CMakeLists.txt (even if I export CMAKE_MAKE_PROGRAM=/.../ninja-1.7.1/ninja):
Right, so clearly not an IMP issue.
> RFE for IMP CMakeLists.txt: > cmake_minimum_required(VERSION 2.8.3) -> cmake_minimum_required(VERSION 3.0) ?
IMP *doesn't* require cmake 3 - you already demonstrated that it works just fine with cmake 2 if you use make rather than ninja. (And in fact we also use cmake 2.8 with ninja all the time.)
Ben
On Wed, May 25, 2016 at 12:40:34PM -0700, Ben Webb wrote: > On 5/25/16 12:33 PM, Tru Huynh wrote: > >cmake for CentOS-7 is 2.8.11, and it fails event with the basic oneline > >CMakeLists.txt (even if I export CMAKE_MAKE_PROGRAM=/.../ninja-1.7.1/ninja): > > Right, so clearly not an IMP issue. > right, just me not being familiar with cmake/ninja...
> >RFE for IMP CMakeLists.txt: > >cmake_minimum_required(VERSION 2.8.3) -> cmake_minimum_required(VERSION 3.0) ? > > IMP *doesn't* require cmake 3 - you already demonstrated that it > works just fine with cmake 2 if you use make rather than ninja. (And > in fact we also use cmake 2.8 with ninja all the time.)
Ok, I 've just figured out what I did wrong: I need to pass the CMAKE_MAKE_PROGRAM variable on the command line to cmake, and not just exporting CMAKE_MAKE_PROGRAM in my shell environment.
$ cmake . -G Ninja -DCMAKE_MAKE_PROGRAM=/path/to/ninja works as expected for the simple testcase and IMP building.
Sorry for the noise!
Tru
participants (2)
-
Ben Webb
-
Tru Huynh