[CMake] CMake hangs on new install

Bill Hoffman bill.hoffman at kitware.com
Wed Nov 3 10:42:11 EDT 2010


On 11/2/2010 10:05 AM, Phil Smith wrote:
> Is anyone else successfully using a toolchain file for an in-source build with 2.8.2 or later? We can't be the only ones?! I've reduced this to a relatively minimal case, but it doesn't fail on the first TryCompile, so I can't just stuff in a dummy "compiler".
>
> With the toolchain file below (repeated for readability, but same as that shown WAY below) and a minimal CMakeLists.txt:
> ------------
> cmake_minimum_required (VERSION 2.6)
> project(TEMP C)
> ------------
> ...it still hangs with 2.8.3-rc4.
>
> Here's the CMake command:
> cmake -DCMAKE_TOOLCHAIN_FILE:string="./zosport.cmake" -G"Unix Makefiles" ./
>
> and zosport.cmake:
> ------------
> # This is a CMake Toolchain file, required for cross-compiling using
> # the Dignus cross-compilers on Windows, compiling for z/OS.
> # Tell CMAKE the target system name
> SET(CMAKE_SYSTEM_NAME "IBM_ZOS")
> # Specify the cross-compilers
> SET(CMAKE_C_COMPILER   "regina.exe" "cc.rex dcc.exe")
> SET(CMAKE_CXX_COMPILER "regina.exe" "cc.rex dcxx.exe")
> SET(CMAKE_C_CREATE_STATIC_LIBRARY "DAR -rv<TARGET>  <OBJECTS>")
> SET(CMAKE_CXX_LINK_EXECUTABLE "plink.exe \"-S$ENV{DIGNUS_PROGRAM}/objs_norent/&M\"<OBJECTS>  -o<TARGET>")
> SET(CMAKE_C_LINK_EXECUTABLE   "plink.exe \"-S$ENV{DIGNUS_PROGRAM}/objs_norent/&M\"<OBJECTS>  -o<TARGET>")
> ------------
>
> Note that the reason for cc.rex as the "compiler" is that our cross-compiler is an old-school two-stage compiler (C to assembler, assembler to object). So cc.rex combines both stages into one. This is how we're able to see the missing output file (and double space) after the -o option. We've been using this cc.rex for 2.5 years; I'm pretty confident it isn't the problem.
>
> Anyone? Bueller???
>

Can you post the generated build files for the try-compile that hangs?

Run cmake with --debug-trycompile to get it to save the files.

Although since it hangs, I guess CMake never gets around to removing the 
files.

Anyway if you could tar up the build tree, I can take a look.

-Bill





More information about the CMake mailing list