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

[python3] Build error (arm64-android) #30501

Closed
nomadsinteractive opened this issue Mar 29, 2023 · 6 comments · May be fixed by #31621
Closed

[python3] Build error (arm64-android) #30501

nomadsinteractive opened this issue Mar 29, 2023 · 6 comments · May be fixed by #31621
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. Stale

Comments

@nomadsinteractive
Copy link

nomadsinteractive commented Mar 29, 2023

Host Environment

  • OS: Windows 10
  • Compiler: clang from NDK 25.2.9519653

To Reproduce

Steps to reproduce the behavior:

./vcpkg install python3 --triplet arm64-android

-- [COMMUNITY] Loading triplet configuration from: E:\nomads\mines\vcpkg\triplets\community\arm64-android.cmake
-- Using cached python-cpython-v3.10.7.tar.gz.
-- Cleaning sources at E:/nomads/mines/vcpkg/buildtrees/python3/src/v3.10.7-a83fe77705.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/nomads/mines/vcpkg/downloads/python-cpython-v3.10.7.tar.gz
-- Applying patch 0001-only-build-required-projects.patch
-- Applying patch 0003-use-vcpkg-zlib.patch
-- Applying patch 0004-devendor-external-dependencies.patch
-- Applying patch 0005-dont-copy-vcruntime.patch
-- Applying patch 0008-python.pc.patch
-- Applying patch 0009-bz2d.patch
-- Applying patch 0010-dont-skip-rpath.patch
-- Applying patch 0012-force-disable-curses.patch
-- Applying patch 0013-configure-no-libcrypt.patch
-- Applying patch 0002-static-library.patch
-- Using source at E:/nomads/mines/vcpkg/buildtrees/python3/src/v3.10.7-a83fe77705.clean
-- Getting CMake variables for arm64-android
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at E:/nomads/mines/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Configuring arm64-android-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
Command failed: --noprofile --norc --debug -c "V=1 ./../src/v3.10.7-a83fe77705.clean/configure --host=aarch64-linux-android "--with-openssl=E:/nomads/native/ark/out/android/Debug/vcpkg_installed/arm64-android" "--without-ensurepip" "--with-suffix=" "--with-system-expat" "--without-readline" "--disable-test-modules" "--disable-silent-rules" "--verbose" "--disable-shared" "--enable-static" "--with-pydebug" "--prefix=/E/nomads/native/ark/out/android/Debug/vcpkg_installed/arm64-android/debug" "--bindir=\${prefix}/../tools/python3/debug/bin" "--sbindir=\${prefix}/../tools/python3/debug/sbin" "--libdir=\${prefix}/lib" "--includedir=\${prefix}/../include" "--datarootdir=\${prefix}/share/python3""
Working Directory: E:/nomads/mines/vcpkg/buildtrees/python3/arm64-android-dbg
Error code: 系统找不到指定的文件。 See logs for more information:

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_make.cmake:812 (vcpkg_execute_required_process)
ports/python3/portfile.cmake:233 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)

error: building python3:arm64-android failed with: BUILD_FAILED
error: Please ensure you're using the latest port files with git pull and vcpkg update.

  • Cut and paste the appropriate build messages from the console output.
  • Attach every failure log file mentioned in the console output.

git status vcpkg
HEAD detached at 2023.02.24
nothing to commit, working tree clean

Add any other context about the problem here, such as what you have already tried to resolve the issue.

After a quick investigation, I find something that might be of your help:
The problem may lie in vcpkg_configure_make.cmake
Only if targeting windows builds, it sets "${MSYS_ROOT}/usr/bin/bash.exe" to a var named bash_executable, which will later be composed into a full configuration command line.
But the Android ports somehow still depends on this configuration command line. Due to the reason above, it lacks the executable file name to complete, causing failure.

@nomadsinteractive nomadsinteractive added the category:port-bug The issue is with a library, which is something the port should already support label Mar 29, 2023
@dg0yt
Copy link
Contributor

dg0yt commented Mar 29, 2023

#30172 fixed cross builds from Windows hosts. I guess your checkout lacks that patch.

@nomadsinteractive
Copy link
Author

nomadsinteractive commented Mar 29, 2023

That's right, I'm currently using the tag 2023.02.24. The main branch has some other issues for me.
Thanks for your help

@MonicaLiu0311 MonicaLiu0311 added category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. and removed category:port-bug The issue is with a library, which is something the port should already support labels Mar 29, 2023
@nomadsinteractive
Copy link
Author

nomadsinteractive commented Mar 29, 2023

Building problem still occurs on the latest version.
But this time it's caused by some another errors.

Should I post them here or open an another issue instead ?

Here are the logs for each error

configure: error: Cross compiling required --host=HOST-TUPLE and --build=ARCH

readelf for the host is required for cross builds

Fatal: You must get working getaddrinfo() function.
or you can specify "--disable-ipv6".

configure: error: set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling

Thanks

@dg0yt
Copy link
Contributor

dg0yt commented Mar 30, 2023

configure: error: Cross compiling required --host=HOST-TUPLE and --build=ARCH

This can be reproduced for python3:arm64-android on linux host, and even for python3:arm64-linux on x64-linux: It wants at least --host for cross compiling.

@dpogue
Copy link
Contributor

dpogue commented May 15, 2023

See also #27830 (but that broke macOS because Python doesn't support cross-compiling on macOS)

Copy link

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 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 Nov 12, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. Stale
Projects
None yet
4 participants