On 3/24/2016 16:53, Brad King wrote:
Configuring libgit2 fails as CMake does not set CMAKE_SIZEOF_VOID_P
(nor CMAKE_C_SIZEOF_DATA_PTR), see the attached CMakeCCompiler.cmake file.
I tried to search CMake's source code to find out how the value of
@CMAKE_C_SIZEOF_DATA_PTR@ is determined in CMakeCCompiler.cmake.in,
but I failed. Does anyone have suggestions on how to debug this further,
or what the possible root causes might be?
It is supposed to be done here:
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerABI.cmake;hb=v3.5.0#l23
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeCCompilerABI.c;hb=v3.5.0
The try_compile produces a binary file that encodes strings with the
information. Then we use file(STRINGS) to parse the strings right out
of the binary. The INFO:sizeof_dptr[...] string contains the size of
data pointer types.
Check CMakeFiles/CMake{Output,Error}.log to see if anything went wrong
with that step that was logged. Otherwise you can add debugging code.
I also just realized CMAKE_C_ABI_COMPILER is set to FALSE in
CMakeCCompiler.cmake. Looking at CMakeError.log was a good hint. I
found:
---8<---
Building C object CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj
C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC -o
CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c "C:/Program
Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c"
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe -fPIC
-o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj -c \C:/Program
Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\'
CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed
---8<---
There seems to be some problem in escaping the non-alphanumeric chars
in the path to "CMakeCCompilerABI.c". Any hint how to debug this
further?
Regards,
Sebastian
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake