On a system with sys-devel/gcc-config[-native-symlinks] alacritty fails to build as: """ error: failed to run custom build command for `libloading v0.5.2` ... Caused by: process didn't exit successfully: `/tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/alacritty-0.4.3-rc1/target/release/build/libloading-c9a0a1641399005d/build-script-build` (exit code: 1) --- stdout cargo:rustc-link-lib=dl TARGET = Some("x86_64-unknown-linux-gnu") OPT_LEVEL = Some("3") HOST = Some("x86_64-unknown-linux-gnu") CC_x86_64-unknown-linux-gnu = None CC_x86_64_unknown_linux_gnu = None HOST_CC = None CC = None CFLAGS_x86_64-unknown-linux-gnu = None CFLAGS_x86_64_unknown_linux_gnu = None HOST_CFLAGS = None CFLAGS = Some("-march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector -frecord-gcc-switches -frecord-gcc-switches") CRATE_CC_NO_DEFAULTS = None DEBUG = Some("true") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-march=sandybridge" "-mtune=sandybridge" "-maes" "--param=l1-cache-size=32" "--param=l1-cache-line-size=64" "--param=l2-cache-size=8192" "-O2" "-pipe" "-fdiagnostics-show-option" "-frecord-gcc-switches" "-Wall" "-Wextra" "-Wstack-protector" "-frecord-gcc-switches" "-frecord-gcc-switches" "-o" "/tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/alacritty-0.4.3-rc1/target/release/build/libloading-a9d122e8698113c8/out/src/os/unix/global_static.o" "-c" "src/os/unix/global_static.c" --- stderr error occurred: Failed to find tool. Is `cc` installed? warning: build failed, waiting for other jobs to finish... error: build failed * ERROR: x11-terms/alacritty-0.4.3_rc1::gentoo failed (compile phase): * cargo build failed """ That means alacritty does not respect user's or Gentoo's default of CC=$(gc-getCC), or equivalent. Maybe CC or HOST_CC should be set?
tc-export CC works, I've added AR just in case, as it's used by cc crate. maybe it'll need to be adjusted once rust supports cross-compiling in gentoo, but tc-export is good enough for now.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=941788b2803ed563bdc1984c7966df1b86bda4fa commit 941788b2803ed563bdc1984c7966df1b86bda4fa Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-06-01 23:08:14 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-06-01 23:08:28 +0000 x11-terms/alacritty: respect CC Closes: https://bugs.gentoo.org/726428 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> x11-terms/alacritty/alacritty-0.4.2-r1.ebuild | 3 ++- x11-terms/alacritty/alacritty-0.4.3.ebuild | 3 ++- x11-terms/alacritty/alacritty-9999.ebuild | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
just for reference, flags it respect documented here https://crates.io/crates/cc
cargo.eclass should export this...
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fd7ffef828ccbdf83fff0eb4aac58ae7f5d1bc5 commit 8fd7ffef828ccbdf83fff0eb4aac58ae7f5d1bc5 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-06-02 08:53:05 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-06-02 08:54:57 +0000 x11-terms/alacritty: remove CC export how set in eclass Bug: https://bugs.gentoo.org/726428 Bug: https://bugs.gentoo.org/726714 This reverts commit 941788b2803ed563bdc1984c7966df1b86bda4fa. Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> x11-terms/alacritty/alacritty-0.4.2-r1.ebuild | 3 +-- x11-terms/alacritty/alacritty-0.4.3.ebuild | 3 +-- x11-terms/alacritty/alacritty-9999.ebuild | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d3f2059166f6d8c460c7e60523a3e224438348d commit 6d3f2059166f6d8c460c7e60523a3e224438348d Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-06-02 08:44:40 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-06-02 08:54:56 +0000 cargo.eclass: tc-export AR CC Bug: https://bugs.gentoo.org/726428 Closes: https://bugs.gentoo.org/726714 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> eclass/cargo.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)