CMake is not finding a usable cc on my cygwin system, I've tried many things.
Brian Inglis
Brian.Inglis@SystematicSW.ab.ca
Fri Jul 18 23:34:51 GMT 2025
On 2025年07月18日 16:14, Soren via Cygwin wrote:
> 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.
Cygwin current cmake is 3.31.3.
It looks like you are running a Windows cmake.
Try:
$ which -a cmake
/usr/bin/cmake
$ ls -Ggl /bin/cc
lrwxrwxrwx 1 7 Aug 2 2024 /bin/cc -> gcc.exe
Are you running from a Cygwin terminal+/-shell, did you run Cygwin.bat, or set
up a DOS/cmd environment with Cygwin bin at the start of your PATH?
You should also be using Cygwin paths not DOS/Windows device paths, which may
not work with Cygwin tools.
If you want to work in the Windows environment and do Windows builds, try Msys2.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the Cygwin
mailing list