nimiq / core-rs

Official Rust implementation of the Nimiq protocol
https://nimiq.com
Other
74 stars 10 forks source link

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

Closed Eligioo closed 1 year ago

Eligioo commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

Eligioo commented 4 years ago

@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 commented 4 years ago

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