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

[openssl] build failure for arm64-android using manifest mode #37036

Closed
rwalworth opened this issue Feb 28, 2024 · 5 comments
Closed

[openssl] build failure for arm64-android using manifest mode #37036

rwalworth opened this issue Feb 28, 2024 · 5 comments
Assignees
Labels
category:question This issue is a question Stale

Comments

@rwalworth
Copy link

Package: openssl:arm64-android@3.2.1

Host Environment

  • Host: x64-linux
  • Compiler: Clang 17.0.2
  • vcpkg-tool version: 2024-02-07-8a83681f921b10d86ae626fd833c253f4f8c355b
    vcpkg-scripts version: fba75d0 2024-02-14 (2 weeks ago)

To Reproduce

vcpkg install
Failure logs

-- Downloading https://github.com/openssl/openssl/archive/openssl-3.2.1.tar.gz -> openssl-openssl-openssl-3.2.1.tar.gz...
-- Extracting source /hedera-sdk-cpp/vcpkg/downloads/openssl-openssl-openssl-3.2.1.tar.gz
-- Applying patch script-prefix.patch
-- Applying patch windows/install-layout.patch
-- Applying patch windows/install-pdbs.patch
-- Applying patch unix/android-cc.patch
-- Applying patch unix/move-openssldir.patch
-- Applying patch unix/no-empty-dirs.patch
-- Applying patch unix/no-static-libs-for-shared.patch
-- Using source at /hedera-sdk-cpp/vcpkg/buildtrees/openssl/src/nssl-3.2.1-8707343470.clean
-- Getting CMake variables for arm64-android
-- Getting CMake variables for arm64-android-dbg
-- Getting CMake variables for arm64-android-rel
-- Configuring arm64-android-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: /usr/bin/bash -c "V=1 ./../src/nssl-3.2.1-8707343470.clean/vcpkg/configure --host=aarch64-linux-android \"/usr/bin/perl\" \"/hedera-sdk-cpp/vcpkg/buildtrees/openssl/src/nssl-3.2.1-8707343470.clean/Configure\" \"android-\" \"enable-static-engine\" \"enable-capieng\" \"no-tests\" \"no-docs\" \"no-shared\" \"no-module\" \"no-apps\" \"--openssldir=/etc/ssl\" \"--libdir=lib\" \"--disable-silent-rules\" \"--verbose\" \"--disable-shared\" \"--enable-static\" \"--debug\" \"--prefix=/hedera-sdk-cpp/build/android-arm64-release/vcpkg_installed/arm64-android/debug\""
    Working Directory: /hedera-sdk-cpp/vcpkg/buildtrees/openssl/arm64-android-dbg
    Error code: 1
    See logs for more information:
      /hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-out.log
      /hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:862 (vcpkg_execute_required_process)
  buildtrees/versioning_/versions/openssl/53fb72a19981a3439cd569f58b722ca6cd26e23d/unix/portfile.cmake:105 (vcpkg_configure_make)
  buildtrees/versioning_/versions/openssl/53fb72a19981a3439cd569f58b722ca6cd26e23d/portfile.cmake:77 (include)
  scripts/ports.cmake:170 (include)



/hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-out.log
Configuring OpenSSL version 3.2.1 for target android-
Using os-specific seed configuration
/hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-err.log
+ /usr/bin/perl /hedera-sdk-cpp/vcpkg/buildtrees/openssl/src/nssl-3.2.1-8707343470.clean/Configure android- enable-static-engine enable-capieng no-tests no-docs no-shared no-module no-apps --openssldir=/etc/ssl --libdir=lib --debug --prefix=/hedera-sdk-cpp/build/android-arm64-release/vcpkg_installed/arm64-android/debug
Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

