CMake is not finding a usable cc on my cygwin system, I've tried many things.
Soren
somian08@gmail.com
Fri Jul 18 22:14:34 GMT 2025
Hello Cygwinstas,
Cygwin root is C:\ix\cygwin, just so you know.
This is the output I see: mintty screen dump:
$ cmake -G"Unix Makefiles" C:/Users/somia/Downloads/libjpeg-turbo-3.1.1/
cmake -G"Unix Makefiles" C:/Users/somia/Downloads/libjpeg-turbo-3.1.1/
-- The C compiler identification is GNU 12.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /c/ix/cygwin/bin/cc
-- Check for working C compiler: /c/ix/cygwin/bin/cc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/c/ix/cygwin/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/c/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-PYyzjN'
Run Build Command(s): /usr/bin/cmake.exe -E env VERBOSE=1
/c/perl/c/bin/gmake.exe -f Makefile cmTC_de473/fast
C:/perl/c/bin/gmake -f CMakeFiles/cmTC_de473.dir/build.make
CMakeFiles/cmTC_de473.dir/build
gmake[1]: Entering directory
'C:/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-PYyzjN'
Building C object CMakeFiles/cmTC_de473.dir/testCCompiler.c.o
/c/ix/cygwin/bin/cc -o
CMakeFiles/cmTC_de473.dir/testCCompiler.c.o -c
/c/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-PYyzjN/testCCompiler.c
/usr/bin/sh: /c/ix/cygwin/bin/cc: No such file or directory
gmake[1]: *** [CMakeFiles/cmTC_de473.dir/build.make:78:
CMakeFiles/cmTC_de473.dir/testCCompiler.c.o] Error 127
gmake[1]: Leaving directory
'C:/Users/somia/build/libjpeg-turbo/CMakeFiles/CMakeScratch/TryCompile-PYyzjN'
gmake: *** [Makefile:127: cmTC_de473/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:16 (project)
-- Configuring incomplete, errors occurred!
If I clean out all cached data in my build dir and set `CC=/bin/gcc';
export CC' is get another error:
cmake -G"Unix Makefiles" C:/Users/somia/Downloads/libjpeg-turbo-3.1.1/
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:49
(message):
Could not find compiler set in environment variable CC:
/bin/gcc.
Call Stack (most recent call first):
CMakeLists.txt:16 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
I hear people saying good things about CMake but this is maddening.
My cmake is newly installed in /usr/bin/cmake and is version 3.30.1
I'm trying to build libjpeg-turbo as my pathnames above would suggest.
-- Soren
More information about the Cygwin
mailing list