mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Workaround bug in gstreamer binaries
The official gstreamer .pkg distribution should contain 'relocatable' dylibs, but as discovered in #29732, some dylibs have absolute links to liblzma.5.dylibs Since /opt/homebrew is the default install location on Apple Silicion, this will cause the packaging & build steps to fail, even if 'xz' package is installed via homebrew. This is a temporary fix until upstream fixes the bug and makes the package truly 'relocatable'. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
This commit is contained in:
parent
d798376d7c
commit
80087f31c8
3 changed files with 15 additions and 0 deletions
|
@ -59,6 +59,7 @@ NOTE: run these steps after you've cloned the project locally.
|
||||||
``` sh
|
``` sh
|
||||||
cd servo
|
cd servo
|
||||||
bash etc/install_macos_gstreamer.sh
|
bash etc/install_macos_gstreamer.sh
|
||||||
|
brew bundle install --file=etc/homebrew/Brewfile
|
||||||
pip install virtualenv
|
pip install virtualenv
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
3
etc/homebrew/Brewfile
Normal file
3
etc/homebrew/Brewfile
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Runtime dependencies
|
||||||
|
|
||||||
|
brew "xz"
|
|
@ -872,6 +872,17 @@ def copy_dependencies(binary_path, lib_path, gst_root):
|
||||||
if is_system_library(f):
|
if is_system_library(f):
|
||||||
continue
|
continue
|
||||||
full_path = resolve_rpath(f, gst_root)
|
full_path = resolve_rpath(f, gst_root)
|
||||||
|
# fixme(mukilan): this is a temporary solution to a bug
|
||||||
|
# in the official gstreamer packages. Few gstreamer dylibs
|
||||||
|
# like 'libavcodec.59.dylib' have absolute paths to liblzma
|
||||||
|
# instead of @rpath based to be relocatable. The homebrew
|
||||||
|
# prefix is configurable in general and is /opt/homebrew
|
||||||
|
# on Apple Silicon
|
||||||
|
if full_path == "/usr/local/opt/xz/lib/liblzma.5.dylib" and (
|
||||||
|
not path.exists("/usr/local/opt/xz")
|
||||||
|
and path.exists("/opt/homebrew/")):
|
||||||
|
full_path = "/opt/homebrew/lib/liblzma.5.dylib"
|
||||||
|
|
||||||
need_relinked = set(otool(full_path))
|
need_relinked = set(otool(full_path))
|
||||||
new_path = path.join(lib_path, path.basename(full_path))
|
new_path = path.join(lib_path, path.basename(full_path))
|
||||||
if not path.exists(new_path):
|
if not path.exists(new_path):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue