Bug 14693

Summary: cmake-native do_configure fails when rebuilding without sstate on NIS hosts
Product: [Build System, Metadata & Runtime] BitBake Reporter: Trevor Gamblin <tvgamblin>
Component: bitbakeAssignee: Randy MacLeod <randy.macleod>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Trevor Gamblin 2022-01-17 13:23:26 UTC
While trying to build core-image-minimal with the latest version of poky master on yow-lpggp3, I encountered the following error:

| loading initial cache file /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/build/Bootstrap.cmk/InitialCacheFlags.cmake
| -- The C compiler identification is GNU 7.5.0
| -- The CXX compiler identification is GNU 7.5.0
| CMake Error at Modules/CMakeCInformation.cmake:38 (include):
|   include called with wrong number of arguments.  include() only takes one
|   file.
| Call Stack (most recent call first):
|   CMakeLists.txt:7 (project)
|
|
| -- Detecting C compiler ABI info
| CMake Error at /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/cmake-3.22.1/Modules/CMakeCInformation.cmake:38 (include):
|   include called with wrong number of arguments.  include() only takes one
|   file.
| Call Stack (most recent call first):
|   /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/build/CMakeFiles/CMakeTmp/CMakeLists.txt:4 (project)
|
|
| CMake Error at Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
|   Failed to configure test project build system.
| Call Stack (most recent call first):
|   Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
|   CMakeLists.txt:7 (project)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/build/CMakeFiles/CMakeOutput.log".
| ---------------------------------------------
| Error when bootstrapping CMake:
| Problem while running initial CMake
| ---------------------------------------------
| WARNING: /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/temp/run.do_configure.28309:147 exit 11 from '/yow-lpggp32/tgamblin/yocto/master/poky/b'
| WARNING: Backtrace (BB generated script):
|       #1: do_configure, /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/temp/run.do_configure.28309, line 147
|       #2: main, /yow-lpggp32/tgamblin/yocto/master/poky/build/tmp/work/x86_64-linux/cmake-native/3.22.1-r0/temp/run.do_configure.28309, line 154
ERROR: Task (/yow-lpggp32/tgamblin/yocto/master/poky/meta/recipes-devtools/cmake/cmake-native_3.22.1.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 178 tasks of which 177 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /yow-lpggp32/tgamblin/yocto/master/poky/meta/recipes-devtools/cmake/cmake-native_3.22.1.bb:do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code. 


This may be related to certain hosts or network configurations, since we have two internal build machines running Ubuntu 18.04.3 and 18.04.6 which we can reproduce it on, but an external Fedora 35 builder where we cannot.
Comment 1 Trevor Gamblin 2022-01-17 13:24:42 UTC
Randy's bisect:

The yow-lpggp3 bisect points to:
    607f7b2844 (refs/bisect/bad) bitbake: bitbake-worker: Add/support network task flag

    but I'm out of time for today to confirm, try to fix it or 
understand why WRAXL isn't seeing it. If someone wants to 
follow-up, that'd good.

    git bisect info below.
    

    ../Randy
    

    

    $ git bisect good
Bisecting: 55 revisions left to test after this (roughly 6 steps)
[ce0d3b748b13f8ab56d54008358a910a901313ed] xserver-xorg: 21.1.2 -> 21.1.3
$ git bisect good
Bisecting: 27 revisions left to test after this (roughly 5 steps)
[76624204bdd35a22b6d61bbf7ef99bf944cffd95] libcomps: inherit setuptools3-base not distutils
$ git bisect good
Bisecting: 13 revisions left to test after this (roughly 4 steps)
[0089f71043518c31ea190705b0df9138a04a5da1] ruby: update 3.0.3 -> 3.1.0
$ git bisect good
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[4eea21b7addd091c7e549684699897fe7d60533c] classes: Only allow network in existing network accessing code
$ git bisect bad
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[6a2dfdf27a6829df9f58e825af2f90f0297a3aa0] poky: set default kernel to 5.15
$ git bisect good
Bisecting: 1 revision left to test after this (roughly 1 step)
[607f7b28443ec2c1f95f7c8eb7193b1159d29fc0] bitbake: bitbake-worker: Add/support network task flag
$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[60d25f278c9cc4d6288166aba4b5c8927d32f84c] bitbake: utils: Add disable_network function
$ git bisect good
607f7b28443ec2c1f95f7c8eb7193b1159d29fc0 is the first bad commit

commit 607f7b28443ec2c1f95f7c8eb7193b1159d29fc0
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Tue Dec 21 17:38:30 2021 +0000

    bitbake: bitbake-worker: Add/support network task flag
    
    This patch changes behaviour. After this change any task which does not
    have the network flag set will have networking disabled on systems that
    support that (kernel version dependent).
    
    Add a "network" task specific flag which then triggers networking to
    be enabled for this task, it is otherwise disabled.
    
    This needs to happen before we enter the fakeroot environment of the task
    due to the need for the real uid/gid which we save in the parent process.
    
    (Bitbake rev: 0746b6a2a32fec4c18bf1a52b1454ca4c04bf543)
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

 bitbake/bin/bitbake-worker | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Richard Purdie 2022-04-17 22:13:32 UTC
A workaround was added for this: https://git.yoctoproject.org/poky/commit/?id=d77178e8df213160d0fe58c5942507f01e7af2bd
Comment 3 Randy MacLeod 2024-03-25 23:47:56 UTC
Bulk move to 5.0-M4
Comment 4 Randy MacLeod 2024-04-25 01:26:30 UTC
Park in 5.99 until I'm sure I have time to work on an issue.
Comment 5 Richard Purdie 2026-04-30 15:44:18 UTC
We added a workaround