CMake hung while compiling libical

Hi All,

While compiling libical using CMake on SLES12 - we see that CMake gets hung.
CMake details -

cmake --version

cmake version 3.5.2

On cranking gdb to CMake, we see the below backtrace.
(gdb) bt
#0 0x00007fe49d392a43 in __select_nocancel () from /lib64/libc.so.6
#1 0x0000000000ab5c5a in kwsysProcessWaitForPipe ()
#2 0x0000000000ab5780 in cmsysProcess_WaitForData ()
#3 0x000000000083b02d in cmSystemTools::RunSingleCommand(std::vector<std::string, std::allocator< std::string> > const&, std::string*, std::string*, int*, char const*, cmSystemTools::OutputOption, double) ()
#4 0x0000000000a05e07 in cmGlobalGenerator::Build(std::string const&, std::string const&, std::string const&, std::string const&, std::string&, std::string const&, std::string const&, bool, bool, bool, double, cmSystemTools::OutputOption, std::vector<std::string, std::allocator< std::string> > const&) ()
#5 0x0000000000a05756 in cmGlobalGenerator::TryCompile(std::string const&, std::string const&, std::string const&, std::string const&, bool, std::string&, cmMakefile*) ()
#6 0x00000000007dc3f4 in cmMakefile::TryCompile(std::string const&, std::string const&, std::string const&, std::string const&, bool, std::vector<std::string, std::allocator< std::string> > const*, std::string&) ()
#7 0x00000000008a806c in cmCoreTryCompile::TryCompileCode(std::vector<std::string, std::allocator< std::string> > const&) ()
#8 0x0000000000919bcc in cmTryCompileCommand::InitialPass(std::vector<std::string, std::allocator< std::string> > const&, cmExecutionStatus&) ()
#9 0x00000000008d57e1 in cmCommand::InvokeInitialPass(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) ()
#10 0x00000000007cd8bf in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#11 0x00000000008faa3f in cmIfFunctionBlocker::IsFunctionBlocked(cmListFileFunction const&, cmMakefile&, cmExecutionStatus&) ()
#12 0x00000000007daa64 in cmMakefile::IsFunctionBlocked(cmListFileFunction const&, cmExecutionStatus&) ()
#13 0x00000000007cd733 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#14 0x000000000090871a in cmMacroHelperCommand::InvokeInitialPass(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) ()
#15 0x00000000007cd8bf in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#16 0x000000000090871a in cmMacroHelperCommand::InvokeInitialPass(std::vector<cmListFileArgument, std::allocator > const&, cmExecutionStatus&) ()
#17 0x00000000007cd8bf in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#18 0x00000000008faa3f in cmIfFunctionBlocker::IsFunctionBlocked(cmListFileFunction const&, cmMakefile&, cmExecutionStatus&) ()
#19 0x00000000007daa64 in cmMakefile::IsFunctionBlocked(cmListFileFunction const&, cmExecutionStatus&) ()
#20 0x00000000007cd733 in cmMakefile::ExecuteCommand(cmListFileFunction const&, cmExecutionStatus&) ()
#21 0x00000000007ceb98 in cmMakefile::ReadListFile(cmListFile const&, std::string const&) ()
#22 0x00000000007d36a2 in cmMakefile::Configure() ()
#23 0x0000000000a01fcd in cmGlobalGenerator::Configure() ()
#24 0x0000000000a21fb2 in cmGlobalUnixMakefileGenerator3::Configure() ()
#25 0x00000000008625f4 in cmake::ActualConfigure() ()
#26 0x000000000086175f in cmake::Configure() ()
#27 0x000000000086333b in cmake::Run(std::vector<std::string, std::allocatorstd::string > const&, bool) ()
#28 0x000000000078a6d2 in do_cmake(int, char const* const*) ()
#29 0x0000000000789c9d in main ()
(gdb)

Could anyone help in fixing this.

Thanks,
Prakash

Does this happen on the latest version of CMake?

3.5.2 was a while ago.

Looks like it gets hung in a try-compile. Can you run cmake --trace and figure out which try_compile is hanging? Or do you see any output that might give a clue as to where it is stuck?