[CMake] CMakeSetup broken, fails in the root directory

Dataflow dataflow at mtnl.net.in
Fri Jul 28 12:11:07 EDT 2006


----- Original Message ----- 
From: "William A. Hoffman" <billlist at nycap.rr.com>
To: "Dataflow" <dataflow at vsnl.com>
Cc: <cmake at cmake.org>
Sent: Fri, 28 Jul 2006 6:03 PM
Subject: Re: [CMake] CMakeSetup broken, fails in the root directory


> So, the logs don't help much other than to show most of the
> stuff is working well.
>
> The trouble is coming from here:
> i:\tmp\CMake\Utilities\cmxmlrpc\CMake\TryCompileFromSource.cmake
>
>
>    SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
>     FILE(WRITE
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src2.c"
>       "${src}\n")
>     EXEC_PROGRAM("${CMAKE_COMMAND}"
>       "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp"
>       ARGS -E copy src2.c src.c)
>     MESSAGE(STATUS "Performing Test ${VAR}")
>     TRY_COMPILE(${VAR}
>       ${CMAKE_BINARY_DIR}
>       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
>       CMAKE_FLAGS
>       "${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}"
>       OUTPUT_VARIABLE OUTPUT)
>
>
> Which is called from here:
> Utilities/cmxmlrpc/CMakeLists.txt
>
> INCLUDE (TryCompileFromSource)
> SET(HEADER_INCLUDES "${CURRENT_INCLUDES}")
> TRY_COMPILE_FROM_SOURCE("va_list list1, list2; list1 = list2"
>   VA_LIST_ISNOT_ARRAY_DEFINE)
> SET(VA_LIST_IS_ARRAY_DEFINE 0)
> IF(NOT VA_LIST_ISNOT_ARRAY_DEFINE)
>   SET(VA_LIST_IS_ARRAY_DEFINE 1)
> ENDIF(NOT VA_LIST_ISNOT_ARRAY_DEFINE)
>
>
> Could you try this:
>
> In i:\tmp\CMake\Utilities\cmxmlrpc\CMake\TryCompileFromSource.cmake,
> add some message statements.
>
>
> message("src2.c =
[${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src2.c]")
> message("src.c =
[${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c]")
> message("CMAKE_COMMAND = ${CMAKE_COMMAND}")
>
>

The paths for src2.c and src.c look fine. However, the CMAKE_COMMAND shows:
C:/Program Files/CMake 2.4/bin/cmake.exe
i.e. *without* any quotes. I fear that the spaces in this filename are the
culprit.
For whatever it is worth, did I mention that this is Win98SE? Maybe should
try after quoting the filename..


> For some reason the copy is not happening or something like that....
>
> It does seem to be the only call of that macro in cmake.
>
> You could also try replacing it with:
>
> CHECK_C_SOURCE_COMPILES("va_list list1, list2; list1 = list2"
>   VA_LIST_ISNOT_ARRAY_DEFINE)
>
> in i:\tmp\CMake\Utilities\cmxmlrpc\CMakeLists.txt.
>
> -Bill
>

Yes, I did replace this, and the second call a few lines later. The
configuration DID go thru without any errors, confirming that the file copy
is not happening.
Since the paths are correct, it has to be the spaces in the filename. How
exactly to quote the entire filename?

The build, however is still not successful - It failed while:

Generating cmsysProcessFwd9xEnc.c
Bad command or file name

And the file 'cmsysProcessFwd9xEnc.c' is then not found as expected. Maybe
this also depends on -E copy somewhere else...?
Btw, with the same sources, the linux build went smoothly - the color output
looks great!

- Rajiv



>
>
> At 03:10 AM 7/28/2006, Dataflow wrote:
> >Dear Bill,
> >Here are the log files.
> >- Rajiv
> >
> >----- Original Message ----- 
> >From: "William A. Hoffman" <billlist at nycap.rr.com>
> >To: "Dataflow" <dataflow at vsnl.com>; <cmake at cmake.org>
> >Sent: Fri, 28 Jul 2006 1:21 AM
> >Subject: Re: [CMake] CMakeSetup broken, fails in the root directory
> >
> >
> >> At 12:02 PM 7/27/2006, Dataflow wrote:
> >>
> >> >----- Original Message ----- 
> >> >From: "William A. Hoffman" <billlist at nycap.rr.com>
> >> >To: "Dataflow" <dataflow at vsnl.com>; <cmake at cmake.org>
> >> >Sent: Thu, 27 Jul 2006 9:05 PM
> >> >Subject: Re: [CMake] CMakeSetup broken, fails in the root directory
> >> >
> >> >
> >> >> At 11:24 AM 7/27/2006, Dataflow wrote:
> >> >>
> >> >>
> >> >> >Sigh ~ Same results with 2.4.2....
> >> >> >Any other hints? Should I check anything manually?
> >> >> I am not sure what are the paths you are using?   Post
> >> >> the whole process of what you are doing to create the build,
> >> >> and any warnings or errors encountered during the process.
> >> >> Nmake Makefiles is another option as well, but you have to
> >> >> run CMakeSetup from a vcvars32.bat shell for vc6.
> >> >>
> >> >>
> >> >> -Bill
> >> >>
> >> >
> >> >1. Checked out CMake, in i:/tmp/CMake
> >> >2. Created a 'winbuild' dir inside it: i:/tmp/CMake/winbuild
> >> >3. To 2.4.2, gave source as 'i:/tmp/CMake', build destination as
> >> >'i:/tmp/CMake/winbuild'.
> >> >4. I am getting the error:
> >> >
> >> >Can not find: i:/tmp/CMake/winbuild/CMakeTmp/src.c
> >> >while performing Test VA_LIST_IS_NOT_ARRAY_DEFINE
> >> >
> >> >Followed with "Try Compile configure of Cmake failed."
> >> >
> >> >5. A little investigation shows that only two files contain reference
to
> >> >'src.c':
> >> >i:\tmp\CMake\Utilities\cmxmlrpc\CMake\TryCompileFromSource.cmake
> >> >i:\tmp\CMake\Modules\CheckCSourceCompiles.cmake
> >> >
> >> >The first one tries to copy 'src2.c' to 'src.c'. There does exist the
> >file
> >> >'src2.c' with the following contents in
> >i:\tmp\CMake\winbuild\CMakeTmp ----
> >> >-------
> >> >#include <stdio.h>
> >> >#include <stdarg.h>
> >> >#include <wchar.h>
> >> >
> >> >int main() { int x __attribute__((__unused__)) ; return 0; }
> >> >------
> >> >Of cource, the macros defined in these files would be used from a
number
> >of
> >> >places, so it still might be difficult to track. Does
> >> >'VA_LIST_IS_NOT_ARRAY_DEFINE' give you any hint?
> >> >
> >> >6. Can try nmake only tommorow. Now closing for the day..
> >> >7. Can wait till the next release in case you don't have time to
follow
> >this
> >> >build error. I can live with the work-around till then.
> >>
> >> Can you send tmp/CMake/winbuild/CMakeFiles/CMakeError.log and
> >CMakeOutput.log?
> >>
> >> -Bill
> >>
> >
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



More information about the CMake mailing list