Skip to content

Conversation

aperezdc
Copy link
Member

@aperezdc aperezdc commented Jul 8, 2025

This merges the upstream 1.26.3 tag (the most recent stable one) into the main branch. In particular, after resolving the merges, the following changes are important to point out:

  • OpenSSL has been updated to 3.x, which required changing the patch that makes it pick CA-certificates correctly on Android to use get_cert_by_subject : backward compatibility openssl/openssl#24002 instead, plus a small patch to adjust the CA-certificates path.
  • A change in cerbero/build/build.py makes Cerbero pass the correct value for CMAKE_FIND_ROOT_PATH. This looks like an upstream bug, as it relies on a $CERBERO_PREFIX environment variable, but CMake won't read them from command line arguments. This also allows simplifying recipes/wpewebkit.recipe due to not needing to pass all the previously needed -D<name>_{ROOT,LIBRARY,INCLUDE_DIR} paths for dependencies that can be found on the sysroot.
  • Patch recipes/gst-plugins-bad/0001-Only-Android-API-33-and-higher-supports-vkCmdPipelin.patch is updated to make it apply on the newer GStreamer version.

The rest of the PR is standard fare.

nirbheek and others added 30 commits November 6, 2024 07:19
This should speed up the cerbero CI triggered by gst-plugins-rs
considerably, since we will only need to build gst-plugins-rs and not
every other gstreamer recipe in cerbero.

Necessitates a change in the file structure for the artifacts server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1625>
--exclude wasn't working on android and ios because it was getting
pulled in by gst-android-1.0 and gstreamer-ios-templates

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1627>
This slows down the creation, and also spams the log so much that it
makes the build log unreadable.

It was originally added for debug purposes anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1627>
Also construct fallback URLs using a flat directory structure for
extra source mirrors, for backwards compat.

Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/502

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1632>
- ffmpeg needs -Wl,-Bsymbolic for arm64 assembly
- monorepo naming convention for GSTREAMER_ASSETS_DIR wasn't replicated correctly here
- Gradle fallback for GSTREAMER_ASSETS_DIR didn't properly escape the CMake current source dir

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1631>
From https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory.name:

> The directory name can be retrieved from the name attribute of the
> returned object. When the returned object is used as a context
> manager, the name will be assigned to the target of the as clause in
> the with statement, if there is one.

Bug added in https://gitlab.freedesktop.org/gstreamer/cerbero/-/commit/5a8b7625730d8aad90c29996a0918c3a99d87abd

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1636>
The default should be gstreamer/gstreamer not NAMESPACE/gstreamer,
because we do not want to pull the ancient gstreamer fork in people's
namespace.

`user_branch_exists_in()` does not exist in this script, call the
relevant script directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1636>
Allows developers to define the specific dependencies to be installed during the bootstrap process, so that unnecessary packages are not installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1634>
This will allow them to start asynchronously, rather than waiting for
their gitlab stage to start.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1640>
Previously we were using the same image rules for
the 'build docker' stage, and since those jobs
wouldn't trigger, the pipeline would not advance
further.

However in eab8226 we defined needs: for the rest
of the jobs so they can start asynchronously, which
caused the jobs to always execute, since they didn't
have an image build job to wait upon.

Add a trigger, no-op, job that any job can depend
and to switch back to the previous behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1643>
It was out of sync with the actual on-disk list, which was causing
warnings:

WARNING: Missing on-disk files for share/aclocal/codeset.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/intldir.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/lcmessage.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/lock.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/longlong.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/threadlib.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/wchar_t.m4 with search function _search_file
WARNING: Missing on-disk files for share/aclocal/wint_t.m4 with search function _search_file
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1642>
… the full path

Fixes wavpack's pc file hardcoding a botched install path on its libdir (${prefix}/<absolute path at build time here>).

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1650>
Otherwise these are passed Linux-style, which for Wine means prepending the current working directory to an already absolute path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1555>
nirbheek and others added 14 commits June 19, 2025 06:44
MSI generation is broken because Rust plugin static libs have become
too large, specifically rswebrtc:

