Cygwin support for CMake broken in VS2019 image due to capitalisation change

rleigh's Avatar

rleigh

06 Jun, 2021 09:35 PM

Hi,

This regressed a few months back, but I didn't have a chance to investigate until now.

Here is a build log demonstrating the problem: https://ci.appveyor.com/project/rleigh-codelibre/libtiff-dacmq/buil...
This is the appveyor.yml: https://gitlab.com/rleigh/libtiff/-/blob/8fddfbb3f6b54ebbe37dae6ed1...

When running CMake, you get this error:

if %compiler%==cygwin-cmake C:\Cygwin64\bin\cmake.exe --version || echo CMake not found
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/cygdrive/c/Cygwin64/share/cmake-3.20.0
cmake version 3.20.0

And that error is correct. If you look at the end of the above log, you'll see that the share directory does not exist:

if %compiler%==cygwin-cmake bash -c "ls /cygdrive/c/Cygwin64/share"
ls: cannot access '/cygdrive/c/Cygwin64/share': No such file or directory

This can be trivially reproduced from a CMD shell:

C:\Users\rleigh>PATH=c:\Cygwin64\bin;%PATH%

C:\Users\rleigh>cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/cygdrive/c/Cygwin64/share/cmake-3.20.0
cmake version 3.20.0

However, adjust the capitalisation:

C:\Users\rleigh>PATH=c:\cygwin64\bin;%PATH%

C:\Users\rleigh>cmake --version
cmake version 3.20.0

and now it works...

Here's a working build: https://ci.appveyor.com/project/rleigh-codelibre/libtiff-dacmq/buil...
And the corresponding configuration: https://gitlab.com/rleigh/libtiff/-/blob/ci-reenable-cygwin/.appvey...

It looks like the root cause of this was a change in capitalisation of the Cygwin installation directory from C:\Cygwin64C:\cygwin64 in the AppVeyor VS2019 image. Updating the .appveyor.yml configuration to match seems to rectify the problem. Looks like the change happened about two months ago, when we started seeing breakage in https://ci.appveyor.com/project/rleigh-codelibre/libtiff-didfs/history . If it wasn't a change in the AppVeyor image, maybe it was in Cygwin itself.

Either way, I wanted to mention this so that you would be aware that changing the Cygwin capitalisation again in the future is likely to cause similar problems.

Kind regards,
Roger

  1. Support Staff 1 Posted by Feodor Fitsner on 14 Jun, 2021 05:31 PM

    Feodor Fitsner's Avatar

    Hi Roger,

    Thanks for letting know!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac