MantisBT - CMake
View Issue Details
0015542CMakeCMakepublic2015-04-29 15:012015-11-02 09:13
Felix Geyer 
Brad King 
normalminoralways
closedfixed 
CMake 3.2.2 
CMake 3.3CMake 3.3 
0015542: RunCMake tests fail when run with MAKEFLAGS='--jobserver-fds=' in environment
When run in parallel these tests from the CMake test suite fail:
        286 - RunCMake.Configure (Failed)
        326 - RunCMake.try_compile (Failed)
        335 - RunCMake.configure_file (Failed)

Verified on Debian 8. Full build log is attached.
make -j4 test
No tags attached.
log cmake_build.log (52,836) 2015-04-29 15:01
https://public.kitware.com/Bug/file/5443/cmake_build.log
Issue History
2015-04-29 15:01Felix GeyerNew Issue
2015-04-29 15:01Felix GeyerFile Added: cmake_build.log
2015-04-29 15:17Brad KingNote Added: 0038645
2015-04-29 15:30Brad KingNote Added: 0038647
2015-04-29 16:10Brad KingNote Added: 0038648
2015-04-29 16:15Felix GeyerNote Added: 0038649
2015-04-29 16:16Brad KingNote Added: 0038650
2015-04-29 16:18Brad KingAssigned To => Brad King
2015-04-29 16:18Brad KingStatusnew => resolved
2015-04-29 16:18Brad KingResolutionopen => fixed
2015-04-29 16:18Brad KingFixed in Version => CMake 3.3
2015-04-29 16:18Brad KingTarget Version => CMake 3.3
2015-04-29 16:18Brad KingSummaryRunCMake tests fail when run in parallel => RunCMake tests fail when run with MAKEFLAGS='--jobserver-fds=' in environment
2015-04-29 16:22Brad KingNote Added: 0038651
2015-04-29 16:28Felix GeyerNote Added: 0038652
2015-11-02 09:13Robert MaynardNote Added: 0039797
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038645)
Brad King   
2015-04-29 15:17   
I run CMake's test suite in parallel all the time on Debian 'testing' and see no such failures.
(0038647)
Brad King   
2015-04-29 15:30   
The log contains lines like:

   actual-out> make[3]: Entering directory '/tmp/buildd/cmake-3.2.2/Build/Tests/RunCMake/configure_file/RerunCMake-build'
   actual-out> make[3]: Leaving directory '/tmp/buildd/cmake-3.2.2/Build/Tests/RunCMake/configure_file/RerunCMake-build'
   ...
   actual-err> make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.

Is some environment variable set that GNU make interprets?
(0038648)
Brad King   
2015-04-29 16:10   
I can reproduce this with:

 $ MAKEFLAGS='--print-directory --jobserver-fds=9,10 -j' bin/ctest -R RunCMake.configure_file -V

Why is MAKEFLAGS set when running ctest?
(0038649)
Felix Geyer   
2015-04-29 16:15   
I think I found the difference.

The Debian package debhelper tool calls this when running the tests:
make -j4 test 'ARGS="-E CTestTestUpload -j4"'
This fails with the error I posted.

Running this works fine:
make test 'ARGS="-E CTestTestUpload -j4"'
(0038650)
Brad King   
2015-04-29 16:16   
This should fix it:

 Tests: Protect RunCMake tests from MAKEFLAGS in environment
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=703e7625 [^]
(0038651)
Brad King   
2015-04-29 16:22   
Re 0015542:0038649: Thanks. Even with

 $ make --version
 GNU Make 4.0
 $ make -j4 test ARGS="-R RunCMake.configure_file -V"

I don't see the failure.

Either way, I think the change linked in 0015542:0038650 should fix this. These tests are checking that 'make' prints what we expect, and this environment variable can cause 'make' to print extra output.
(0038652)
Felix Geyer   
2015-04-29 16:28   
Thanks, works fine with your change.
(0039797)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.