From 9c2bdffc2a68c78dd960a03114b1d905091680c1 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 28 Jun 2021 12:43:37 +0200 Subject: [PATCH] chromiumDev: Fix build errors due to the older system FFmpeg The final linking still fails though, even with llvm-git. We might have to diable use_thin_lto for now: ld.lld: error: undefined symbol: snappy::Compress(char const*, unsigned long, std::__1::basic_string, std::__1::allocator >*) >>> referenced by compression_module.cc >>> thinlto-cache/Thin-ed5ed5.tmp.o:(reporting::CompressionModule::CompressRecord(std::__1::basic_string, std::__1::allocator >, base::OnceCallback, std::__1::allocator >, absl::optional)>) const) clang-13: error: linker command failed with exit code 1 (use -v to see invocation) (cherry picked from commit fcdcb819362836505e059ef1c5cb33c737883400) --- .../networking/browsers/chromium/common.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index c2417d9f524..db0d1606fa0 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -175,6 +175,18 @@ let sha256 = "1bxdhxmiy6h4acq26lq43x2mxx6rawmfmlgsh5j7w8kyhkw5af0c"; revert = true; }) + # To fix build errors with the older system FFmpeg: + (githubPatch { + # unbundle: add libavcodec/packet.h to shim headers + commit = "e4d228ec30607b06bf3fed77497abef89c29966a"; + sha256 = "02jg2bdmgjcpmk6alb72jc93wy3nf2fpa72hb4aarq337i2mwn4v"; + }) + (githubPatch { + # Roll src/third_party/ffmpeg/ 7e1d53a09..cf7ee6598 (1000 commits) + commit = "3ec3b2992238d4b4764f99f04605e154688c7990"; + sha256 = "1fwb154s5qcis490rvcvm14zrmaj59g5lg9zg8ada36vw9hycbrf"; + revert = true; + }) ]; postPatch = ''