The kernel panic is only present on QEMU 10.1. The cause was fixed in
QEMU 10.2, as the QEMU change (see #26210), also caused regressions for
the Windows SPICE agent.
See: 4be62d3117
75f4597628 LibGfx/JPEGXL: Move JPEG XL secondary files to own folder
1d193fea6f LibGfx/JPEGXL: Read the HfGlobal bundle
ee48ee8ac7 SSHServer: Add the start of an ssh server implementation
ff75e05bbd LibLine: Write history file atomically
This ports
631ed53082 Meta: Patch up Apple SDK headers to work with C++26
from #26524. As this is not fully mechanical, I'm putting it into
its own commit.
The "max" CPU has been supported by the QEMU RISC-V target since version
8.2. The latest Ubuntu LTS and Debian Stable releases both have newer
versions packaged, so it should be safe to require QEMU 8.2.
This enables extensions like Zkr, which support was added for in the
previous commit.
Now that ladybird was hard-forked from SerenityOS, there's no good
reason to keep supporting iOS.
Ladybird only still exists in the SerenityOS repo to make testing LibWeb
easier.
For the moment, the server starts listening on port 22 and then do the
protocol string exchange on connection. It aborts on any subsequent byte
received.
With the SSH_DEBUG macro set and connecting from my host, it prints:
```
Client protocol string: SSH-2.0-OpenSSH_10.0p2 Ubuntu-5ubuntu5
error: Draw the rest of the owl
```
I decided to add a LibSSH library, this will allow us to share some
code with an ssh client but for now, the main point is to easily be
able to add tests.
While `pc` is not particularly wrong on x86_64, it's nonsensical on
other supported platforms, namely aarch64 and riscv64.
For consistency, we now don't use this vendor anymore, regardless of the
platform.
Within the LLVM project, we now build as `$arch-serenity`. This is
enough in most cases, the only place where we have to specify a vendor
is the target .cfg file where we use `$arch-unknown-serenity`.
When building GCC and friends, again we simply identify as
`$arch-serenity` and this is enough.
As a result, the tools in Toolchain/Local/$arch/bin are now named after
this pattern: `$arch-serenity-$tool`.
These changes affect the toolchain build scripts, serenity's build
scripts and the Ports.
The last place where we should see `x86_64-pc-serenity` is the output of
`config.sub`, which assume the vendor is `pc` on vendor-less `x86*`
triples. So `x86_64-serenity` is expanded to `x86_64-pc-serenity`,
luckily enough and AFAICT, the whole GNU ecosystem considers `pc`,
`unknown` and vendor-less target triples the same. So `configure`
shouldn't have an issue finding the right tools anyway.
The gn files were edited with sed and are not tested.
This commit also includes a check in `Meta/serenity.sh` to give a nicer
error message when trying to build the system with an old toolchain.
----
To test this patch, on a clean tree I:
- Ran `./Meta/serenity.sh x86_64 GNU`
- Ran `./Toolchain/BuildJakt.sh`
- Tested these ports: python3(configure based), libjxl(cmake based) and
rizin(meson based)
- Also booted on aarch64 and risv64
I also repeated the steps above with a Clang toolchain.
On a working tree I tested all the affected ports, the results are:
- tinycc build fine but can't compile programs, I observed the same on
master.
- gdb and epsilon don't build but report the same errors as on master.
- I manually edited the libgpg-error, and it builds fine.
- The gcc port works fine.
In environments without any `SERENITY*` variables, grep returns an exit
status of 1. This patch ensures that the subcommand exits with status 0
regardless of whether grep finds a match. This prevents the script
from bailing out when `set -eo pipefail` is enabled.
Previously, we only enabled this warning when building the kernel with
Clang.
We seem to have started disabling this warning in c73aa662bb with no
explicit reason.
This warning seems sensible, so let's stop disabling it.
On restore, it remembers the previously used window size instead
(this is default AppKit behavior).
On Retina screens, one video pixel takes up one view unit (i.e.
2x2 pixels).
This adds EventLoopImplementation, and tweaks it to work in
MacVideoPlayer, mostly by tweaking include paths. It also moves
timers to kCFRunLoopCommonModes, so that videos continue playing
during window resizes.
main.mm now uses a Core::EventLoop instead of calling
NSApplicationMain, which means we now have to do a few things
manually that NSApplicationMain usually does (mostly loading
MainMenu.nib from the bundle).
NSDocument can be destroyed on a background thread, so we have to
be careful to post destruction of PlaybackManager to the main thread.
ns_from_gfx() is copied from MacPDF. Maybe it could be extracted
into a a shared Meta/Lagom/Contrib/LibMac in the future.
xib changes: Remove the default label, add a custom view of type
"View" and autoresizing mask to match window size, connect it to
File Owner's `_view` outlet.
(I couldn't figure out how to tell Xcode that `Document` has a `_view`
outlet without making a dummy empty project and copying the xib file
as well as Document.h/mm in. So that's what I did, and then I copied
the xib file out again after making the change ¯\_(ツ)_/¯)
With this, after opening a webm file, we get a black window instead
of a gray one saying "Your document contents here" in black text.
Similar to MacPDF, this is for working on LibVideo.
The code is the output of Xcode's "New Project" -> macOS ->
"Document App" wizard, with some changes:
* Added the standard copyright notice to files
* Instead of having a build step for Info.plist, pasted in the
keys added by it to the file, based on MacPDF's contents
* Put xib files outside of Base.lproj
* Added a CMakeLists.txt, similar to MacPDF's
* Added CocoaWrapper.h and replaced Cocoa.h includes with it
* Ran clang-format
* Added `#pragma once` to .h files
Ports aren't guaranteed to compile with `-fsigned-char`, resulting in
them using a different incompatible ABI when using serenity libraries.
I think we should rather follow the target architecture ABI than
assuming that `char` is signed.
Building without `-fsigned-char` only required a couple of small changes
to prevent -Wtype-limits warnings.
CMake learned which gcc flag to translate `set(CMAKE_CXX_STANDARD 26)`
to in CMake 3.30.0:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9434
Using earlier versions leads to
...requires the language dialect "CXX26" . But the
current compiler "GCC" does not support this, or CMake does not know
the flags to enable it.
errors after #26524.
The previous method simply picked the last rule when all of them were
outside the time range, causing the timezone to be permanently in the
wrong offset when the last rule didn't have an offset of 0.
One of the affected timezones was America/Sao_Paulo, because Brazil's
DST rules end in 2019 and its last rule is setting the start of DST
for 2018, which (due to the behavior described above) causes the
timezone to be stuck in Daylight Saving Time.
This surfaced an error in two of the test cases for Europe/Moscow,
they were using the incorrect daylight and standard time names for the
period being tested.
Instead of using a quite large FreeBSD header, which doesn't match our
code style, roll our own header for the few definitions that we need.
These are essentially API definitions, so it shouldn't be a problem
that the original linux evdev definitions this is based on are under
the GPL.
QD/ColorSyncDeprecated.h, normally pulled in by Cocoa.h, contains
many enums triggering
"invalid arithmetic between different enumeration types"
in C++26. Omit it from the build by hackily defining its include
guard macro.
main.mm used to not do this as it didn't include AK headers.
We're about to put another workaround in CocoaWrapper.h that's
needed here too though.
No behavior change.
On AArch64 and RISC-V we need to use two serial ports (the built-in one
and now additionally a PCI-connected one) because QEMU doesn't have
something similar to the x86 isa-debugcon for these architectures.
This if is always True since config.machine_type can't be both a
Raspberry Pi machine and MachineType.CI.
This code is a leftover from using the QEMU raspi3b machine in CI.
This allows the user to specify a disk size through
SERENITY_DISK_SIZE_BYTES without having to worry about inodes.
The way we compute the number of inode is based on the current ratio of
bytes per inode, rounded up to a product of 1024.
That way, it picks up the recent speed-up in compile.sh.
To make this work, let compile.sh optionally take the path to
jbig2-from-json as first argument.
Takes the time to run Meta/check-jbig2-json.sh from 1.7s to 0.29s
on my system.