From 6d3ae933f42fc3508cb9098212dd0149c7e1b8d3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 22 Oct 2021 05:41:10 +0300 Subject: [PATCH] librsvg: fix binfmt cross-compiling librsvg-aarch64-unknown-linux-gnu> error: linker `cc` not found librsvg-aarch64-unknown-linux-gnu> | librsvg-aarch64-unknown-linux-gnu> = note: No such file or directory (os error 2) librsvg-aarch64-unknown-linux-gnu> error: could not compile `librsvg` due to previous error librsvg-aarch64-unknown-linux-gnu> make[2]: *** [Makefile:1572: /build/librsvg-2.52.0/target/aarch64-unknown-linux-gnu/release/rsvg-convert] Error 101 --- pkgs/development/libraries/librsvg/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index c59a80c0e0f6..25f8209dd3d1 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -105,6 +105,9 @@ stdenv.mkDerivation rec { # Fix thumbnailer path sed -e "s#@bindir@\(/gdk-pixbuf-thumbnailer\)#${gdk-pixbuf}/bin\1#g" \ -i gdk-pixbuf-loader/librsvg.thumbnailer.in + + # 'error: linker `cc` not found' when cross-compiling + export RUSTFLAGS="-Clinker=$CC" ''; # Not generated when cross compiling.