ci: fix the Windows, Linux, macOS and ARM64 failures
- Windows: vcpkg ships `pkgconf` without the `pkg-config` shim, so the oak-ffmpeg-link build script failed with "program not found". Probe `pkg-config`, fall back to `pkgconf` (or honor `PKG_CONFIG`), and join the child's `PKG_CONFIG_PATH` with the platform separator instead of a hard-coded `:` (which split `C:\...` apart). - Linux (and openKylin): the test binaries link the VAAPI stack via vcpkg's FFmpeg; install the `libva2`/`libva-drm2`/`libvdpau1` runtime packages the loader needs. - macOS: bump the gpui submodule (OakVideoEditorCommunity/oak-gpui@fix/macos-metal-layer-and-dead-code): `setColorspace:` now sends to the `MetalLayerRef` (`self.layer.as_ref()` made `&*layer` the owned type, which is not `objc::Message`), and the viewer's `GpuFrameEntry` carries the non-Linux dead-code allowance. - openKylin ARM64: switch the ocio patch to the fork's fix/aarch64-c-char rev. Upstream models C `char*` as `*const i8`; aarch64's `c_char` is u8, so the crates did not compile. The fix uses `c_char` throughout ocio-sys and the ocio-rs boundary (pushed as 30338c6a169bbbada862fb3ac256e79b656159cf).
This commit is contained in:
@@ -50,6 +50,7 @@ jobs:
|
||||
libasound2-dev libpulse-dev libsndfile1-dev \
|
||||
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
||||
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
||||
libva2 libva-drm2 libvdpau1 \
|
||||
autoconf autoconf-archive automake libtool
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
@@ -463,6 +464,7 @@ jobs:
|
||||
libasound2-dev libpulse-dev libsndfile1-dev \
|
||||
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
||||
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
||||
libva2 libva-drm2 libvdpau1 \
|
||||
gdb file autoconf autoconf-archive automake libtool
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Generated
+2
-3
@@ -5084,8 +5084,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ocio-rs"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f3492534019b59e29dba06014f907dd12824537ed4d293d4108c4bfc669de7fd"
|
||||
source = "git+https://github.com/Mike-Solar/ocio-rs.git?rev=30338c6a169bbbada862fb3ac256e79b656159cf#30338c6a169bbbada862fb3ac256e79b656159cf"
|
||||
dependencies = [
|
||||
"ocio-sys",
|
||||
"thiserror 1.0.69",
|
||||
@@ -5094,7 +5093,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ocio-sys"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/Mike-Solar/ocio-rs.git?branch=main#ddb677d8a71d1047c2dd3f8a04fc88f7c5c23ccc"
|
||||
source = "git+https://github.com/Mike-Solar/ocio-rs.git?rev=30338c6a169bbbada862fb3ac256e79b656159cf#30338c6a169bbbada862fb3ac256e79b656159cf"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cmake",
|
||||
|
||||
+5
-4
@@ -70,8 +70,9 @@ opt-level = 1
|
||||
|
||||
# ocio-sys 0.2.1's vendored sources fail to build on GCC >= 16 (yaml-cpp
|
||||
# misses <cstdint>) and misdetect a system zlib-ng (minizip-ng then emits
|
||||
# zng_* symbols the vendored zlib cannot satisfy). The fork tracks
|
||||
# shaloong/ocio-rs main plus both build fixes; return to the crates.io
|
||||
# release once it carries them.
|
||||
# zng_* symbols the vendored zlib cannot satisfy); upstream also hard-codes
|
||||
# `char*` as `*const i8`, which does not compile on aarch64 (c_char = u8).
|
||||
# The fork carries all three fixes; return to the crates.io release once it
|
||||
# does (the ocio-rs patch pulls the fork's `ocio-sys` path dependency too).
|
||||
[patch.crates-io]
|
||||
ocio-sys = { git = "https://github.com/Mike-Solar/ocio-rs.git", branch = "main" }
|
||||
ocio-rs = { git = "https://github.com/Mike-Solar/ocio-rs.git", rev = "30338c6a169bbbada862fb3ac256e79b656159cf" }
|
||||
|
||||
@@ -64,29 +64,48 @@ fn main() {
|
||||
}
|
||||
|
||||
let pkg_path = env_or_dotenv("PKG_CONFIG_PATH").unwrap_or_default();
|
||||
let output = Command::new("pkg-config")
|
||||
.arg("--static")
|
||||
.arg("--libs")
|
||||
.args([
|
||||
"libavformat",
|
||||
"libavcodec",
|
||||
"libavfilter",
|
||||
"libavdevice",
|
||||
"libavutil",
|
||||
"libswscale",
|
||||
"libswresample",
|
||||
])
|
||||
.env(
|
||||
"PKG_CONFIG_PATH",
|
||||
format!(
|
||||
"{}{}{}",
|
||||
pc_dir.display(),
|
||||
if pkg_path.is_empty() { "" } else { ":" },
|
||||
pkg_path
|
||||
),
|
||||
)
|
||||
.output()
|
||||
.expect("pkg-config is required when FFMPEG_DIR is set");
|
||||
// The pkg-config child must see the FFMPEG_DIR .pc files. Join with the
|
||||
// platform separator (`:` on Unix, `;` on Windows): formatting a `:`
|
||||
// into a Windows `C:\...` path list makes pkgconf split the drive
|
||||
// letter off.
|
||||
let joined_path = {
|
||||
let mut paths = vec![pc_dir.clone()];
|
||||
if !pkg_path.is_empty() {
|
||||
paths.extend(std::env::split_paths(&pkg_path));
|
||||
}
|
||||
std::env::join_paths(paths).unwrap_or_default()
|
||||
};
|
||||
const FFMPEG_LIBS: [&str; 7] = [
|
||||
"libavformat",
|
||||
"libavcodec",
|
||||
"libavfilter",
|
||||
"libavdevice",
|
||||
"libavutil",
|
||||
"libswscale",
|
||||
"libswresample",
|
||||
];
|
||||
let run = |program: &str| {
|
||||
Command::new(program)
|
||||
.arg("--static")
|
||||
.arg("--libs")
|
||||
.args(FFMPEG_LIBS)
|
||||
.env("PKG_CONFIG_PATH", &joined_path)
|
||||
.output()
|
||||
};
|
||||
// vcpkg ships `pkgconf` on Windows without a `pkg-config` shim (macOS
|
||||
// Homebrew ships both); fall back on the standard name first, then
|
||||
// pkgconf. Only a missing program falls back — a pkg-config that runs
|
||||
// and fails is a real error (bad .pc, missing libs) and must surface.
|
||||
let output = match env_or_dotenv("PKG_CONFIG").filter(|p| !p.trim().is_empty()) {
|
||||
Some(custom) => run(&custom).expect("PKG_CONFIG points at a program that failed to run"),
|
||||
None => match run("pkg-config") {
|
||||
Ok(output) => output,
|
||||
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {
|
||||
run("pkgconf").expect("pkg-config/pkgconf is required when FFMPEG_DIR is set")
|
||||
}
|
||||
Err(e) => panic!("failed to run pkg-config: {e}"),
|
||||
},
|
||||
};
|
||||
if !output.status.success() {
|
||||
panic!(
|
||||
"pkg-config --static --libs failed for the FFMPEG_DIR install: {}",
|
||||
|
||||
+1
-1
Submodule gpui updated: 868d97e60c...56be9f7582
Reference in New Issue
Block a user