wix.exe : error WIX0296: An error (E_FAIL) was returned while creating
a CAB file. The most common cause of this error is attempting to
create a CAB file larger than 2GB. You can reduce the size of your
installation package, use a higher compression level, or split your
files into more than one CAB file.

https://gitlab.freedesktop.org/gstreamer/cerbero/-/jobs/78661845

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1848>
Also it doesn't need explicit enabling because it has no external
deps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1854>
…neration

Twofold fixes to buy us some time:

- Make sure that rswebrtc and aws build with opt-level = s
- Implement prelinking for MSVC through a mix of llvm-tools and GNU ld
- Implement codegen-units = 1 to make the libraries more compact

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1872>
Not having these make the Rust plugins impossible to find or link against.

Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1872>
@aperezdc aperezdc requested review from neodesys and spenap July 8, 2025 14:28
@aperezdc aperezdc self-assigned this Jul 8, 2025
@aperezdc aperezdc added the enhancement New feature or request label Jul 8, 2025
@aperezdc
Copy link
Member Author

aperezdc commented Jul 8, 2025

Okay, this needs a cleanup in the CI builder because it requires re-bootstrapping. Then the build should pass.

Copy link
Collaborator

@spenap spenap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, huge effort!

if self.config.target_platform == Platform.IOS:
self.library_type = LibraryType.STATIC
if self.config.target_platform == Platform.ANDROID:
self.patches += [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be open to moving this self.patches += [ block as a conditional addition after line 30?

While this is indeed a (target) platform-specific section, separating the patches more than 150 lines might make it tricky to maintain

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, good idea.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, though... we need to have this inside the prepare() function because around line 30 we do not have a way of knowing yet what will be the target platform. The best I can do is moving it to line ~115, which is as bad. So I think it's not really worth it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for trying! Maybe leave a comment around line 30 saying additional platform patches are found later? Or is that too much?

@aperezdc
Copy link
Member Author

aperezdc commented Jul 8, 2025

I am getting a build failure locally:

ld.lld: error: unable to find library -lintl

It looks like it's time to learn what's the deal with libiconv / libintl on Android 😓

@spenap
Copy link
Collaborator

spenap commented Jul 14, 2025

I am getting a build failure locally:

ld.lld: error: unable to find library -lintl

It looks like it's time to learn what's the deal with libiconv / libintl on Android 😓

I've addressed these linkage errors in #72. I had a similar one for libwpebackend-android after I restored it to the main version -- it seems there's something still missing in the Meson configuration where the build artifacts are not generated (or not in the right place)

I then tried the minibrowser apk generated with WPE Android. For this I had to patch it slightly, see Igalia/wpe-android#205. It loads neverssl.com, but has that OpenSSL problem we had a little while ago, so I need to look further into the OpenSSL changes.

aperezdc and others added 4 commits July 14, 2025 18:52
The CA certificates bundles included in Android are hashed using MD5
(as used by OpenSSL pre-1.0.0) instead of SHA1 (used in 1.0.0+). The
patch to use X509_NAME_hash_old() does no longer apply; hence import
the proposed patch at openssl/openssl#24002

Also, pick the part of the old patch that configured the CA certificates
path to be /system/etc/security/cacerts on Android and split it into its
own patch.
Android provides libiconv for API level >= 28. When available, use that
one instead of building it from sources.
When building using CMAKE, LDFLAGS are not included by default. While
most dependencies use full paths, some like libintl don't, so they fail
to resolve when linking. Saving the path into CMAKE_SHARED_LINKER_FLAGS
addresses it.
@aperezdc aperezdc force-pushed the aperezdc/update-to-1.26.3 branch from 8ceea02 to 5302e8e Compare July 14, 2025 15:55
@spenap spenap self-requested a review September 11, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.