fix WebGPU runtime dependencies on linux (#30407)

This commit is contained in:
Delan Azabani 2023-09-22 19:05:38 +08:00 committed by GitHub
parent 29616c6dcf
commit 5d8d7c79c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 7 deletions

View file

@ -166,7 +166,11 @@ Run Servo with the command:
* `GStreamer` >=1.16
* `gst-plugins-bad` >=1.16
* `libXcursor`
* `libXrandr`
* `libXi`
* `libxkbcommon`
* `vulkan-loader`
## Developing

View file

@ -44,8 +44,15 @@ clangStdenv.mkDerivation rec {
# Enable colored cargo and rustc output
TERMINFO = "${ncurses.out}/share/terminfo";
# Fix missing libraries errors (those libraries aren't linked against, so we need to dynamically supply them)
LD_LIBRARY_PATH = lib.makeLibraryPath [ xorg.libXcursor xorg.libXrandr xorg.libXi libxkbcommon ];
# Provide libraries that arent linked against but somehow required
LD_LIBRARY_PATH = lib.makeLibraryPath [
# Fixes missing library errors
xorg.libXcursor xorg.libXrandr xorg.libXi libxkbcommon
# [WARN script::dom::gpu] Could not get GPUAdapter ("NotFound")
# TLA Err: Error: Couldn't request WebGPU adapter.
vulkan-loader
];
shellHook = ''
# Fix invalid option errors during linking

View file

@ -16,7 +16,15 @@ import distro
from .. import util
from .base import Base
# Please keep these in sync with the packages in README.md
# Please keep these in sync with the packages on the wiki, using the instructions below
# https://github.com/servo/servo/wiki/Building
# https://packages.debian.org
# https://packages.ubuntu.com
# 1. open devtools
# 2. paste in the whole APT_PKGS = [...]
# 3. copy(`sudo apt install ${APT_PKGS.join(" ")}`)
# 4. paste into https://github.com/servo/servo/wiki/Building#debian-based-distributions
APT_PKGS = ['git', 'curl', 'libx11-dev', 'libfreetype6-dev',
'libgl1-mesa-dri', 'libglib2.0-dev', 'xorg-dev', 'gperf', 'g++',
'build-essential', 'cmake', 'liblzma-dev', 'libxmu6', 'libxmu-dev',
@ -25,7 +33,13 @@ APT_PKGS = ['git', 'curl', 'libx11-dev', 'libfreetype6-dev',
'libharfbuzz-dev', 'ccache', 'clang', 'libunwind-dev',
'libgstreamer1.0-dev', 'libgstreamer-plugins-base1.0-dev',
'libgstreamer-plugins-bad1.0-dev',
'libunwind-dev', 'llvm-dev']
'libunwind-dev', 'llvm-dev', 'libvulkan1']
# https://packages.fedoraproject.org
# 1. open devtools
# 2. paste in the whole DNF_PKGS = [...]
# 3. copy(`sudo dnf install ${DNF_PKGS.join(" ")}`)
# 4. paste into https://github.com/servo/servo/wiki/Building#fedora
DNF_PKGS = ['libtool', 'gcc-c++', 'libXi-devel', 'freetype-devel',
'libunwind-devel', 'mesa-libGL-devel', 'mesa-libEGL-devel',
'glib2-devel', 'libX11-devel', 'libXrandr-devel', 'gperf',
@ -35,7 +49,13 @@ DNF_PKGS = ['libtool', 'gcc-c++', 'libXi-devel', 'freetype-devel',
'clang', 'clang-libs', 'llvm', 'python3-devel',
'gstreamer1-devel', 'gstreamer1-plugins-base-devel',
'gstreamer1-plugins-bad-free-devel', 'libjpeg-turbo-devel',
'zlib', 'libjpeg']
'zlib', 'libjpeg', 'vulkan-loader']
# https://voidlinux.org/packages/
# 1. open devtools
# 2. paste in the whole XBPS_PKGS = [...]
# 3. copy(`sudo xbps-install ${XBPS_PKGS.join(" ")}`)
# 4. paste into https://github.com/servo/servo/wiki/Building#void-linux
XBPS_PKGS = ['libtool', 'gcc', 'libXi-devel', 'freetype-devel',
'libunwind-devel', 'MesaLib-devel', 'glib-devel', 'pkg-config',
'libX11-devel', 'libXrandr-devel', 'gperf', 'bzip2-devel',
@ -43,7 +63,7 @@ XBPS_PKGS = ['libtool', 'gcc', 'libXi-devel', 'freetype-devel',
'cmake', 'libXcursor-devel', 'libXmu-devel', 'dbus-devel',
'ncurses-devel', 'harfbuzz-devel', 'ccache', 'glu-devel',
'clang', 'gstreamer1-devel',
'gst-plugins-base1-devel', 'gst-plugins-bad1-devel']
'gst-plugins-base1-devel', 'gst-plugins-bad1-devel', 'vulkan-loader']
GSTREAMER_URL = \
"https://github.com/servo/servo-build-deps/releases/download/linux/gstreamer-1.16-x86_64-linux-gnu.20190515.tar.gz"