pick os/compiler from:
BC-32 BS2000-OSD BSD-aarch64 BSD-armv4 BSD-generic32 BSD-generic64 BSD-ia64 
BSD-nodef-generic32 BSD-nodef-generic64 BSD-nodef-ia64 BSD-nodef-sparc64 
BSD-nodef-sparcv8 BSD-nodef-x86 BSD-nodef-x86-elf BSD-nodef-x86_64 BSD-ppc 
BSD-ppc64 BSD-ppc64le BSD-riscv32 BSD-riscv64 BSD-sparc64 BSD-sparcv8 BSD-x86 
BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 Cygwin-i586 Cygwin-i686 
Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc OS390-Unix UEFI UEFI-x86 UEFI-x86_64 
UWIN VC-CE VC-CLANG-WIN64-CLANGASM-ARM VC-WIN32 VC-WIN32-ARM VC-WIN32-ARM-UWP 
VC-WIN32-HYBRIDCRT VC-WIN32-ONECORE VC-WIN32-UWP VC-WIN64-ARM VC-WIN64-ARM-UWP 
VC-WIN64-CLANGASM-ARM VC-WIN64A VC-WIN64A-HYBRIDCRT VC-WIN64A-ONECORE 
VC-WIN64A-UWP VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc 
aix64-gcc-as android-arm android-arm64 android-armeabi android-mips 
android-mips64 android-x86 android-x86_64 android64 android64-aarch64 
android64-mips64 android64-x86_64 bsdi-elf-gcc cc darwin-i386 darwin-i386-cc 
darwin-ppc darwin-ppc-cc darwin64-arm64 darwin64-arm64-cc darwin64-ppc 
darwin64-ppc-cc darwin64-x86_64 darwin64-x86_64-cc gcc haiku-x86 haiku-x86_64 
hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc hpux-parisc1_1-cc 
hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc 
hpux64-parisc2-gcc hurd-generic32 hurd-generic64 hurd-x86 hurd-x86_64 
ios-cross ios-xcrun ios64-cross ios64-xcrun iossimulator-arm64-xcrun 
iossimulator-i386-xcrun iossimulator-x86_64-xcrun iossimulator-xcrun 
iphoneos-cross irix-mips3-cc irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc 
linux-aarch64 linux-alpha-gcc linux-aout linux-arm64ilp32 linux-armv4 
linux-c64xplus linux-elf linux-generic32 linux-generic64 linux-ia64 
linux-latomic linux-mips32 linux-mips64 linux-ppc linux-ppc64 linux-ppc64le 
linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang 
linux-x86-latomic linux-x86_64 linux-x86_64-clang linux32-riscv32 
linux32-s390x linux64-loongarch64 linux64-mips64 linux64-riscv64 linux64-s390x 
linux64-sparcv9 mingw mingw64 nonstop-nse nonstop-nse_64 nonstop-nse_64_put 
nonstop-nse_g nonstop-nse_g_tandem nonstop-nse_put nonstop-nsv nonstop-nsx 
nonstop-nsx_64 nonstop-nsx_64_put nonstop-nsx_g nonstop-nsx_g_tandem 
nonstop-nsx_put sco5-cc sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc 
solaris-sparcv8-cc solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc 
solaris-x86-gcc solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc 
solaris64-x86_64-gcc tru64-alpha-cc tru64-alpha-gcc uClinux-dist 
uClinux-dist64 unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vms-alpha 
vms-alpha-p32 vms-alpha-p64 vms-ia64 vms-ia64-p32 vms-ia64-p64 vms-x86_64 
vms-x86_64-cross-ia64 vms-x86_64-p32 vms-x86_64-p64 vos-gcc vxworks-mips 
vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug 
vxworks-ppc860 vxworks-ppcgen vxworks-simlinux 

Additional context

vcpkg.json
{
  "name": "hedera-sdk-cpp",
  "version-string": "0.1.0",
  "builtin-baseline": "680071397677bb123b2f2b0ebe73905feae4a955",
  "dependencies": [
    {
      "name": "openssl",
      "version>=": "3.2.1"
    },
    {
      "name": "pthreads",
      "version>=": "3.0.0#11"
    },
    {
      "name": "zlib",
      "version>=": "1.2.12"
    },
    {
      "name": "protobuf",
      "version>=": "3.21.6"
    },
    {
      "name": "grpc",
      "version>=": "1.49.0"
    },
    {
      "name": "upb",
      "version>=": "2022-06-21"
    },
    {
      "name": "nlohmann-json"
    },
    {
      "name": "curl",
      "version>=": "7.84.0"
    },
    {
      "name": "spdlog",
      "version>=": "1.13.0"
    },
    {
      "name": "cpp-httplib",
      "version>=": "0.14.1"
    }
  ]
}

@dg0yt
Copy link
Contributor

dg0yt commented Feb 28, 2024

It builds in CI, with NDK r25.

`.../Configure android- enable-static-engine ...

android- - so there is an empty VCPKG_DETECTED_CMAKE_ANDROID_ARCH. Maybe you have an outdated vcpkg-cmake-get-vars package? Try vcpkg upgrade (with --no-dry-run).

@rwalworth
Copy link
Author

rwalworth commented Feb 28, 2024

It builds in CI, with NDK r25.

`.../Configure android- enable-static-engine ...

android- - so there is an empty VCPKG_DETECTED_CMAKE_ANDROID_ARCH. Maybe you have an outdated vcpkg-cmake-get-vars package? Try vcpkg upgrade (with --no-dry-run).

It doesn't look like I can run that in manifest mode:

% ./vcpkg upgrade --no-dry-run
error: The upgrade command does not currently support manifest mode. Instead, modify your vcpkg.json and run install.

I tried adding it to my manifest file however:

  "dependencies": [
    {
      "name": "vcpkg-cmake-get-vars",
      "version>=": "2023-12-31"
    },
  ...

and I'm seeing the same thing:

root@356ddba84b92:/hedera-sdk-cpp# cat vcpkg/buildtrees/openssl/config-arm64-android-dbg-err.log 
+ /usr/bin/perl /hedera-sdk-cpp/vcpkg/buildtrees/openssl/src/nssl-3.2.1-8707343470.clean/Configure android- enable-static-engine enable-capieng no-tests no-docs no-shared no-module no-apps --openssldir=/etc/ssl --libdir=lib --debug --prefix=/hedera-sdk-cpp/build/android-arm64-release/vcpkg_installed/arm64-android/debug
Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

pick os/compiler from:
BC-32 BS2000-OSD BSD-aarch64 BSD-armv4 BSD-generic32 BSD-generic64 BSD-ia64 
...

Is there a more recent version of vcpkg-cmake-get-vars that I'm missing?

@rwalworth
Copy link
Author

Found the solution.

My builtin-baseline was out of date for android builds by about a year, so I updated it to the 2023.06.20 release commit hash and it's building now.

@Cheney-W Cheney-W self-assigned this Feb 29, 2024
@Cheney-W Cheney-W added the category:question This issue is a question label Feb 29, 2024
@shive1807
Copy link

shive1807 commented Feb 29, 2024

  /hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-out.log
  /hedera-sdk-cpp/vcpkg/buildtrees/openssl/config-arm64-android-dbg-err.log

Check both the files, I found the error here, It was unable to find the XCode.

Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Mar 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question Stale
Projects
None yet
Development

No branches or pull requests

4 participants