Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUSTFLAGS on Alpine #127498

Closed
mo8it opened this issue Jul 8, 2024 · 1 comment
Closed

RUSTFLAGS on Alpine #127498

mo8it opened this issue Jul 8, 2024 · 1 comment
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.

Comments

@mo8it
Copy link
Contributor

mo8it commented Jul 8, 2024

Compiling with cargo and RUSTFLAGS fails on Alpine.

Here is how to reproduce it:

# Docker
docker run -it --rm rust:alpine sh -c "cargo new foo && cd foo && RUSTFLAGS='-A warnings' cargo r"

# Podman
podman run -it --rm docker.io/library/rust:alpine sh -c "cargo new foo && cd foo && RUSTFLAGS='-A warnings' cargo r"

Note that the command works if you remove the RUSTFLAGS environment variable.

Output
error: output of --print=file-names missing when learning about target-specific information from rustc
command was: `/usr/local/rustup/toolchains/1.79.0-x86_64-unknown-linux-musl/bin/rustc - --crate-name ___ --print=file-names -A warnings --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg`
                                                                                                                                                                          
--- stdout
___
lib___.rlib
lib___.a
lib___.so
/usr/local/rustup/toolchains/1.79.0-x86_64-unknown-linux-musl
off
packed
unpacked
___
debug_assertions
panic="unwind"
proc_macro
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="musl"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="linux"
target_pointer_width="64"
target_vendor="unknown"
unix

This seems like an argument parsing problem to me.

The background is the following Rustlings issue: rust-lang/rustlings#2036

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 8, 2024
@ehuss
Copy link
Contributor

ehuss commented Jul 9, 2024

Thanks for the report! I believe this is a duplicate of rust-lang/cargo#8010, so closing in favor of that.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
@saethlin saethlin added T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants