Commit graph

22 commits

Author SHA1 Message Date
Mukilan Thiyagarajan
8faf6839d3
install libudev-dev required by gamepad API (#31376)
Ubuntu 20.04 does not have libudev-dev causing build
failure when compiling libudev-sys, which is in-turn
needed by gilrs-core. Similarly, nix build also needs
the udev C library.

On Ubuntu 22.04, we don't see the build failures since
the build dependency 'libgstreamer-plugins-base-1.0-dev'
transitively pulls in libudev-dev.

Fixes #31373

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-02-19 12:04:38 +00:00
Martin Robinson
38b11afb22
bootstrap: More resiliently install Deiban-like platform dependencies (#31281)
1. First check to see if a package is available before trying to install
   it. This means that we always do our best to install everything, but
   don't fail if we cannot.
2. Install crown and taplo first. This means that if the
   platform-specific bits fail, we still install Servo-specific
   dependencies.
2024-02-07 14:21:34 +00:00
atbrakhi
b62d169f0f
Remove duplicate pkg in APT_PKGS (#31280)
We have `libgstreamer-plugins-base1.0-dev` twice in APT_PKGS,
looks like a duplicate, this PR removes the duplicated pkg.
2024-02-07 11:48:04 +00:00
atbrakhi
ba1803d30a
Fix ./mach bootstrap failure in debian (#31276)
Do not install `libgstreamer-plugins-good1.0-dev` on debian,
install only on ubuntu.
2024-02-07 05:18:40 +00:00
arrynfr
271176094d
Update build script to support asahi linux (#31207) 2024-01-28 21:26:38 +00:00
Martin Robinson
af6652fc09
tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)
This fixes an issue where the dylib for harfbuzz cannot be found when
running unit tests on some systems, because unit tests don't get their
rpaths adjusted during build. This is quite likely an issue with dylib
dependency management. We just need a bit more exploration of how this
is traditionally handled.
2024-01-24 12:12:05 +00:00
Martin Robinson
79a0f76d26
Fix the build on Ubuntu 20.04 (#31019)
Ubuntu 20.04 doesn't have a new enough version of GStreamer, so
automatically disable media when running on that platform.

This also cleans up the media detection a bit, putting the result in a
`enable-media` variable and moving some of the logic into the build
scripts themselves rather than the platform module.
2024-01-07 21:25:22 +00:00
Martin Robinson
7fa4ea9740
Upgrade media / GStreamer / GLib (#30750)
- Upgrade the version of GStreamer for Windows

This upgrades the Windows build to use the most recent version of
GStreamer. This is necessary to upgrade our GStreamer dependency.

- Stop shipping GStreamer binaries on Linux

The binary bundle of GStreamer that we package is not used to compile --
only to run layout tests. It's too old for the APIs that we are using
(as evidenced by needed 1.18 for WebRTC) and nowadays Linux
distributions carry a new version so it's unecessary for our build
machines. No longer using this binary bundle will allow us to upgrade
our GStreamer dependency -- which now has stricter checks that we
are using at least version 1.18.

- Upgrade media to use newer versions of GStreamer / GLib dependencies
2024-01-05 08:01:58 +00:00
Martin Robinson
7e82c5c957
Compile Servo with the latest version of rust stable (#30831)
This completes the transition to compiling Servo with rust stable. Some
nightly-only features are still used when compiling the `script` and
`crown` crates, as well as for some style unit tests. These will likely
break with newer compiler versions, but `crown` can be disabled for them
conditionally. This is just the first step.

This has some caveats:

1. We need to disable setting up the special linker on Linux. The -Z
   option isn't supported with stable rust so using this is out --
   meanwhile we can't be sure that lld is installed on most systems.
2. `cargo fmt` still uses some unstable options, so we need to rely on
   the unstable toolchain just for running `fmt`. The idea is to fix this
   gradually.
2023-12-06 17:36:07 +00:00
Martin Robinson
e44ea6290a
bootstrap: Alphabetize and add 'm4' Ubuntu dependency (#30727)
It looks like `m4` is now required for builds on Debian-like systems.
2023-11-13 12:06:26 +00:00
bc-universe
9d10d230ac
Add support for EndeavourOS (#30513) 2023-10-06 20:58:06 +00:00
Delan Azabani
5d8d7c79c2
fix WebGPU runtime dependencies on linux (#30407) 2023-09-22 11:05:38 +00:00
Carlos Bentzen
0b86d65798
Add TUXEDO OS to mach bootstrap (#30363)
Signed-off-by: Carlos Bentzen <cadubentzen@gmail.com>
2023-09-15 04:20:32 +00:00
Samson
59d134133f
Use MozTools 4 and update mozjs (#30326)
* Update mozjs

* moztools4 in bootstrap

* no autoconf

* tidy

* switch to servo-build-deps

* update mozjs for real

* glue mozjs

* fmt

* move to servo/mozjs
2023-09-11 08:23:05 +00:00
Manuel Rego Casasnovas
cc4fe4981f
Add Raspbian GNU/Linux distro for mach bootstrap (#30223) 2023-08-28 11:13:25 +00:00
Mukilan Thiyagarajan
1efecf9b50
Use system lld on NixOS instead of rust-lld (#30123)
The -Zgcc-ld=lld flag makes rust use the rust-lld
linker that is distributed as part of rust toolchain.
However, this flag doesn't work on nixos correctly
as
  1) rust-lld needs to be patched to have the correct rpath
     to find libz.so
  2) the bin/gcc-ld/ld.lld wrapper which calls rust-lld also
     needs to be patched to use the correct dynamic loader
  3) rust-lld doesn't respect NIX_LDFLAGS which contains
     the additional search path derived from buildInputs.
     The system linkers on nixos are wrapped so that
     NIX_LDFLAGS is added as the rpath to the final binary.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2023-08-18 06:18:05 +00:00
Martin Robinson
bce7622cde
Switch to rustls and webpki-roots (#30025)
This change replaces OpenSSL with rustls and also the manually curated
CA certs file with webpki-roots (effectively the same thing, but as a
crate).

Generally speaking the design of the network stack is the same. Changes:

- Code around certificate overrides needed to be refactored to work with
  rustls so the various thread-safe list of certificates is refactored
  into `CertificateErrorOverrideManager`
- hyper-rustls takes care of setting ALPN protocols for HTTP requests,
  so for WebSockets this is moved to the WebSocket code.
- The safe set of cypher suites is chosen, which seem to correspond to
  the "Modern" configuration from [1]. This can be adjusted later.
- Instead of passing a string of PEM CA certificates around, an enum is
  used that includes parsed Certificates (or the default which reads
  them from webpki-roots).
- Code for starting up an SSL server for testing is cleaned up a little,
  due to the fact that the certificates need to be overriden explicitly
  now. This is due to the fact that the `webpki` crate is more stringent
  with self-signed certificates than SSL (CA certificates cannot used as
  end-entity certificates). [2]

1. https://wiki.mozilla.org/Security/Server_Side_TLS
2. https://github.com/briansmith/webpki/issues/114

Fixes #7888.
Fixes #13749.
Fixes #26835.
Fixes #29291.
2023-08-08 14:00:10 +00:00
Martin Robinson
633d9b0eb9 Windows bootstrap support 2023-07-03 21:40:24 +02:00
6543
e36444b6ce
recognize artix as valid distribution 2023-06-01 17:06:18 +02:00
Martin Robinson
faa8c0e967
Remove more Python 2 compatibility code
- os.environ is always `str` in Python 3.
- The only string type is `str` so we can stop using `six.str_types`.
- `iteritems()` isn't necessary because dicts have the `items()` method.
2023-05-29 13:56:03 +02:00
Martin Robinson
7d20f16d9f
Implement bootstrap-gstreamer for all platforms
This change makes it so that the Platform classes can now handle
installing GStreamer dependencies and properly setting up the
environment including when cross-compiling. For Windows and Linux
is now installed into `target/dependencies/gstreamer` when not installed
system-wide. In addition:

1. Creating and moving existing environment path append helpers to
   `util.py`.
2. Combining the `set_run_env` and `build_dev` functions and moving
   some outside code into them so that it can be shared. Now code that
   used to call `set_run_env` calls `build_dev` and then
   `os.environ.update(...)`.
3. Adding Python typing information in many places.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-05-25 08:22:21 +02:00
Martin Robinson
5be14ecc3c Start organizing platform-specific Python code
This starts to split platform-specific Python code into its own module,
which should help to tidy up our mach commands and make things more
reusable.
2023-05-19 13:08:43 +02:00