In reply to Brian Inglis, with acknowledgement to Kevin Schnitzius for his reply also. There's nothing in my setup that I know of that would account for this odd behavior. CMake is munging the paths tools in the configuration stage of its operation. OK, point by point (much detail follows): On Fri, Jul 18, 2025 at 7:36 PM Brian Inglis via Cygwin <cygwin@cygwin.com> wrote:
> 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 > Yes, that is my cmake, Brian. Here's what `cygcheck' says: $ cygcheck -i --inst cmake Fetching setup.ini from cygwin.com... Installed package: ------------------ Name : cmake Version : 3.28.3 Release : 1 Architecture: x86_64 Install Date: Fri Jul 18 13:18:25 2025 Size : 14383900 (14 M) Categories : Devel Source : cmake-3.28.3-1-src.tar.xz Summary : Cross-platform makefile generation system ... Cygcheck -i --curr says the current (latest) cmake is what I have: Latest available package: ------------------------- Name : cmake Version : 3.28.3 Are you using a testing release of cmake, Brian? I have two cmakes, according to which -a cmake: which -a cmake /usr/bin/cmake /cygdrive/c/ix/msys64/usr/bin/cmake /cygdrive/c/ix/msys64/usr/bin/cmake --version cmake version 3.30.1 I don't know why or how, that msys64 path-element comes very near the end of my PATH, but when I cited "3.30.1" as my cmake version in my initial message, that must have been the one I was picking up. I am going to move that msys cmake out and away just to make sure it isn't the one trying to configure for me. About gcc: $ ls -Ggl /bin/cc > lrwxrwxrwx 1 7 Aug 2 2024 /bin/cc -> gcc.exe > > I get the positive output corresponding to yours: lrwxrwxrwx 1 7 Jul 18 13:18 /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? > > I am running from the mintty terminal with bash from the shortcut set up by cygwin setup.exe on my desktop, not a CMD shell or a DOS "box". My setup is very standard ("bog ordinary" ;-) for Cygwin and I don't have this sort of problem building other projects (for example, recently, libpng). You should also be using Cygwin paths not DOS/Windows device paths, which > may > not work with Cygwin tools. > In my experience nearly all cygwin tools work with "mixed-mode" pathnames which are <drive>:/a/path/to/anywhere, the only exception I've become aware of is GnuPG (gpg). I'm not sure why the path to the libjpeg-turbo source tree was specified as a mixed-mode path, I was just in the flow of starting this new effort and didn't notice that. > If you want to work in the Windows environment and do Windows builds, try > Msys2. > > -- > Take care. Thanks, Brian Inglis Calgary, Alberta, Canada > Thanks Brian, I appreciate your time. -- Soren -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple