Created attachment 226910 [details] v1 (use "git am") Add BINARY_ALIAS to respect CC and LD when using lang/rust from pkg.FreeBSD.org, e.g. pkg seeding. While here, also pet portlint by adding USE_LDCONFIG. lang/rust hardcodes environment at build time, resulting in multimedia/librav1e build failure if the hardcoded CC and LD differ from the configured CC and LD, and the system toolchain does not exist and is provided by ports: Compiling autocfg v1.0.1 Compiling libc v0.2.92 Compiling rayon-core v1.9.0 Compiling cfg-if v1.0.0 Compiling proc-macro2 v1.0.24 Compiling memchr v2.3.4 Compiling unicode-xid v0.2.1 error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: could not compile `rayon-core` Passing RUSTFLAGS via {CONFIGURE,MAKE}_ENV (from git log) which worked for various ports did not work here, at least for me. Building lang/rust (bulk -S) unbroke the build for me, which suggests that Rust compiler hardcodes environment. ${CC} and ${LD} are enclosed in ""; I think that a user may set CC/LD containing spaces in an absolute path. Ignore git hashes in poudriere logs due to git detached HEAD used. 11.4/amd64: OK bulk diff https://codeberg.org/ei/misc/commit/0724fbd pkg diff https://codeberg.org/ei/misc/commit/c9d51ad testport https://codeberg.org/ei/misc/commit/49b492e 11.4/i386 OK: bulk diff https://codeberg.org/ei/misc/commit/7dcb0ae pkg diff https://codeberg.org/ei/misc/commit/596eafb testport https://codeberg.org/ei/misc/commit/45444d1 12.2/amd64: OK bulk diff https://codeberg.org/ei/misc/commit/0c1047b pkg diff https://codeberg.org/ei/misc/commit/f85779b testport https://codeberg.org/ei/misc/commit/4fd12c2 12.2/i386: OK bulk diff https://codeberg.org/ei/misc/commit/cd96cc9 pkg diff https://codeberg.org/ei/misc/commit/334f858 testport https://codeberg.org/ei/misc/commit/cb1ddf3 13.0/amd64: OK bulk diff https://codeberg.org/ei/misc/commit/a7308bd pkg diff https://codeberg.org/ei/misc/commit/d9ac2b8 testport https://codeberg.org/ei/misc/commit/8f4d107 13.0/aarch64 (via qemu-user-static): N/A ports-mgmt/poudriere-devel could not fetch lang/rust due to index issues in pkg.FreeBSD.org. lang/rust can't build on QEMU and is set as IGNORE for QEMU.
This is irrelevant. A proper fix would be to check why exactly CC/LD are not respected (maybe due to cargo-c checking something in lang/rust?). This is only a hack for an alternatively sane setup, there is 0 value of this PR. Closing this as a "not a bug", if you think that it is an issue, then reopen. Note, I would not be able to respond to feedback (to change or test something, etc) for a week or two.
(In reply to Evgeniy Khramtsov from comment #1) > This is only a hack for an alternatively sane setup Can you test 13.0/aarch64 native-xtoolchain with cc removed from the jail, e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257622#c5 ? Likely related to qemu-user-static poudriere jails, but I can't test yet, reopening.
multimedia/gstreamer1-plugins-rust also uses devel/cargo-c and hits the same error. Other USES=cargo ports work fine despite rustc itself relying on LD and *-sys crates often using CC.
Landed in ports 93924a20b38e.