Skip to content

Cannot build library with vendored zmq v0.9 for x86_64-linux-android #1167

Closed
@berendsliedrecht

Description

@berendsliedrecht

I am trying to build a library with zmq v0.9 installed. it uses the vendored feature to build the library, but I am running into issues with the build step of zmq-sys.

I am on a Linux 6.0.11 host and using the latest cross version.

These two parts of the stacktrace caught my eye:

  1. Android: Neither the NDK or a standalone toolchain was found.
  2. CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

Reproduce:

git clone https://github.com/hyperledger/indy-vdr.git
cd indy-vdr
cross build --release --package=indy-vdr --target=x86_64-linux-android

also, I can not upgrade to zmq v0.10 (which does not have this issue, as some features do not work anymore which are required.)

Can supply more information if required.

Stacktrace

error: failed to run custom build command for `zmq-sys v0.11.0`

Caused by:
  process didn't exit successfully: `/indy-vdr/target/release/build/zmq-sys-a063d12abe243d3b/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build/main.rs
  cargo:rerun-if-env-changed=PROFILE
  CMAKE_TOOLCHAIN_FILE_x86_64-linux-android = None
  CMAKE_TOOLCHAIN_FILE_x86_64_linux_android = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-linux-android = None
  CMAKE_GENERATOR_x86_64_linux_android = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-linux-android = None
  CMAKE_PREFIX_PATH_x86_64_linux_android = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-linux-android = None
  CMAKE_x86_64_linux_android = None
  TARGET_CMAKE = None
  CMAKE = None
  running: "cmake" "/tmp/.cargo/registry/src/github.com-1ecc6299db9ec823/zeromq-src-0.1.10+4.3.2/vendor" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_C_STANDARD=99" "-DZMQ_BUILD_TESTS=OFF" "-DENABLE_DRAFTS=OFF" "-DENABLE_CURVE=ON" "-DCMAKE_BUILD_TYPE=Release" "-DWITH_PERF_TOOL=OFF" "-DBUILD_SHARED=OFF" "-DBUILD_STATIC=ON" "-DWITH_LIBSODIUM=OFF" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_PROCESSOR=x86_64" "-DCMAKE_INSTALL_PREFIX=/indy-vdr/target/x86_64-linux-android/release/build/zmq-sys-97e6da94ca174955/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/android-ndk/bin/x86_64-linux-android-gcc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/android-ndk/bin/x86_64-linux-android-g++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/android-ndk/bin/x86_64-linux-android-gcc"
  -- Configuring incomplete, errors occurred!

  --- stderr
  CMake Error at /usr/local/share/cmake-3.23/Modules/Platform/Android-Determine.cmake:209 (message):
    Android: Neither the NDK or a standalone toolchain was found.
  Call Stack (most recent call first):
    /usr/local/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:160 (include)
    CMakeLists.txt:2 (project)


  CMake Warning (dev) in /usr/local/share/cmake-3.23/Modules/Platform/Android-Determine.cmake:
    Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
    and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
    cmake_policy command to set the policy and suppress this warning.

    The included script

      /usr/local/share/cmake-3.23/Modules/Platform/Android-Determine.cmake

    affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
    compatibility, so the effects are applied to the including context.
  Call Stack (most recent call first):
    /usr/local/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:160 (include)
    CMakeLists.txt:2 (project)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /tmp/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.49/src/lib.rs:1104:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions