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

Error : linking with cc failed: exit status: 1 in Rust #124880

Open
VyomPatel0109 opened this issue May 8, 2024 · 5 comments
Open

Error : linking with cc failed: exit status: 1 in Rust #124880

VyomPatel0109 opened this issue May 8, 2024 · 5 comments
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.

Comments

@VyomPatel0109
Copy link

VyomPatel0109 commented May 8, 2024

Error : linking with cc failed: exit status: 1

I got above error when I tried to run my rust project using Cargo run command on free tier EC2 instance of AWS. How to resolve it?

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 8, 2024
@jieyouxu jieyouxu added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 13, 2024
@jieyouxu
Copy link
Contributor

jieyouxu commented May 13, 2024

We need more information than that to even try to understand what is wrong.

  • What's the rustc version? (rustc --version --verbose)
  • Please post the complete error message. Error : linking with cc failed: exit status: 1 is incredibly vague. Do you have a dependency that has a build script that assumes some library is available to link to (e.g. some *-sys crate)?
  • How can we reproduce your issue? Do you have a cargo project that reproduces the linking failed issue without being in the EC2 environment? I.e. what's your Cargo.toml?

@jieyouxu jieyouxu removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 13, 2024
@WyntersN
Copy link

我们需要更多的信息才能尝试了解问题所在。

  • rustc 版本是什么?( rustc --version --verbose)
  • 请发布_完整的_错误消息。Error : linking with cc failed: exit status: 1非常模糊。您是否有一个依赖项,该依赖项具有一个构建脚本,该脚本假设可以链接到某些库(例如某些*-sys板条箱)?
  • 我们如何重现您的问题?_您是否有一个货物项目可以在不_处于 EC2 环境中的情况下重现链接失败的问题?

release: 1.78.0
LLVM version: 18.1.2

could not compile rust-i18n-macro (lib) due to 1 previous error

Error: Cargo build failed from Linux

@jieyouxu
Copy link
Contributor

Please also post your Cargo.toml. "linking with cc failed" usually indicates that one or more of your dependencies assumes or requires some library to be available on your system, but that said library is not available to the linker for one reason or another.

@jieyouxu jieyouxu added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 13, 2024
@WyntersN
Copy link

Please also post your Cargo.toml. "linking with cc failed" usually indicates that one or more of your dependencies assumes or requires some library to be available on your system, but that said library is not available to the linker for one reason or another.

Is there any way? I'm using Docker

docker rust:alpine3.19

@WyntersN
Copy link

WyntersN commented May 14, 2024

alpine3.19 build success

apk update
apk add --no-cache -U build-base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.
Projects
None yet
Development

No branches or pull requests

4 participants