JDK-8262123 : Problem building webkit on Windows 10: sh: cygpath: command not found
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: openjfx15
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2021-02-18
  • Updated: 2021-05-11
  • Resolved: 2021-05-11
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10 64-bit
OpenJDK 11.0.10 64-bit
Can be reproduced while building OpenJFX 15.0.2 and master (17)

A DESCRIPTION OF THE PROBLEM :
Hello everyone,

I was hoping you could help me to figure out why I can't build webkit on my Windows 10 machine. I think I did everything according to the instructions on https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX, but it still doesn't work.

It seems that by some reason it can't execute cygpath command from a perl script:

> Task :web:compileNativeWin
Caching disabled for task ':web:compileNativeWin' because:
  Build cache is disabled
Task ':web:compileNativeWin' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Starting process 'command 'perl''. Working directory: C:\openjfx-src\jfx\modules\javafx.web\build\win Command: perl C:\openjfx-src\jfx\modules\javafx.web/src/main/native/Tools/Scripts/set-webkit-configuration --Release
Successfully started process 'command 'perl''
Starting process 'command 'perl''. Working directory: C:\openjfx-src\jfx\modules\javafx.web\build\win Command: perl C:\openjfx-src\jfx\modules\javafx.web/src/main/native/Tools/Scripts/build-webkit --java --icu-unicode --64-bit --no-experimental-features --cmakeargs= -DEN
ABLE_TOOLS=1 -DCMAKE_C_COMPILER='C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/Hostx64/x64/cl.exe' -DJAVAFX_RELEASE_VERSION=17
Successfully started process 'command 'perl''
sh: cygpath: command not found
sh: cygpath: command not found
Can't exec "uname": No such file or directory at /cygdrive/c/openjfx-src/jfx/modules/javafx.web/src/main/native/Tools/Scripts/webkitdirs.pm line 366.
sh: cygpath: command not found
+  cmake -DPORT="Java" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G Ninja -DSHOW_BINDINGS_GENERATION_PROGRESS=1 -DDEVELOPER_MODE=ON  -DENABLE_TOOLS=1 -DCMAKE_C_COMPILER='C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10
.25017/bin/Hostx64/x64/cl.exe' -DJAVAFX_RELEASE_VERSION=17 ""
CMake Error: The source directory "C:/cygwin64/Release" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

> Task :web:compileNativeWin FAILED
:web:compileNativeWin (Thread[Execution worker for ':' Thread 2,5,main]) completed. Took 21.571 secs.

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\openjfx-src\jfx\build.gradle' line: 3453

* What went wrong:
Execution failed for task ':web:compileNativeWin'.
> Process 'command 'perl'' finished with non-zero exit value 1

I can run fine cygpath in the terminal:

> which cygpath
/usr/bin/cygpath

>  cygpath -w "/cygdrive/c/Windows"
C:\Windows

Has anyone seen such an issue? How could I debug and fix it?

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Follow the instructions from https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX while building on Windows 10.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Success build.
ACTUAL -
Failed build with error:
sh: cygpath: command not found

---------- BEGIN SOURCE ----------
not required, build issue
---------- END SOURCE ----------

FREQUENCY : always



Comments
Additional information from submitter: =========================== No, the issue is not reproducible. My colleague has already done what we needed, so you can close this ticket.
11-05-2021

Additional information from submitter: =========================== Yes, all cygwin packages are installed and I use cygwin shell. Do you maybe know which exact versions of the tools are required to build OpenJfx? My colleague is also trying to build it and it doesn't work for him as well. That makes me think that the wiki https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX could provide a bit more details on how to do that on Windows.
02-03-2021

There isn't enough information to know what the problem is. We build JavaFX WebKit on many different Windows 10 systems and haven't seen this problem. One thing to check is to ensure that all needed cygwin packages are installed. Also, the build must be run from a cygwin bash shell and not a Windows command shell, so that should be checked too.
22-02-2021

This doesn't look related to JDK-8261927, which is a very specific compilation failure that was recently introduced. The error in the description of this bug indicates a failure during the configuration step, well before it starts the actual compilation. This more likely indicates some sort of configuration problem relating to cygwin or perl on the bug reporter's system.
22-02-2021