Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[miniz] build failure on <any>-android with ndk 27 #40260

Closed
bwrsandman opened this issue Aug 3, 2024 · 2 comments · Fixed by #40261
Closed

[miniz] build failure on <any>-android with ndk 27 #40260

bwrsandman opened this issue Aug 3, 2024 · 2 comments · Fixed by #40261
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@bwrsandman
Copy link
Contributor

bwrsandman commented Aug 3, 2024

Operating system

Linux

Compiler

Clang

Steps to reproduce the behavior

  1. download android ndk r27 and set android home environment variables
export ANDROID_NDK_HOME=$HOME/Downloads/android-ndk-r27/
run `vcpkg install miniz:arm-android`

Failure logs

  Installing 7/25 miniz:arm-neon-android@3.0.2...
  Building miniz:arm-neon-android@3.0.2...
  -- Downloading https://github.com/richgel999/miniz/archive/3.0.2.tar.gz -> richgel999-miniz-3.0.2.tar.gz...
  -- Extracting source /home/runner/work/openblack/openblack/vcpkg/downloads/richgel999-miniz-3.0.2.tar.gz
  -- Using source at /home/runner/work/openblack/openblack/vcpkg/buildtrees/miniz/src/3.0.2-c35177adc0.clean
  -- Found external ninja('1.12.1').
  -- Configuring arm-neon-android
  [LogCollection][Start]File:'/home/runner/work/openblack/openblack/vcpkg/buildtrees/miniz/config-arm-neon-android-out.log':
  [1/2] "/home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/bin/cmake" -E chdir ".." "/home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/bin/cmake" "/home/runner/work/openblack/openblack/vcpkg/buildtrees/miniz/src/3.0.2-c35177adc0.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=/home/runner/work/openblack/openblack/vcpkg/packages/miniz_arm-neon-android" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DBUILD_EXAMPLES=OFF" "-DINSTALL_PROJECT=ON" "-DCMAKE_MAKE_PROGRAM=/home/runner/work/_temp/-1270035933/ninja" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_VERSION=21" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/runner/work/openblack/openblack/vcpkg/scripts/toolchains/android.cmake" "-DVCPKG_TARGET_TRIPLET=arm-neon-android" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=external" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=/home/runner/work/openblack/openblack/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=arm" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=/home/runner/work/openblack/openblack/vcpkg" "-D_VCPKG_INSTALLED_DIR=/home/runner/work/openblack/openblack/cmake-build-presets/android-armeabi-v7a-vcpkg/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DANDROID_ABI=armeabi-v7a" "-DANDROID_ARM_NEON=ON"
  FAILED: ../CMakeCache.txt 
  "/home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/bin/cmake" -E chdir ".." "/home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/bin/cmake" "/home/runner/work/openblack/openblack/vcpkg/buildtrees/miniz/src/3.0.2-c35177adc0.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=/home/runner/work/openblack/openblack/vcpkg/packages/miniz_arm-neon-android" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DBUILD_EXAMPLES=OFF" "-DINSTALL_PROJECT=ON" "-DCMAKE_MAKE_PROGRAM=/home/runner/work/_temp/-1270035933/ninja" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_VERSION=21" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/runner/work/openblack/openblack/vcpkg/scripts/toolchains/android.cmake" "-DVCPKG_TARGET_TRIPLET=arm-neon-android" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=external" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=/home/runner/work/openblack/openblack/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=arm" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=/home/runner/work/openblack/openblack/vcpkg" "-D_VCPKG_INSTALLED_DIR=/home/runner/work/openblack/openblack/cmake-build-presets/android-armeabi-v7a-vcpkg/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DANDROID_ABI=armeabi-v7a" "-DANDROID_ARM_NEON=ON"
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.
  
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  
  
  -- The C compiler identification is Clang 18.0.1
  CMake Warning (dev) at /usr/local/lib/android/sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if):
    Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
    --help-policy CMP0057" for policy details.  Use the cmake_policy command to
    set the policy and suppress this warning.
  
    IN_LIST will be interpreted as an operator when the policy is set to NEW.
    Since the policy is not set the OLD behavior will be used.
  Call Stack (most recent call first):
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include)
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/Platform/Android-Clang-C.cmake:1 (include)
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/CMakeCInformation.cmake:48 (include)
    CMakeLists.txt:13 (project)
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  CMake Error at /usr/local/lib/android/sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if):
  Error:   if given arguments:
  
      "hwaddress" "IN_LIST" "ANDROID_SANITIZE"
  
    Unknown arguments specified
  Call Stack (most recent call first):
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include)
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/Platform/Android-Clang-C.cmake:1 (include)
    /home/runner/work/_temp/-1270035933/cmake-3.30.1-linux-x86_64/share/cmake-3.30/Modules/CMakeCInformation.cmake:48 (include)
    CMakeLists.txt:13 (project)

Additional context

android/ndk#2032

@bwrsandman bwrsandman added the category:port-bug The issue is with a library, which is something the port should already support label Aug 3, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Aug 4, 2024

So the NDK no longer supports projects which are compatible with older versions of CMake.
Was this report as a NDK bug?

@bwrsandman
Copy link
Contributor Author

I found this discussion from June android/ndk#2032

@JonLiu1993 JonLiu1993 self-assigned this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants