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

soroban-cli install instructions are incomplete on Ubuntu 22.04 #729

Closed
jacekn opened this issue Jun 29, 2023 · 3 comments
Closed

soroban-cli install instructions are incomplete on Ubuntu 22.04 #729

jacekn opened this issue Jun 29, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@jacekn
Copy link
Contributor

jacekn commented Jun 29, 2023

What version are you using?

I tried to use 0.8.0

What did you do?

I tried to install soroban cli using docs on Ubuntu 22.04 on amd64 platform.

Exact steps I followed:

  1. I run cargo install --locked --version 0.8.0 soroban-cli. This failed with the following:
   Compiling proc-macro2 v1.0.56
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)
  1. To work around the problem I install gcc using sudo apt-get install gcc
  2. I retried cargo install --locked --version 0.8.0 soroban-cli. This time if failed with:
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-o" "/tmp/cargo-install6vzfsz/release/build/link-cplusplus-cb722335163fd5c9/out/ffae553e737ce720-dummy.o" "-c" "/tmp/cargo-install6vzfsz/release/build/link-cplusplus-cb722335163fd5c9/out/dummy.cc"

  --- stderr

  error occurred: Failed to find tool. Is `c++` installed?
  1. To work around this I installed c++ using sudo apt install g++

What did you expect to see?

I expected install instructions to work on a vanilla Ubuntu 22.04 system.

What did you see instead?

I had to install two Ubuntu packages in order to install the CLI: gcc and g++

@jacekn jacekn added the bug Something isn't working label Jun 29, 2023
@willemneal
Copy link
Member

You should be able to use cargo-binstall, which would download a built binary.

First need to install cargo-binstall:

cargo install cargo-binstall

Or install cargo-binstall as they recommend:

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

Then can install soroban-cli:

cargo binstall soroban-cli

@jacekn
Copy link
Contributor Author

jacekn commented Jul 17, 2023

@willemneal thank you for extra info. I have not tested this but if those commands work and avoids pulling build dependencies then I'd fully support switching official docs to them.

@stellarsaur
Copy link
Contributor

cargo bininstall soroban-cli will be added to the docs (as well as updating cargo install instructions to include gcc and g++) as part of this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants