Closed MaxIhlenfeldt closed 3 weeks ago
I've started working on this, if there are no build errors I'll upload a PR probably tomorrow.
Unfortunately there are build errors, one looks like a build race condition to a missing dependency, the other seems more difficult to fix:
FAILED: gen/third_party/crabbyavif/crabbyavif_dav1d_bindings.rs
python3 ../../build/rust/run_bindgen.py --exe ../../third_party/rust-toolchain/bin/bindgen --header ../../third_party/crabbyavif/src/sys/dav1d-sys/wrapper.h --depfile obj/third_party/crabbyavif/crabbyavif_dav1d_bindings.d --output gen/third_party/crabbyavif/crabbyavif_dav1d_bindings.rs --libclang-path ../../third_party/rust-toolchain/lib --ld-library-path ../../../recipe-sysroot-native/usr/lib --bindgen-flags no-doc-comments generate=functions,types,vars,methods,constructors,destructors allowlist-item=dav1d_close allowlist-item=dav1d_data_unref allowlist-item=dav1d_data_wrap allowlist-item=dav1d_default_settings allowlist-item=dav1d_error allowlist-item=dav1d_get_picture allowlist-item=dav1d_open allowlist-item=dav1d_picture_unref allowlist-item=dav1d_send_data -- -DCONFIG_LOG=0 -DHAVE_PTHREAD_GETAFFINITY_NP=1 -DHAVE_PTHREAD_SETAFFINITY_NP=1 -DDAV1D_API= -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS-D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -D_GLIBCXX_ASSERTIONS=1 -D__ARM_NEON__=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/dav1d/libdav1d -I../../third_party/dav1d/libdav1d/include -I../../third_party/dav1d/libdav1d/include/dav1d -I../../third_party/dav1d/config/linux/arm64 -I../../third_party/dav1d/version -I../.. -Igen -Wall -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-unknown-warning-option -Wno-cast-function-type -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -Wno-invalid-offsetof -Wno-vla-extension -Wno-thread-safety-reference-return -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fno-sized-deallocation -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -mllvm -inlinehint-threshold=360 -fwhole-program-vtables -mbranch-protection=standard -mno-outline -ffile-compilation-dir=. -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-math-errno -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -std=c11 -resource-dir ../../../recipe-sysroot-native/usr/lib/clang/latest -fparse-all-comments -fvisibility=default
error: unsupported option '-mbranch-protection=' for target 'x86_64-unknown-linux-gnu'
../../third_party/dav1d/libdav1d/include/dav1d/dav1d.h:32:10: fatal error: 'stdarg.h' file not found
panicked at bindgen-cli/main.rs:52:36:
Unable to generate bindings: ClangDiagnostic("error: unsupported option '-mbranch-protection=' for target 'x86_64-unknown-linux-gnu'\n../../third_party/dav1d/libdav1d/include/dav1d/dav1d.h:32:10: fatal error: 'stdarg.h' file not found\n")
Traceback (most recent call last):
File "/home/gitlab-runner/yocto-chromium/builds/ci-chromium-wayland-qemuarm64-scarthgap/tmp-glibc/work/cortexa57-oe-linux/chromium-ozone-wayland/127.0.6533.88/chromium-127.0.6533.88/out/Release/../../build/rust/run_bindgen.py", line 118, in <module>
main()
File "/home/gitlab-runner/yocto-chromium/builds/ci-chromium-wayland-qemuarm64-scarthgap/tmp-glibc/work/cortexa57-oe-linux/chromium-ozone-wayland/127.0.6533.88/chromium-127.0.6533.88/out/Release/../../build/rust/run_bindgen.py", line 106, in main
subprocess.check_call([args.exe, *genargs], env=env)
File "/home/gitlab-runner/yocto-chromium/builds/ci-chromium-wayland-qemuarm64-scarthgap/tmp-glibc/work/cortexa57-oe-linux/chromium-ozone-wayland/127.0.6533.88/recipe-sysroot-native/usr/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
(and a second, similar error for crabbyavif_libyuv_bindings.rs
)
Filed https://issues.chromium.org/issues/357017325 as I think the error has something to do with how upstream sets up bindgen.
Haven't heard back on the upstream bug yet, I've decided to revert the commit that added the crabbyavif code to the build, as it's still an experimental feature behind a flag. Build is running, hopefully it'll succeed now, then I'll upload the PR.
Release notes: