[CMake] CMake hangs on new install

Phil Smith phil at voltage.com
Wed Oct 27 16:12:21 EDT 2010


So....no ideas nowhere nohow?

We have:

-          Reinstalled CMake



-          Reinstalled Cygwin



-          Tried a tiny, two-line CMakeLists.txt in an empty directory:

cmake_minimum_required (VERSION 2.6)

project(TEMP C)


The command line to CMake (in a .bat file) is:

cmake -DCMAKE_TOOLCHAIN_FILE:string="%~dp0\zosport.cmake" -G"Unix Makefiles" .\



This works (well, works on the "good" machines, fails in the same way on the bad) from the command line in that otherwise empty directory, provided the %~dp0 is replaced with the appropriate path.



-          Tried CMake on the same machine, with a Windows build (the failing case is for cross-compiling - I should have noted that before); it worked.

So on this one machine, CMake isn't totally busted, but DOES NOT like cross-compiling. The contents of zosport.cmake are:

# 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>")

The IBM_ZOS.cmake in the Platform\ directory contains:

INCLUDE(Platform/UnixPaths)

And that's about all I can see that's specific to the cross-compiling. Since the problem occurs in the parameters it uses to call the compiler, it doesn't seem to be the compiler that's at fault.

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Phil Smith
Sent: Tuesday, October 26, 2010 8:12 PM
To: cmake at cmake.org
Subject: [CMake] CMake hangs on new install

This is driving me nuts, and it's almost certainly something dumb. One of my CMake users lost a hard drive and had to reimage.

Now she's installed CMake 2.8 and it LOOKS like it's all OK, but any attempt to do a CMake hangs because the attempt to compile CMakeCCompilerId.c winds up passing a bunch of flags and then "-o  CMakeCCompilerId.c" - that is, the -o flag, TWO spaces, and then CMakeCCompilerId.c. So there's no output file specification; the input filespec becomes the output, and the compiler dutifully waits for input from stdin.

Now, I think I've seen this before, but I'm damned if I can remember what causes it. As far as I can tell, the compiler call is generated within cmake.exe, which kinda makes it hard to debug.

Any ideas? Thanks in advance...
--
...phsiii

Phil Smith III
phil at voltage.com<mailto:phil at voltage.com>
Voltage Security, Inc.
www.voltage.com<http://www.voltage.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101027/f174e23d/attachment.htm>


More information about the CMake mailing list