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

solana-test-validator error, expects GNU-tar: proposed solution! #35648

Closed
abhijayrajvansh opened this issue Sep 4, 2024 · 2 comments
Closed
Labels
community Community contribution

Comments

@abhijayrajvansh
Copy link

Problem

running solana-test-validator on macOS (with apple silicon or arm64) fails with the following error:

Ledger location: test-ledger
Log: test-ledger/validator.log
Error: failed to start validator: Failed to create ledger at test-ledger: io error: Error checking to unpack genesis archive: Archive error: extra entry found: "._genesis.bin" Regular

reason: the GNU tar program is not compatible with the BSD tar program that comes pre-installed.
this is why we're using: gnu tar installation in .travis.yml

- brew install gnu-tar
- PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

and here's the problem: this (/usr/local/opt/gnu-tar/libexec/gnubin) executable path is only valid for Intel-based macs (x86_64) and not for macs with apple silicon (arm64) chipset. by default, on apple silicon macs, executables are stored in a different location.

Proposed Solution

less ideal solution:

a local fix: Install the gnu tar program using brew and export its executable path in your .zshrc file.

macOS with apple silicon (arm64):

brew install gnu-tar
# Put this in ~/.zshrc 
export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"

intel-based macOS (x86_64):

brew install gnu-tar
# Put this in ~/.zshrc 
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

Ideal Solution:

We can differentiate between Intel-based and Apple Silicon-based macOS directly in the .travis.yml file and set the PATH accordingly.

@abhijayrajvansh abhijayrajvansh added the community Community contribution label Sep 4, 2024
Copy link
Contributor

github-actions bot commented Sep 4, 2024

This repository is no longer in use. Please re-open this issue in the agave repo: https://github.com/anza-xyz/agave

@github-actions github-actions bot closed this as completed Sep 4, 2024
@Jac0xb
Copy link

Jac0xb commented Sep 20, 2024

Thank you for this solution definitely needs to be fixed

@solana-labs solana-labs locked as resolved and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

2 participants