Thank you @YMba9g8j9CJp0wLoQf5y and @bill.hoffman,
We tried with Cmake 3.20 on SLES12 platform, we still see the intermittent hang -
Stack trace
gdb) bt
#0 0x00007f4fc5694a43 in __select_nocancel () from /lib64/libc.so.6
#1 0x000000000091a92a in cmsysProcess_WaitForData ()
#2 0x000000000050f9ac in cmSystemTools::RunSingleCommand(std::vector<std::string, std::allocator< std::string> > const&, std::string*, std::string*, int*, char const*, cmSystemTools::OutputOption, std::chrono::duration<double, std::ratio<1l, 1l> >, cmProcessOutput::Encoding) ()
#3 0x00000000007cd870 in cmGlobalGenerator::Build(int, std::string const&, std::string const&, std::string const&, std::vector<std::string, std::allocator< std::string> > const&, std::string&, std::string const&, std::string const&, bool, bool, bool, std::chrono::duration<double, std::ratio<1l, 1l> >, cmSystemTools::OutputOption, std::vector<std::string, std::allocator< std::string> > const&) ()
#4 0x00000000007ce25a in cmGlobalGenerator::TryCompile(int, std::string const&, std::string const&, std::string const&, std::string const&, bool, std::string&, cmMakefile*) ()
#5 0x0000000000492543 in cmMakefile::TryCompile(std::string const&, std::string const&, std::string const&, std::string const&, bool, int, std::vector<std::string, std::allocator< std::string> > const*, std::string&) ()
#6 0x00000000008a4c66 in cmCoreTryCompile::TryCompileCode(std::vector<std::string, std::allocator< std::string> > const&, bool) ()
#7 0x000000000064c0b9 in cmTryCompileCommand::InitialPass(std::vector<std::string, std::allocator< std::string> > const&, cmExecutionStatus&) ()
#8 0x00000000005555dc in cmCommand::InvokeInitialPass(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&)
()
#9 0x0000000000555815 in cmLegacyCommandWrapper::operator()(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) const ()
#10 0x00000000004a3aba in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&, cm::optional< std::string>) ()
#11 0x00000000005e032e in cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction, std::allocator >, cmExecutionStatus&) ()
#12 0x00000000005d6f0c in cmFunctionBlocker::IsFunctionBlocked(cmListFileFunction const&, cmExecutionStatus&) ()
#13 0x00000000004a33c6 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&, cm::optional< std::string>) ()
#14 0x0000000000613ed1 in (anonymous namespace)::cmMacroHelperCommand::operator()(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) const ()
#15 0x00000000004a3aba in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&, cm::optional< std::string>) ()
#16 0x00000000005e032e in cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction, std::allocator >, cmExecutionStatus&) ()
#17 0x00000000005d6f0c in cmFunctionBlocker::IsFunctionBlocked(cmListFileFunction const&, cmExecutionStatus&) ()
#18 0x00000000004a33c6 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&, cm::optional< std::string>) ()
#19 0x00000000004a6c77 in cmMakefile::RunListFile(cmListFile const&, std::string const&, cmMakefile::DeferCommands*) [clone .constprop.786] ()
#20 0x00000000004a7262 in cmMakefile::ReadDependentFile(std::string const&, bool) ()
#21 0x00000000005e337e in cmIncludeCommand(std::vector<std::string, std::allocator< std::string> > const&, cmExecutionStatus&) ()
#22 0x00000000004f14f5 in std::_Function_handler<bool (std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&), cmState::AddBuiltinCommand(std::string const&, bool ()(std::vector<std::string, std::allocator< std::string> > const&, cmExecutionStatus&))::{lambda(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&)#1}>::_M_invoke(std::_Any_data const&, std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) ()
#23 0x00000000004a3aba in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&, cm::optional< std::string>) ()
#24 0x00000000004a422e in cmMakefile::RunListFile(cmListFile const&, std::string const&, cmMakefile::DeferCommands) ()
#25 0x00000000004a4ef2 in cmMakefile::Configure() ()
#26 0x00000000007dc216 in cmGlobalGenerator::Configure() ()
#27 0x00000000007eda83 in cmGlobalUnixMakefileGenerator3::Configure() ()
#28 0x000000000053fc61 in cmake::ActualConfigure() ()
#29 0x0000000000540f3d in cmake::Configure() ()
#30 0x000000000054dbb3 in cmake::Run(std::vector<std::string, std::allocator< std::string> > const&, bool) ()
#31 0x0000000000433095 in (anonymous namespace)::do_cmake(int, char const* const*) ()
#32 0x000000000041afb1 in main ()
(gdb)
cmake --trace
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(58): if(NOT DEFINED HAVE_SIGNAL OR x${HAVE_SIGNAL} STREQUAL xHAVE_SIGNAL )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(59): set(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=signal ${CMAKE_REQUIRED_FLAGS} )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(61): if(NOT CMAKE_REQUIRED_QUIET )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(62): message(CHECK_START Looking for signal )
– Looking for signal
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(64): if(CMAKE_REQUIRED_LINK_OPTIONS )
/home/kumarj/x1/x2/x3/2022.0.0/binaries/libical/ConfigureChecks.cmake(67): else()
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(68): set(CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(70): if(CMAKE_REQUIRED_LIBRARIES )
/home/kumarj/x1/x2/x3/2022.0.0/binaries/libical/ConfigureChecks.cmake(73): else()
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(74): set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(76): if(CMAKE_REQUIRED_INCLUDES )
/home/kumarj/x1/x2/x3/2022.0.0/binaries/libical/ConfigureChecks.cmake(79): else()
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(80): set(CHECK_FUNCTION_EXISTS_ADD_INCLUDES )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(83): if(CMAKE_C_COMPILER_LOADED )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(84): set(_cfe_source ${CMAKE_ROOT}/Modules/CheckFunctionExists.c )
/home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake(92): try_compile(HAVE_SIGNAL ${CMAKE_BINARY_DIR} ${_cfe_source} COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS} ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} ${CHECK_FUNCTION_EXISTS_ADD_INCLUDES} OUTPUT_VARIABLE OUTPUT )
CMake Warning (dev) at /home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake:92 (try_compile):
Policy CMP0066 is not set: Honor per-config flags in try_compile()
source-file signature. Run “cmake --help-policy CMP0066” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
For compatibility with older versions of CMake, try_compile is not honoring
caller config-specific compiler flags (e.g. CMAKE_C_FLAGS_DEBUG) in the
test project.
Call Stack (most recent call first):
ConfigureChecks.cmake:38 (check_function_exists)
CMakeLists.txt:320 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /home/kj/cmake-3.20.1/Modules/CheckFunctionExists.cmake:92 (try_compile):
Policy CMP0056 is not set: Honor link flags in try_compile() source-file
signature. Run “cmake --help-policy CMP0056” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
For compatibility with older versions of CMake, try_compile is not honoring
caller link flags (e.g. CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
ConfigureChecks.cmake:38 (check_function_exists)
CMakeLists.txt:320 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
I hope the above logs help in understanding the issue. Please let us know if we could try something else to get more information and/or fix it.
Thanks in advance.
Regards,
Prakash