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

forge downloads amd64 solc binary for aarch64 Linux #597

Closed
2 tasks
nikitastupin opened this issue Jan 27, 2022 · 6 comments
Closed
2 tasks

forge downloads amd64 solc binary for aarch64 Linux #597

nikitastupin opened this issue Jan 27, 2022 · 6 comments
Labels
C-forge Command: forge D-easy Difficulty: easy good first issue Good for newcomers T-bug Type: bug

Comments

@nikitastupin
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.1.0 (8ccfe49 2022-01-25T13:43:18.881673196+00:00)

What command(s) is the bug in?

forge test

Operating System

Linux

Describe the bug

Hi 👋

When I run forge test it automatically downloads the $HOME/.svm/0.8.11/solc-0.8.11 binary for Linux to compile my contracts. However, it downloads amd64 version of the binary even though I'm running aarch64 version of Linux.

When I manually replace the binary with aarch64 version of the binary forge test puts amd64 version back.

What could I do in this case to use forge test on aarch64 Linux?

Thanks!

@nikitastupin nikitastupin added the T-bug Type: bug label Jan 27, 2022
@onbjerg
Copy link
Member

onbjerg commented Jan 27, 2022

The bug is in svm-rs here.

Then we'd need to:

  1. Update svm-rs in ethers-solc
  2. Update ethers-solc here in Foundry

@onbjerg onbjerg added C-forge Command: forge D-easy Difficulty: easy good first issue Good for newcomers labels Jan 27, 2022
@onbjerg
Copy link
Member

onbjerg commented Jan 27, 2022

Ok, so it doesn't seem like there are any Solidity arm64 binaries available going by https://github.com/ethereum/solc-bin.

If you want to run with a custom version, try passing the --no-auto-detect flag - it should keep the binary intact 😄

@mattsse
Copy link
Member

mattsse commented Jan 27, 2022

nevertheless we should check for arm on svm-rs cc @roynalnaruto

@onbjerg
Copy link
Member

onbjerg commented Jan 27, 2022

True, the platform detection should be more robust by checking the arch in general

@roynalnaruto
Copy link
Contributor

@onbjerg @mattsse I had noticed this some time ago, probably slipped out of my TODOs. The above PR looks good, although it would show an M1 macbook as unsupported (check my comment on the PR).

@onbjerg
Copy link
Member

onbjerg commented Jan 30, 2022

This should be fixed the next time we do an update of svm-rs in ethers-solc and update ethers-solc here

charisma98 added a commit to charisma98/foundry that referenced this issue Mar 4, 2023
0129general added a commit to 0129general/FoundryProject that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge D-easy Difficulty: easy good first issue Good for newcomers T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

4 participants