Building from source will not terminate even if Gradle build has failed
Description
When building the project from source with cargo xtask build-alxr-pico (or any HMD client for that matter), should the Gradle fail to build (either because CMake was not of exact version 3.22.1, or Ninja was not in the path, or there is any network connection issue that failed the dependency resolution, or any other uncovered failing condition), the build process does not panic or report any issue. It will just stuck at Compiling alxr-engine-sys v0.11.0 and hang indefinitely.
Attached is the Gradle daemon output. daemon-5472.out.log
General Troubleshooting
- [x] I carefully followed the instructions in the README and successfully completed the setup wizard
- [x] I read the ALVR Wikis here and here
Environement
Hardware
Note: for Linux, an upload to the hw-probe database is preferred: hw-probe -all -upload
CPU: Intel Core i5-7500
GPU: Nvidia RTX 2060
Audio: (Built-in Realtek driver)
Installation
ALVR Version: master@d366dd5
SteamVR Version: (not related)
Install Type:
- [ ] Packaged (
exe,deb,rpm, etc) - [ ] Portable (
zip) - [x] Source
OS Name and Version (winver on Windows or grep PRETTY_NAME /etc/os-release on most Linux distributions): Windows 10 22H2 (19045.3208)
After fiddling around watching the daemon output, the Gradle build is now successful. However, the cargo side is still stuck at alxr-engine-sys(build). It seems that the cargo side never received anything from Gradle. I am not familiar with Rust so I am not sure what to do next (besides learning Rust).
For anyone encountering this issue, here is a workaround that can at least yield an apk file in the final output.
- Figure out where your Gradle is. Check
GRADLE_HOME. Your Gradle daemon output is at${GRADLE_HOME}/daemon/7.3.3/daemon-${GRADLE_PID}.out.log. This log is being actively written on. Usetail -for an editor that can automatically reload as the file is being changed. - Watch the log file output. You should wait until you see
BUILD SUCCESSFUL. If you seeBUILD FAILED, then you will have to resolve the issues raised by Gradle and try again. Note that in the current version (d366dd5, submitted on 2023-08-03), you will need to use CMake==3.22.1. Using the latest CMake WILL NOT WORK. You can, however, use the latestninja. -
Kill the
java.exein the task manager. The Java process should have the same PID with${GRADLE_PID}. You can also usetaskkill /f /pid ${GRADLE_PID} - The compilation procedure will now continue.
I am not sure if this is the intended way of building ALXR Android Client on Windows. But at least it would produce an apk file.