On Mon, Jul 21, 2025 at 3:12 PM 'DRC' via libjpeg-turbo User Discussion/Support wrote:
> Strange. Our build system relies upon CMAKE_SIZEOF_VOID_P in order to > determine whether the build is 32-bit or 64-bit. CMAKE_SIZEOF_VOID_P is > set by CMake from CMAKE_C_SIZEOF_DATA_PTR. Generally that happens when > CMake detects the C compiler ABI, which occurs in the body of the project() > directive. The fact that C compiler ABI detection is failing is probably > related (although I've seen ABI detection fail without causing any further > issues in the build.) > Ok, I understand that well enough. > This thread seems to describe a similar issue, which was ultimately caused > by a mismatch between MinGW and non-MinGW build tools in the PATH. > > https://cmake.org/pipermail/cmake/2016-March/063077.html > > I would suggest the same diagnostic steps described in that thread: > > 1. Look at > ${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}/CMakeCCompiler.cmake, > and verify that CMAKE_C_SIZEOF_DATA_PTR and/or CMAKE_C_ABI_COMPILER are > incorrectly set. > Starting at line 44 in that file, I see the following: # Save compiler ABI information. set(CMAKE_C_SIZEOF_DATA_PTR "") set(CMAKE_C_COMPILER_ABI "") I did not see CMAKE_C_ABI_COMPILER anywhere in that file, but the diagnosis is clear enough: SIZEOF_DATA_PTR is not set. > 2. Examine the CMake error log to determine why C compiler ABI detection > failed. > > 3. Try to reproduce the failure with a simple CMake test. > > 4. Make sure that you aren't accidentally using non-Cygwin versions of GNU > Make or CMake. > I'm also looking at CMakeConfigureLog.yaml and starting at line 54 I see: Run Build Command(s): /usr/bin/cmake.exe -E env VERBOSE=1 /cygdrive/c/perl/c/bin/gmake.exe -f Makefile cmTC_46c61/fast C:/perl/c/bin/gmake -f CMakeFiles/cmTC_46c61.dir/build.make CMakeFiles/cmTC_46c61.dir/build gmake[1]: Entering directory 'C:/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-S4sTaD' gmake[1]: *** No rule to make target '/usr/share/cmake-3.28.3/Modules/CMakeCCompilerABI.c', needed by 'CMakeFiles/cmTC_46c61.dir/CMakeCCompilerABI.c.o'. Stop. gmake[1]: Leaving directory 'C:/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-S4sTaD' gmake: *** [Makefile:127: cmTC_46c61/fast] Error 2 exitCode: 2 Somehow CMake was picking up the gmake under a mingw path late in my $PATH environment, which makes me wonder if CMake preferentially chooses a make named "gmake" over a simple "make". I know that's a wild guess. I am embarrassed (and grateful) and am going to really clean up my env ($PATH) and rerun from scratch; what I see then I will continue writing down results in this message ... ok (a little later) YOU KNOW WHAT, it is fixed. YEAH! Your suggested steps for locating the cause of the failure were spot-on. Thank you very much! I now see: At line 44 in CMakeCCompiler.cmake: # Save compiler ABI information. set(CMAKE_C_SIZEOF_DATA_PTR "8") set(CMAKE_C_COMPILER_ABI "") I'm happy to report that libjpeg-turbo builds completely on Cygwin once such mistakes are unmade. I've learned quite a lesson with this problem. Best regards, Soren -- You received this message because you are subscribed to the Google Groups "libjpeg-turbo User Discussion/Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to libjpeg-turbo-users+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/libjpeg-turbo-users/CAGB_HuTM9NBkuLPiNLfJww0YtBDd4RWNG-LX3LyZ%2B-LqpSyA0g%40mail.gmail.com.