Commit Graph

10 Commits

Author SHA1 Message Date
Kenneth Myhra
50413c2326 Toolchain: Replace inline nproc with get_number_of_processing_units() 2023-05-07 14:29:25 +02:00
Kenneth Myhra
f5cb46e316 Toolchain: Exit Build*.sh scripts if executed as root 2023-04-25 01:53:42 -06:00
Andrew Kaster
dcc0f299be Toolchain+Ports: Install host python into Local/python, not Local/$ARCH
Following the pattern for qemu, mold, and clang, we should install the
host python required to build the python port into its own install tree
rather than forcing it into the GNU compiler's bindir.
2022-06-30 12:29:18 +01:00
Linus Groh
a613e00caa Ports: Change Python's auth_type to sha256 2021-08-03 21:01:07 +01:00
Brian Gianforcaro
b4927a753d Toolchain: Make BuildPython.sh shellcheck compliant
Shellcheck is unable to source non-literal includes,
so inform shellcheck to just ignore this include.
2021-05-05 21:26:37 +02:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Linus Groh
39af1f8519 Ports: Add Python 3.9
The current version of our Python port (3.6.0) is over four years old by
now and has (or had, I haven't actually tried it in a while) some
limitations - time for an upgrade! The latest Python release is 3.9.1,
so I used that version. It's a from-scratch port, no patches are taken
from the previous port to ensure the smallest possible amount of code is
patched. The BuildPython.sh script is useful so I kept it, with some
tweaks. I added a short document explaining each patch to ease judging
their underlying problem and necessity in the future.

Compared to the old Python port, this one does support both the time
module as well as threading (at least _thread) just fine. Importing
modules written in C (everything in /usr/local/lib/python3.9/lib-dynload)
currently asserts in Serenity's dynamic loader, which is unfortunate but
probably solvable. Possibly related to #4642. I didn't try building
Python statically, which might be one possibility to circumvent this
issue.

I also renamed the directory to just "python3", which is analogous to
the Python 3.x package most Linux distributions provide. That implicitly
means that we likely will not support multiple versions of the Python
port at any given time, but again, neither do many other systems by
default. Recent versions are usually backwards compatible anyway though,
so having the latest shouldn't be a problem.
On the other hand bumping the version should now be be as simple as
updating the variables in version.sh, given that no new patches are
required.

These core modules to currently not build - I chose to ignore that for
now rather than adding more patches to make them work somehow, which
means they're fully unavailable. This should probably be fixed in
Serenity itself.

    _ctypes, _decimal, _socket, mmap, resource, termios

These optional modules requiring 3rd-party dependencies do currently not
build (even with depends="ncurses openssl zlib"). Especially the absence
of a readline port makes the REPL a bit painful to use. :^)

    _bz2, _curses, _curses_panel, _dbm, _gdbm, _hashlib, _lzma, _sqlite3,
    _ssl, _tkinter, _uuid, nis, ossaudiodev, readline, spwd, zlib

I did some work on LibC and LibM beforehand to add at least stubs of
missing required functions, it still encounters an ASSERT_NOT_REACHED()
/ TODO() every now and then, notably frexp() (implementations of that
can be found online easily if you want to get that working right now).
But then again that's our fault and not this port's. :^)
2021-01-18 22:28:56 +01:00
meme
23b23cee5a Build: Support non-i686 toolchains
* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
2020-12-29 17:42:04 +01:00
Emanuel Sprung
9885ccb7a7 Toolchain: Fix python build script.
This fixes #995
2020-01-25 09:09:52 +01:00
Emanuel Sprung
3c8a1ea386 Ports: check for native python3 installation, add build script
For python3 cross compilation, a native installation of python3 is
needed. This patch adds a build script for python3 to the toolchain
and informs the user to run that script if the python port is build
and no native python3 with the same major and minor version is
being found.
2019-11-25 11:57:18 +01:00