Host Environment
- OS: Windows 10
- Compiler: Android NDK r24 / CLang
To Reproduce
Steps to reproduce the behavior:
./vcpkg install zziplib:arm64-android
Failure logs
This is the log (note that the dependency zlib built successfully in a previous run of the command)
Computing installation plan...
The following packages will be built and installed:
zziplib[core]:arm64-android -> 0.13.72
Detecting compiler hash for triplet arm64-android...
Restored 0 packages from C:\Users\Michael\AppData\Local\vcpkg\archives in 300.8 us. Use --debug to see more details.
Installing 1/1 zziplib:arm64-android...
Building zziplib[core]:arm64-android...
-- Using community triplet arm64-android. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: C:\Projekte\Tools\vcpkg\triplets\community\arm64-android.cmake
-- Using cached gdraheim-zziplib-v0.13.72.tar.gz.
-- Cleaning sources at C:/Projekte/Tools/vcpkg/buildtrees/zziplib/src/v0.13.72-92df923ffc.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Projekte/Tools/vcpkg/downloads/gdraheim-zziplib-v0.13.72.tar.gz
-- Applying patch no-release-postfix.patch
-- Using source at C:/Projekte/Tools/vcpkg/buildtrees/zziplib/src/v0.13.72-92df923ffc.clean
-- Configuring arm64-android
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:83 (message):
Command failed: C:/Projekte/Tools/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v
Working Directory: C:/Projekte/Tools/vcpkg/buildtrees/zziplib/arm64-android-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\Projekte\Tools\vcpkg\buildtrees\zziplib\config-arm64-android-out.log
Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:238 (vcpkg_execute_required_process)
ports/zziplib/portfile.cmake:13 (vcpkg_cmake_configure)
scripts/ports.cmake:146 (include)
error: building zziplib:arm64-android failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+zziplib
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[zziplib]+Build+error
Include '[zziplib] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
vcpkg-scripts version: 8e1f46de1 2022-06-10 (17 hours ago)
Attached is the mentioned file
config-arm64-android-out.log
Additional context
I think the issue is with cross-compiling on Windows for Android:
Could NOT find UnixCommands (missing: BASH CP GZIP MV RM)
The error comes from this line:
https://github.com/gdraheim/zziplib/blob/7f8e01b5fa7f076bbe4f026d6a30160272da69fe/zzip/CMakeLists.txt#L39
and is triggered via:
https://github.com/gdraheim/zziplib/blob/7f8e01b5fa7f076bbe4f026d6a30160272da69fe/zzip/CMakeLists.txt#L22
I think from reading the CMake docs, the if(UNIX) line is wrong, as it checks if the cross-compiling target system is a Unix-like system (which Android is), but the unix tools are required on the build host, which is a Windows one in my case. So the fix would be to check for if(CMAKE_HOST_UNIX) instead. Do you agree?
Host Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install zziplib:arm64-androidFailure logs
This is the log (note that the dependency zlib built successfully in a previous run of the command)
Attached is the mentioned file
config-arm64-android-out.log
Additional context
I think the issue is with cross-compiling on Windows for Android:
The error comes from this line:
https://github.com/gdraheim/zziplib/blob/7f8e01b5fa7f076bbe4f026d6a30160272da69fe/zzip/CMakeLists.txt#L39
and is triggered via:
https://github.com/gdraheim/zziplib/blob/7f8e01b5fa7f076bbe4f026d6a30160272da69fe/zzip/CMakeLists.txt#L22
I think from reading the CMake docs, the
if(UNIX)line is wrong, as it checks if the cross-compiling target system is a Unix-like system (which Android is), but the unix tools are required on the build host, which is a Windows one in my case. So the fix would be to check forif(CMAKE_HOST_UNIX)instead. Do you agree?