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] Python3 needs Pyhon3 to build Python3 #33131

Closed
TrueBrain opened this issue Aug 13, 2023 · 3 comments · Fixed by #33132
Closed

[python3] Python3 needs Pyhon3 to build Python3 #33131

TrueBrain opened this issue Aug 13, 2023 · 3 comments · Fixed by #33132
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@TrueBrain
Copy link
Contributor

Till four days ago, it was possible to install Python3 in vcpkg without having Python3 system-wide installed. Since 4 days ago (and specifically, this commit and line: c6928df#diff-f682e6e46ef0d0dae2ceba81d191975da58a84cbdab4811a0e84683442265461R245 ) that is no longer the case.

We use vcpkg to build a linux-generic binary with a very old libc so as many people as possible can run it on their system. Basically, it based on quay.io/pypa/manylinux2014_x86_64. Sadly, having a system-wide Python3 on that is very challenging, one that vcpkg was resolving for us. But .. no longer :(

Would be really appreciated if Python3 can be build again without needing Python3 to start with! Tnx :)

Package: python3:x64-linux -> 3.11.4#1

Host Environment

  • Host: x64-linux
  • Compiler: GNU 10.2.1
  • vcpkg-tool version: 2023-08-09-9990a4c9026811a312cb2af78bf77f3d9d288416
    vcpkg-scripts version: 0fa8459 2023-08-11 (34 hours ago)

To Reproduce

vcpkg install python3
Failure logs

-- Downloading https://github.com/python/cpython/archive/v3.11.4.tar.gz -> python-cpython-v3.11.4.tar.gz...
-- Extracting source /vcpkg/downloads/python-cpython-v3.11.4.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 0010-dont-skip-rpath.patch
-- Applying patch 0012-force-disable-curses.patch
-- Applying patch 0014-fix-get-python-inc-output.patch
-- Applying patch 0015-dont-use-WINDOWS-def.patch
-- Applying patch 0002-static-library.patch
-- Applying patch 0011-gcc-ldflags-fix.patch
-- Using source at /vcpkg/buildtrees/python3/src/v3.11.4-101b2af427.clean
CMake Error at scripts/cmake/vcpkg_find_acquire_program.cmake:163 (message):
  Could not find python3.  Please install it via your package manager:

      sudo apt-get install python3
Call Stack (most recent call first):
  ports/python3/portfile.cmake:254 (vcpkg_find_acquire_program)
  scripts/ports.cmake:147 (include)
@TrueBrain
Copy link
Contributor Author

Disabling the following lines fixes my issue:

vcpkg_find_acquire_program(PYTHON3)
list(APPEND OPTIONS "ac_cv_prog_PYTHON_FOR_REGEN=${PYTHON3}")

After which Python builds and functions as expected.

@Osyotr
Copy link
Contributor

Osyotr commented Aug 13, 2023

Since we don't touch stuff that needs regeneration, we don't need to set PYTHON_FOR_REGEN. Please test #33132

@TrueBrain
Copy link
Contributor Author

As that is exactly the patch I am currently applying to my builds, can confirm, fixes the issue :)

@FrankXie05 FrankXie05 added the category:port-bug The issue is with a library, which is something the port should already support label Aug 14, 2023
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