Igalia / webkit-container-sdk

The all-in-one SDK for WebKit GTK/WPE port development.
MIT License
12 stars 7 forks source link

jhbuild: update gstreamer to 1.24.6 #39

Closed dpino closed 2 months ago

dpino commented 2 months ago

This PR updates JHBuild's gstramer to the same version as Flatpak: 1.24.6. Also, now GStreamer modules 'rs' (Rust) and 'webrtc' are enabled.

When the 'rs' module is enabled, compilation fails with the following error:

../subprojects/gst-plugins-rs/meson.build:28:2: ERROR: Problem encountered: cargo-c missing, install it with: 'cargo install cargo-c'

A full log can be found at /home/buildbot/workspace/gstreamer/build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
main buildbot@wkdev ~/workspace/gstreamer/build $ cargo install cargo-c
    Updating crates.io index
error: cannot install package `cargo-c 0.10.3+cargo-0.81.0`, it requires rustc 1.78 or newer, while the currently active rustc version is 1.75.0
`cargo-c 0.9.31+cargo-0.78.0` supports rustc 1.75

To install a more up-to-date version of 'rustc' I ran the following steps:

curl https://sh.rustup.rs -sSf | sh
rustup toolchain install nightly
rustup default nightly
source $HOME/.bashrc

These step should be run at some point in the container. I don't know where would be the best place to put them.

This change doesn't bring the container SDK to exactly what Flatpak SDK does regarding GStreamer, but after this change the crashes after running layout-tests are solved.

Lastly, this commit: jhbuild: Do not build custom gstreamer removed gstreamer from the list of modules to be built via JHBuild since Ubuntu 24.04 provided a more up-to-date version. The commit also unsets several environment variables. I wonder if those variables should be restored?

TingPing commented 2 months ago

The commit also unsets several environment variables. I wonder if those variables should be restored?

Yes.

To install a more up-to-date version of 'rustc' I ran the following steps:

You would run it in images/wkdev_sdk/Containerfile. The question is just should these tools be in the final image, or removed afterwards?

It also means we can remove cargo from images/wkdev_sdk/required_system_packages/04-devtools.lst

TingPing commented 2 months ago

@dpino Could you try installing the Ubuntu rustup package, and then just running rustup toolchain install 1.78 or whatever is needed?

EDIT: The following is thinking about keeping around a whole rust build area for development, but in practice we probably don't need that. To be system wide you might have to set some env vars, just based on what others have written: ``` RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/rust ``` Using `ENV` in the containerfile. Then in `.wkdev-init` have a similar function to `try_setup_permissions_jhbuild_directory()` for the cargo directory.
philn commented 2 months ago

Would it be possible to a QA step that would verify the gst plugins are available? gst-inspect-1.0 can be used for that.

philn commented 2 months ago

Would it be possible to a QA step that would verify the gst plugins are available? gst-inspect-1.0 can be used for that.

That's what we do in the old sdk:

Tools/buildstream/elements/sdk/gst-plugin-dav1d.bst:      PAGER=this-is-not-a-pager gst-inspect-1.0 dav1ddec
Tools/buildstream/elements/sdk/gst-plugin-rtp.bst:      PAGER=this-is-not-a-pager gst-inspect-1.0 rsrtp
Tools/buildstream/elements/sdk/gst-plugin-livesync.bst:      PAGER=this-is-not-a-pager gst-inspect-1.0 livesync
Tools/buildstream/elements/sdk/gst-plugin-closedcaption.bst:      PAGER=this-is-not-a-pager gst-inspect-1.0 cea608tott
Tools/buildstream/elements/sdk/gst-plugin-audiofx.bst:      PAGER=this-is-not-a-pager gst-inspect-1.0 audiornnoise
dpino commented 2 months ago

It seems the CI bot is getting stuck.

philn commented 2 months ago

LGTM

Well, withou an AV1 decoder you will get webcodecs failures.

TingPing commented 2 months ago

Sure, building libdav1d can come next.

dpino commented 2 months ago

Failing due to lack of space in the CI bot:

2024-09-09T09:20:10.6042001Z [2407/2627] Linking target testsuite/a11y/text
2024-09-09T09:20:10.6043023Z FAILED: testsuite/a11y/text
2024-09-09T09:20:10.6060232Z cc  -o testsuite/a11y/text testsuite/a11y/text.p/text.c.o -L/jhbuild/install/lib -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group gtk/libgtk.a gtk/css/libgtk_css.a gdk/libgdk.a gdk/wayland/cursor/libwayland+cursor.a gsk/libgsk.a gsk/libgsk_f1
2024-09-09T09:20:10.6086316Z /usr/bin/ld: final link failed: No space left on device
2024-09-09T09:20:10.6086998Z collect2: error: ld returned 1 exit status
2024-09-09T09:20:10.6606224Z [2408/2627] Linking target testsuite/a11y/textview
2024-09-09T09:20:10.6606951Z FAILED: testsuite/a11y/textview
2024-09-09T09:20:10.6621644Z cc  -o testsuite/a11y/textview testsuite/a11y/textview.p/textview.c.o -L/jhbuild/install/lib -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group gtk/libgtk.a gtk/css/libgtk_css.a gdk/libgdk.a gdk/wayland/cursor/libwayland+cursor.a gsk/libgsk.a g
2024-09-09T09:20:10.6634062Z /usr/bin/ld: final link failed: No space left on device
2024-09-09T09:20:10.6634705Z collect2: error: ld returned 1 exit status
2024-09-09T09:20:10.7096069Z [2409/2627] Compiling C object testsuite/a11y/names.p/names.c.o
2024-09-09T09:20:10.7096963Z FAILED: testsuite/a11y/names.p/names.c.o
2024-09-09T09:20:10.7116409Z sccache cc -Itestsuite/a11y/names.p -Itestsuite/a11y -I../../../../../jhbuild/checkout/gtk4/testsuite/a11y -I. -I../../../../../jhbuild/checkout/gtk4 -Igtk -I../../../../../jhbuild/checkout/gtk4/gtk -Igdk/x11 -I../../../../../jhbuild/checkout/gtk
2024-09-09T09:20:10.7134413Z ../../../../../jhbuild/checkout/gtk4/testsuite/a11y/names.c:223:1: fatal error: error writing to /tmp/ccfwezBH.s: No space left on device
2024-09-09T09:20:10.7135626Z   223 | }
2024-09-09T09:20:10.7135959Z       | ^
2024-09-09T09:20:10.7136329Z compilation terminated.
2024-09-09T09:20:10.7167625Z [2410/2627] Linking target testsuite/a11y/label
2024-09-09T09:20:10.7168640Z FAILED: testsuite/a11y/label
2024-09-09T09:20:10.7178581Z cc  -o testsuite/a11y/label testsuite/a11y/label.p/label.c.o -L/jhbuild/install/lib -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group gtk/libgtk.a gtk/css/libgtk_css.a gdk/libgdk.a gdk/wayland/cursor/libwayland+cursor.a gsk/libgsk.a gsk/libgsk
2024-09-09T09:20:10.7187526Z /usr/bin/ld: final link failed: No space left on device