Page MenuHomePhabricator

Eigen does not build on OSX 10.11, because Eigen cannot determine ninja
Closed, DuplicatePublic

Description

When initiating superbuild on OSX 10.11 (CMake 3.5.2, Ninja 1.7.1, XCode 7.3.1), compiling is stopping when configuring external project "Eigen". CMake configuration lists "Found unsuitable Qt version "5.6.0" " but finishes configuration. When CMake is generating, then

output when configuring (CMake)

Found unsuitable Qt version "5.6.0" from /Users/reicht/development/Qt/560/5.6/clang_64/bin/qmake
CMake Warning at blas/CMakeLists.txt:32 (message):

No fortran compiler has been detected, the blas build will be incomplete.

Build string: darwin-15.5.0-llvm-clang++-7.3.0-sse2-64bit
Enabled backends:
Disabled backends: Cholmod, UmfPack, SuperLU, PaStiX, METIS, Qt4 support, GoogleHash, Adolc, MPFR C++, fftw, OpenGL,
Default order: Column-major
Maximal matrix/vector size: 320

CXX: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
CXX_FLAGS: -std=c++11 -fexceptions -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Qunused-arguments -ansi
Sparse lib flags:

Configuring done

output when generating (CMake)

CMake Error:

The detected version of Ninja () is less than the version of Ninja required
by CMake (1.3).

Related Objects

Duplicates Merged Here
T22162: Ninja support

Event Timeline

That Qt 5.6 warning is not related to the actual issue with ninja. It's just expected output from Eigen that it doesn't enable Qt-related stuff, which we're not using anyway.

thanks, then I will focus on the issue, why eigen cannot determine the version of ninja

Adding some debug output into the sourcecode of the CMake application to check if the cmake method for extracting the version number of Ninja works as supposed. Therefore some text output printing the detected versionnumber of ninja has been added to the file: cmGlobalNinjaGenerator.cxx:FindMakeProgram()

Interestingly after some routines of the EIGEN Project executed (especially a routine which deals with @EIGEN_MAKECOMMAND_PLACEHOLDER@), the version number of ninja disappears:

when configuring the EIGEN Project, following debug output is printed:
CMake Warning (dev):

_myDEBUG_1 command:/usr/local/bin/ninja

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:/usr/local/bin/ninja

_myDEBUG_2 extracted version:1.7.1

_myDEBUG_3 set version:1.7.1

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev):

_myDEBUG_1 command:/usr/local/bin/ninja

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:/usr/local/bin/ninja

_myDEBUG_2 extracted version:1.7.1

_myDEBUG_3 set version:1.7.1

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev):

_myDEBUG_1 command:/usr/local/bin/ninja

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:/usr/local/bin/ninja

_myDEBUG_2 extracted version:1.7.1

_myDEBUG_3 set version:1.7.1

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev):

_myDEBUG_1 command:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_2 extracted version:

_myDEBUG_3 set version:

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at blas/CMakeLists.txt:32 (message):

No fortran compiler has been detected, the blas build will be incomplete.

CMake Warning (dev):

_myDEBUG_1 command:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_2 extracted version:

_myDEBUG_3 set version:

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev):

_myDEBUG_1 command:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_1 command:--version

_myDEBUG_1 command this->:@EIGEN_MAKECOMMAND_PLACEHOLDER@

_myDEBUG_2 extracted version:

_myDEBUG_3 set version:

This warning is for project developers. Use -Wno-dev to suppress it.

Identified responsible file: EigenConfugureTesting.cmake

...

  1. CMake/Ctest does not allow us to change the build command,
  2. so we have to workaround by directly editing the generated DartConfiguration.tcl file
  3. save CMAKE_MAKE_PROGRAM

set(CMAKE_MAKE_PROGRAM_SAVE ${CMAKE_MAKE_PROGRAM})

and set a fake one

set(CMAKE_MAKE_PROGRAM "@EIGEN_MAKECOMMAND_PLACEHOLDER@")

...

when commenting "set(CMAKE_MAKE_PROGRAM "@EIGEN_MAKECOMMAND_PLACEHOLDER@")" the build runs through.

sent an email to Eigen developer mailinglist

reply from Eigen Dev Team via Eigen Mailinglist:
On 01 Jul 2016, at 09:49

Subject: CMake configuration error on OSX using ninja

Thank you for the report.

I backported the required changes from the devel branch to the 3.2 branch. So the next 3.2 and 3.3 releases should be fine with Ninja.

reicht lowered the priority of this task from Normal to Low.Oct 7 2016, 2:47 PM