[CMake] Tweaking/disabling timeout for "Check for working CXX compiler"

Dmitry Marakasov amdmi3 at amdmi3.ru
Tue Sep 8 22:57:10 EDT 2015


Hi!

FreeBSD project use userspace qemu emulation to cross-build packages
for some architectures, namely arm. This worked great for most
packages, however ones using cmake tend to fail randomly. I couldn't
reproduce these failures, but after we've updated cmake to 3.3.1 which
is more verbose, the cause became apparent.

Example failure log:

http://beefy8.nyi.freebsd.org/data/head-armv6-default/p396164_s287479/logs/flare-game-0.19_1.log

Relevant excerpt:

---
-- Check for working CXX compiler: /nxb-bin/usr/bin/c++
CMake Error: Generator: execution of make failed. Make command was: "/usr/bin/make" "cmTryCompileExec920170445/fast"
-- Check for working CXX compiler: /nxb-bin/usr/bin/c++ -- broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/nxb-bin/usr/bin/c++" is not able to compile a simple
    test program.

  It fails with the following output:
...
  Linking CXX executable cmTryCompileExec920170445

  /usr/local/bin/cmake -E cmake_link_script
    CMakeFiles/cmTryCompileExec920170445.dir/link.txt --verbose=1

  /nxb-bin/usr/bin/c++ -O2 -pipe -mfloat-abi=softfp -fno-strict-aliasing
    CMakeFiles/cmTryCompileExec920170445.dir/testCXXCompiler.cxx.o -o
      cmTryCompileExec920170445

  Process terminated due to timeout

  

  Generator: execution of make failed.  Make command was: "/usr/bin/make"
...
---

As expected, emulated build is much slower than native one (even
though we try to use native (amd64) cross(arm)-compiler (and some
tools) instead of using fully emulated build). Package builds are
also highly concurrent. It seems like cmake timeout for these
compiler tests is too small for this environment and it fires
frequently.

The question is obvious: where is this timeout defined, what value
is it set to exactly and is it tunable?

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3 at amdmi3.ru  ..:  jabber: amdmi3 at jabber.ru      http://amdmi3.ru


More information about the CMake mailing list