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

python packages: Build failure #21162

Closed
jefferyto opened this issue May 24, 2023 · 1 comment · Fixed by #21167
Closed

python packages: Build failure #21162

jefferyto opened this issue May 24, 2023 · 1 comment · Fixed by #21167

Comments

@jefferyto
Copy link
Member

Maintainer: me
Environment: all probably

Description:
All Python packages have failed to build on buildbots for aarch64-generic. For instance https://downloads.openwrt.org/snapshots/faillogs/aarch64_generic/packages/python-attrs/compile.txt:

* Getting build dependencies for wheel...

Traceback (most recent call last):
  File "/builder/shared-workdir/build/sdk/staging_dir/hostpkg/lib/python3.11/subprocess.py", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python3.11'

ERROR Backend operation failed: FileNotFoundError(2, 'No such file or directory')
make[3]: *** [Makefile:47: /builder/shared-workdir/build/sdk/build_dir/target-aarch64_generic_musl/pypi/attrs-23.1.0/.built] Error 1
time: package/feeds/packages/python-attrs/compile#0.45#0.26#0.89

Also confirmed by @nxhack (2445fe9#commitcomment-114742991) and @datahost (#21155 (comment)).

@ptpt52
Copy link
Contributor

ptpt52 commented May 25, 2023

related: #21164

jefferyto added a commit to jefferyto/openwrt-packages that referenced this issue May 25, 2023
Setting __PYVENV_LAUNCHER__ for Python package builds was added in
a91a992, but neither the commit message
nor the pull request[1] explain its purpose in detail.

My guess is this was done to set the shebang for installed Python
scripts. We now have a Makefile recipe to set the shabang, so setting
this variable for this purpose is unnecessary.

It appears that Python 3.11 has changed the handling of this (internal)
environment variable, and setting it appears to be causing build errors
for all Python packages.

This removes setting __PYVENV_LAUNCHER__ for Python package builds.

[1]: openwrt#525

Fixes: openwrt#21162
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
jefferyto added a commit to jefferyto/openwrt-packages that referenced this issue May 25, 2023
Setting __PYVENV_LAUNCHER__ for Python package builds was added in
a91a992, but neither the commit message
nor the pull request[1] explain its purpose in detail.

My guess is this was done to set the shebang for installed Python
scripts. We now have a Makefile recipe to set the shebang, so it would
be unnecessary to set this variable for this purpose.

It appears that Python 3.11 has changed the handling of this (internal)
environment variable, and setting it appears to be causing build errors
for all Python packages.

This removes setting __PYVENV_LAUNCHER__ for Python package builds.

[1]: openwrt#525

Fixes: openwrt#21162
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
jefferyto referenced this issue May 25, 2023
* Removed patches:

  * 001-enable-zlib.patch: zlib module should be enabled automatically

  * 007-distutils-do-not-adjust-path.patch: Not necessary since we
    process shebang lines for all scripts (in python3-package.mk)

  * 030-bpo-43112-detect-musl-as-a-separate-SOABI-GH-24502.patch:
    Already merged

* Move configure vars from config.site back into Makefile

  Centralizing all build information into one file makes it easier to
  maintain

* No longer set ac_cv_header_uuid_h=yes as configure should detect
  libuuid

* Order configure args by enable-/disable-/with-/without-, then
  alphabetically

* Set ac_cv_working_openssl_hashlib=yes for host configure to bypass the
  OpenSSL API tests with LibreSSL

* Use the default Host/Compile recipe instead of picking out specific
  targets to make

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
jefferyto added a commit to jefferyto/openwrt-packages that referenced this issue May 26, 2023
Setting __PYVENV_LAUNCHER__ for Python package builds was added in
a91a992, but neither the commit message
nor the pull request[1] explain its purpose in detail.

My guess is this was done to set the shebang for installed Python
scripts. We now have a Makefile recipe to set the shebang, so it would
be unnecessary to set this variable for this purpose.

It appears that Python 3.11 has changed the handling of this (internal)
environment variable, and setting it appears to be causing build errors
for all Python packages.

This removes setting __PYVENV_LAUNCHER__ for Python package builds.

[1]: openwrt#525

Fixes: openwrt#21162
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 9e95dff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants