Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

error: could not compile libsecp256k1 #2631

Closed
pierorolando1 opened this issue Dec 12, 2021 · 14 comments
Closed

error: could not compile libsecp256k1 #2631

pierorolando1 opened this issue Dec 12, 2021 · 14 comments

Comments

@pierorolando1
Copy link

image

I get this error when I run cargo install spl-token-cli, help
@joncinque
Copy link
Contributor

Hi there! We don't use GitHub for support, so you can instead join our discord and check out the #developer-support channel https://discord.gg/9xkMfbfu

There isn't much information in your screenshot, but issues like this often are due to an old version of Rust. Try upgrading to the latest stable, 1.57 currently, and try again.

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

I have the same issue
image
Installed Solana tools 9.0 and rust 1.57

@pierorolando1 could you please share how you solve this issue, thnaks.

@pierorolando1
Copy link
Author

@grglzrv I was trying to do that in a Digital Ocean Cluster, I don't know why but it was not working, later, I try to do the same thing in my linux personal computer (Arch Linux), and works, I recommend u to tried the same thing in a virtual box or in docker container

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

I used AWS ec2 VM - Ubuntu version 20.04.3 LTS (Focal Fosa) free tier, @joncinque could you please check out this issue, the problem is not resolved yet. Thanks.

@irishdan
Copy link

Same for me. also on digitalocean Ubuntu 20

@joncinque
Copy link
Contributor

Looks to be a RAM issue, based on an issue in their repo: paritytech/libsecp256k1#94

I tried this again on a blank Docker container running Ubuntu 20.04 and was able to compile everything, which leads me to believe this issue.

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

@joncinque I don't think that is the actual issue, you may use VM by Linode with 1Gb RAM with Ubuntu 21.10 and you gonna see that everything will be compiled correctly, Your test with docker container, the image uses your kernel, etc., you may test it with real VM with Ubuntu 20.04 and Ubuntu 21.10 with 1GB RAM then you gonna see that the compilation will pass.

@joncinque
Copy link
Contributor

@grglzrv Sorry, I'm still not able to reproduce this anywhere. I just tried on a raspberry pi and it worked there too (albeit after a long wait). Either way, until there's something concrete, let's take this discussion to discord, where it will be much easier to respond

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

@joncinque I have tried on raspberry pi 4gb with docker image - ubuntu:21.10 but i got failed to install solana tools, i was not able to installed it on rasp pi, could you please share your steps how you install it.

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

i got this error:

sh: 156: /tmp/tmp.G9QiqTakVD/solana-install-init: Exec format error

pi@raspberrypi:~ $
pi@raspberrypi:~ $ docker run -d -it --name sol-token -h sol-token ubuntu:21.10
224fe270295b287d6dd36d352892ac01ead1ba81cd6fc2f41bfc27bf4c721df7
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $
pi@raspberrypi:~ $ docker exec -it sol-token bash
root@sol-token:/#
root@sol-token:/# apt update
Get:1 http://ports.ubuntu.com/ubuntu-ports impish InRelease [270 kB]
.....
.....
....
root@sol-token:/# apt install curl -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  ca-certificates libbrotli1 libcurl4 libldap-2.5-0 libldap-common libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
Suggested packages:
  libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql
The following NEW packages will be installed:
  ca-certificates curl libbrotli1 libcurl4 libldap-2.5-0 libldap-common libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssh-4 openssl publicsuffix
0 upgraded, 15 newly installed, 0 to remove and 1 not upgraded.
Need to get 2214 kB of archives.

....
....
.....
root@sol-token:/# sh -c "$(curl -sSfL https://release.solana.com/v1.9.0/install)"
downloading v1.9.0 installer
sh: 156: /tmp/tmp.G9QiqTakVD/solana-install-init: Exec format error
root@sol-token:/#

@joncinque
Copy link
Contributor

You don't need the Solana tools to install the CLI, just Rust. So my steps were:

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
$ cargo instal spl-token-cli

This was a machine with curl, pkg-config, and libudev-dev.

Separately, if you're on a Raspberry Pi, you'll have to compile the CLI yourself from https://github.com/solana-labs/solana/tree/master/cli, since we don't provide the tools for arm yet. That's where that most recent failure is from.

@grglzrv
Copy link

grglzrv commented Dec 14, 2021

I gonna try to compile Solana tools on rasp pi 4 now.

I just installed everything with success but by the binary files.

wget https://github.com/solana-labs/solana/releases/download/v1.9.0/solana-release-x86_64-unknown-linux-gnu.tar.bz2
tar -xvf solana-release-x86_64-unknown-linux-gnu.tar.bz2

echo 'export PATH="/root/solana-release/bin:$PATH"' >> .profile

exit 

# login again

~# solana --version
solana-cli 1.9.0 (src:7782d34b; feat:378846963)
~# spl-token --version
spl-token-cli 2.0.15

But when i set this
solana config set --url http://api.devnet.solana.com

I got 0 SOL

If I set:
solana config set --url https://api.mainnet-beta.solana.com
I got my SOL

What's the diff between those 2 URLs?

@joncinque
Copy link
Contributor

They are different clusters, more info about them here: https://docs.solana.com/cluster/rpc-endpoints

@joncinque
Copy link
Contributor

I'm going to lock this issue now since it's getting off-topic, please come to Discord and chat

@solana-labs solana-labs locked as off-topic and limited conversation to collaborators Dec 14, 2021
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

4 participants