Removal of deprecated Linux targets and build systems. Sundry fixes. - #18
Removal of deprecated Linux targets and build systems. Sundry fixes.#18vldevel wants to merge 4 commits into
Conversation
- Removed the deprecated 32 bits Linux build targets(ARM v6/v7).
- Removed support for the deprecated Ubuntu 18.04 build system, which
_cannot_ build m144.
- Added (putative) Ubuntu 22.04 armv8 build system support.
- Changed the apt_install_arm.sh script to work with Ubuntu 20.04.
- Fixed ubuntu-20.04_x86_64/Dockerfile to build for release instead of
debug.
This commit adds the following two patches required for WebRTC SDK under Linux: - audio_device_alsa_linux.patch: this patch fixes ALSA deadlocks on shutdown causing a total freeze under Linux when a program using WebRTC is closed. This is in fact hiroshihorie's PR, which has not yet been integrated into WebRTC SDK: webrtc-sdk/webrtc#244 - disable_crel.patch: this fixes linking issues seen when the SDK is built and its objects linked with ldd and then the resulting library is used afterwards in a program compiled with gnu-ld. This commit also fixes issues caused by discrepancies between clang-ar (used at build time) and gnu-ar (which format is expected by gnu-ld), issues seen when linking the SDK static library as part of a shared library (llwebrtc) under Linux. archive_objects() was changed in run.py to address those issues. Finally, this commit enables ALSA for Linux builds, since when built with Pulseaudio support and ran on a system not using Pulseaudio, WebRTC crashes on load. With the above patch applied, ALSA, on the other hand, works perfectly well on _any_ Linux system (ALSA is part of the Linux kernel itself and is always available, whatever the configuration of the Linux sound system and whatever sound daemon the user has configured, when any).
Normally, depot_tools and the docker or sysroot images used for building the WebRTC SDK are using llvm tools, and the 'ar' utility is actually llvm-ar. But just in case, let's support GNU ar as well.
It is important, for reproducible builds as time passes, that the depot tools version corresponds to the version with which the SDK version was developed and first built: failing to sync depot tools invariably leads to build failures over time, as the tools get updated in the HEAD of depot tools (e.g the compiler version, but not only). This commit adds auto-syncing of the depot tools to run.py. It also removes a stray control character, at the start of run.py, which got inadvertently inserted in one of my previous commits.
|
Note that I could successfully build (*) a version of WebRTC SDK m144 for Linux x86_64 with this PR applied to the roxie/m144 branch. Thanks to the ALSA patch, the resulting library also does not crash any more when compiled with Pulseaudio support and running on a Linux system not using Pulseaudio (but sadly, WebRTC fails to fallback to ALSA in this case, and voice is therefore not working, so I still recommend disabling Pulseaudio at compile time so that the library is 100% compatible with all Linux systems). For now, I however could not manage to convince the WebRTC SDK build system to build an arm64 version of the m144 version of the library (unlike m137 that could be cross-compiled, and m114 that could also be built natively on an ARM64 Linux system). Still trying... (*) With the Ubuntu 22.04 docker build system: Ubuntu 20.04 fails. |
First commit:
Removal of deprecated Linux targets and build systems. Sundry fixes.
Second commit:
Add patches for Linux. Enable ALSA for Linux.
This commit adds the following two patches required for WebRTC SDK under
Linux:
causing a total freeze under Linux when a program using WebRTC is closed.
This is in fact hiroshihorie's PR, which has not yet been integrated into
WebRTC SDK: Fix ALSA shutdown deadlocks webrtc-sdk/webrtc#244
and its objects linked with ldd and then the resulting library is used
afterwards in a program compiled with gnu-ld.
This commit also fixes issues caused by discrepancies between clang-ar (used
at build time) and gnu-ar (which format is expected by gnu-ld), issues seen
when linking the SDK static library as part of a shared library (llwebrtc)
under Linux. archive_objects() was changed in run.py to address those issues.
Finally, this commit enables ALSA for Linux builds, since when built with
Pulseaudio support and ran on a system not using Pulseaudio, WebRTC
crashesfails to fall back to ALSA.on load
With the above patch applied, ALSA, on the other hand, works perfectly well
on any Linux system (ALSA is part of the Linux kernel itself and is always
available, whatever the configuration of the Linux sound system and whatever
sound daemon the user has configured, when any).
Third commit:
Flavor-agnostic 'ar' usage in run.py (added support for GNU ar in excess of the normally used llvm-ar).
Fourth commit:
Sync depot_tools version with the WebRTC SDK last commit date.
It is important, for reproducible builds as time passes, that the depot tools
version corresponds to the version with which the SDK version was developed
and first built: failing to sync depot tools invariably leads to build
failures over time, as the tools get updated in the HEAD of depot tools (e.g.
the compiler version, but not only).
This commit adds auto-syncing of the depot tools to run.py.
It also removes a stray control character, at the start of run.py, which got
inadvertently inserted in one of my previous commits.