Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

error: linking with cc failed: exit code: 1 #47

Closed
2 tasks done
Eligioo opened this issue Nov 29, 2019 · 4 comments
Closed
2 tasks done

error: linking with cc failed: exit code: 1 #47

Eligioo opened this issue Nov 29, 2019 · 4 comments

Comments

@Eligioo
Copy link
Member

Eligioo commented Nov 29, 2019

New issue checklist

Tried to build core-rs from source by cloning from Github. I switched to nightly build with rustup default nightly. As soon as I started building with cargo +nightly build the compiling stopped with the following error:
error: linking with `cc` failed: exit code: 1

The README of core-rs states that besides rust nightly you need gcc, pkg-config and libssl-dev, which I installed through apt.

Solution

Install gcc-multilib as well and it started compiling with no issues.

@Eligioo
Copy link
Member Author

Eligioo commented Nov 29, 2019

Weird though, after I apt remove gcc-mutlilib, it's still able to compile now. Guess gcc linker wasn't found and after installing gcc-multilib it was somehow.

@sisou
Copy link
Member

sisou commented Nov 29, 2019

Did your install of gcc-multilib install other packages as dependencies?

@Eligioo
Copy link
Member Author

Eligioo commented Nov 29, 2019

@sisou It is a fresh Hetzner server with nodejs installed already. I added rustup and switched to nightly. Then apt install gcc pkg-config libssl-dev
After installation I tried to compile the repo which failed with the error stated above. Then I did an apt install gcc-multilib and was able to compile the project. When it was done I removed the target folder and did apt remove gcc-multilib and was still able to compile.

Hope it makes sense :-)

@riptl
Copy link
Contributor

riptl commented Nov 29, 2019

@jgraef I think it makes sense to add build-essential to the list of prerequisites. It was probably some missing library.

@Eligioo Eligioo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants