-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
bump(main/pypy3): 7.3.19 #24525
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
base: master
Are you sure you want to change the base?
bump(main/pypy3): 7.3.19 #24525
Conversation
- Large amount of changes, see GitHub PR description for details - Also touches `python2`
Actually I don't think that I'll accept this because it will take more build time, and on-device build for pypy is not really necessary because of the insufficient RAM. This PR will run native translation (from proot-based bionic-aarch64 rootfs), not cross translation (from proot-based bionic-x86_64 to proot-based bionic-aarch64), and takes longer build time. I'm not sure whether it will finish the build within 6 hours. |
The build will finish within 6 hours (I tested first in my own GitHub Actions), but I understand exactly why it will not be accepted. The biggest concern I have is, that I would like to deblobbify (remove propagated binaries that do not have an absolutely verifiable compilation origin) the I think the true best way to do that would be to have a GNU/Linux PyPy2 used for the translation-step (like Do you think you might know how to successfully deblobbify the |
Indeed, for another case that is not fixed yet, I do understand that the current termux-packages/scripts/build/setup/termux_setup_proot.sh Lines 21 to 31 in 4756daa
but I believe that will be easier to fix, because there are many other ways to get them that can replace them.
I am trying to focus on one step at a time rather than changing absolutely everything all at once. |
I really don't think it is necessary to compile Using system-provided qemu-system-static is also not a good solution. Although Ubuntu 24.04's qemu is OK, it used to be not working on Ubuntu 20.04's. IIRC, on QEMU < 5, termux-packages/packages/pypy/build.sh Line 84 in 68a94d5
clang++ hangs for some reason (termux/termux-docker#28, termux-packages/packages/pypy/build.sh Line 188 in 68a94d5
python2 (2.7.18) crashes with OpenSSL (termux-packages/packages/pypy/build.sh Line 182 in 68a94d5
I've tried to do cross translation for pypy3 from x86_64-linux-gnu to *-linux-android, but I haven't made it so far. It crashes on 32-bit arches. See https://github.com/termux/termux-packages/tree/dev/pypy3-cross-translation |
Ok I understand. I would prefer using precompiled binaries only when they come from origins that have more than a certain level of popularity, but this level is different for every different person. You consider
If the same logic you are using is applied to all softwares (not only QEMU), then the assumption is that everything that is currently in the termux-packages/scripts/setup-ubuntu.sh Line 216 in 72c1bbc
the version of Ubuntu
Thank you very much I did not know you made that already!! |
There are some differences between gobject-introspection and qemu-user-static. It is quite difficult to use gobject-introspection of specific version because it has too many dependencies, but it is easy to use qemu-user-static of specific version because it is compiled statically. |
Caution
downside: build-time performance regression
for the ARM targets, the current
pypy3
build.sh
in the master branch has a build-time performance optimization involving the use of a double proot with the first proot being an x86 bionic-libc proot for all targets and the nested proot inside the first proot being the only one which requires theqemu-user
emulator for the ARM targets. Unfortunately,termux-proot-run
does not implement that optimization, so the loss of the optimization increases the build time ofpypy3
for ARM targets. This is not good, so this PR can be disregarded, or replaced with a more conservative one, or a better-optimized one, if the build-time performance regression is considered really undesirable.potential replacement of pypy3: bump to 7.3.17 #21297
do-not-try-to-get-L2-cache-on-aarch64.patch
copied from itcontinuation of scripts(build-packages.sh,build): Add support to run target binaries #23966 (comment)
bump
TERMUX_PKG_VERSION
to 7.3.19 (this number indicates the PyPy-specific release version)bump
_MAJOR_VERSION
to 3.11 (this number indicates PyPy's compatibility level with Python code written for CPython)make
build.sh
and.patch
files shorter by removing a lot of things and replacing them with ways that have fewer lines0006-package-zip.patch
0007-termux-build.patch
0008-do-not-cffi-dlopen-when-compiling-sqlite3.patch
0010-dummy-cpu_count.patch
cc.sh
termux.py.in
deblobbify the
pypy3
build process by removing this line and replacing it with a total migration totermux-proot-run
instead of a termux-docker image containing blobs like this oneremove build dependencies on
coreutils
,clang
,make
andpkg-config
and replace them with a build dependency ondnsmasq
termux-proot-run
is implementedpypy3/0008-fix-ctypes-find_library.patch
andpython2/fix-ctypes-find_library.diff
:OSError: ctypes.util.find_library() did not manage to locate a library called 'sqlite3'
which started appearing, most likely after libsqlite: bump to 3.49.1 #235560008-do-not-cffi-dlopen-when-compiling-sqlite3.patch
, as it is in the master branch currently, is not able to prevent this error, at least as far as I could tell)fix
postinst
andprerm
scriptspostinst
script to correctly allow migrating the_MAJOR_VERSION
prerm
scripts to fix a problem with$TERMUX_PACKAGE_FORMAT=pacman
mode, by @Maxython, copied and pasted from tree-wide: port debpython to termux #23652implements
$TERMUX_ON_DEVICE_BUILD=true
compatibility$TERMUX_ON_DEVICE_BUILD=true
-compatible device with a large amount of memory. Tested using a device with 16 GB of RAM and 0 GB of swap.)On February 26th, one day after we wrote
set-_FILE_OFFSET_BITS-to-64-on-arm.patch
: pypy: bump to 7.3.18 #23474 (comment), upstream discovered, reported, independently also bisected, and on March 24th, independently also fixed the same problem using code that is character for character exactly identical to our patch: Translation broken on 32-bit ARM on older platforms: assert OFF_T_SIZE == rffi.sizeof(rffi.LONGLONG) pypy/pypy#5229, stefanor/pypy@7509998I tried to also apply the below change to
pypy3
like what was done topypy
(perform the rpython translation-step using a GNU/Linuxpypy2
instead of a bionic-libcpython2
)https://github.com/termux/termux-packages/pull/21026/files#diff-7aabb4b13f8da30e9e862e34c866d5b862ba8c07358d4a126a5c40362dc4b8e0R36-R50
however I could not successfully figure out how to do it. I was able to proceed past a few errors, but I kept getting stuck on this error. The
externmod.so
is a bionic-libc artifact, and I can't figure out how to get it to work in the GNU/Linuxpypy2
.error from failed attempts to build using a GNU/Linux PyPy2
The only way I can figure out how to bypass this error in building
pypy3
is by using the bionic-libcpython2
to bootstrap.