Simply put, there was a bad PATH to cygpath.exe

I think this is what was happening ...

During the first pass of a build after clean, the system PATH at that time is saved in
        home/build/windows_tools.properties
 as WINDOWS_VS_PATH.

On subsequent builds, setupTools() sees that windows_tools.properties exists, so uses it. Then WINDOWS_VS_PATH is updated in win.gradle setupTools() to merge the current path. However, what is in windows_tools.properties, in my case a bad c:\cygwin64\bin 'wins' over c:\cygwin\bin which is in the correct current path.

I didn't puzzle how this can happen exactly. I would have expected to see both c:\cygwin64\bin and c:\cygwin\bin in the new WINDOWS_VS_PATH.

Subsequently, WINDOWS_VS_PATH replaces its old value in WINDOWS_NATIVE_COMPILE_ENVIRONMENT. And hence my problem, make-shell-cygpath could not find cygpath.exe.

My quick fix was to delete [home]/build/windows_tools.properties and then things started to work much better.

The origin of the problem was that I had at one time installed cygwin64, but I later replaced it with cygwin32 and the old location got stuck in windows_tools.properties.

If I had been smarter, I would have just done gradle clean after changing the tools!

Robin

Reply via email to