Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 888936

Summary: dev-lang/rust-1.66.0 calls cc directly
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Rust Project <rust>
Status: CONFIRMED ---    
Severity: normal CC: herrtimson, joe, navi, ostash, randy, rust
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-12-30 06:17:02 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/rust-1.66.0 calls cc directly.
Discovered on: amd64 (internal ref: ci)

NOTE:
As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different CC implementation (like clang). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks].
Comment 1 Agostino Sarubbo gentoo-dev 2022-12-30 06:17:05 UTC
Created attachment 845722 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-12-30 06:17:07 UTC
Error(s) that match a know pattern:


  = note: No such file or directory (os error 2)
RuntimeError: failed to run: /var/tmp/portage/dev-lang/rust-1.66.0/work/rust-stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.66.0/work/rustc-1.66.0-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen
error: linker `cc` not found
Comment 3 Tom Gillespie 2023-01-14 02:36:12 UTC
Confirming issue is present in 1.66.1 when building on musl. Also, wow that use of "linking with" is quite confusing ... that would be "linking using `cc`" (oof).

error: linking with `cc` failed: signal: 11 (SIGSEGV) (core dumped)
Comment 4 12101111 2023-01-21 03:19:33 UTC
Linker can be set using Cargo config: https://doc.rust-lang.org/cargo/reference/config.html
Comment 5 Joe Kappus 2023-02-12 06:54:04 UTC
*** Bug 893264 has been marked as a duplicate of this bug. ***
Comment 6 Ostashevskyi Viktor 2023-11-19 14:31:03 UTC
I'd like to add that build process do not pass user-provided CFLAGS/CXXFLAGS to bundled libssh, libgit, nghttp2.