Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 726428 - =x11-terms/alacritty-0.4.3_rc1 calls 'cc' directly
Summary: =x11-terms/alacritty-0.4.3_rc1 calls 'cc' directly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2020-05-31 11:15 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-06-02 08:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-31 11:15:37 UTC
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?
Comment 1 Georgy Yakovlev archtester gentoo-dev 2020-06-01 23:08:09 UTC
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.
Comment 2 Larry the Git Cow gentoo-dev 2020-06-01 23:08:51 UTC
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(-)
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-06-01 23:10:42 UTC
just for reference, flags it respect documented here
https://crates.io/crates/cc
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-06-01 23:12:44 UTC
cargo.eclass should export this...
Comment 5 Larry the Git Cow gentoo-dev 2020-06-02 08:55:17 UTC
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(-)