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

Incorrect architecture when installing Vyper #10

Closed
ghost opened this issue Jul 11, 2022 · 2 comments
Closed

Incorrect architecture when installing Vyper #10

ghost opened this issue Jul 11, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2022

Environment information

  • vvm Version: 0.1.0
  • vyper Version: N/A
  • Python Version: 3.10.5
  • OS: macOS 12.4

What was wrong?

The release downloaded from Vyper is an x86 binary, and attempting to run it on an M1 Mac without Rosetta causes the following issue:

>>> import vvm
>>> vvm.install_vyper()
Traceback (most recent call last):
  File "/Users/ibis/.pyenv/versions/venv/lib/python3.10/site-packages/vvm/install.py", line 309, in _validate_installation
    installed_version = wrapper._get_vyper_version(binary_path)
  File "/Users/ibis/.pyenv/versions/venv/lib/python3.10/site-packages/vvm/wrapper.py", line 20, in _get_vyper_version
    stdout_data = subprocess.check_output([vyper_binary, "--version"], encoding="utf8")
  File "/Users/ibis/.pyenv/versions/3.10.5/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/ibis/.pyenv/versions/3.10.5/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Users/ibis/.pyenv/versions/3.10.5/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/ibis/.pyenv/versions/3.10.5/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 86] Bad CPU type in executable: PosixPath('/Users/ibis/.vvm/vyper-0.3.3')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ibis/.pyenv/versions/venv/lib/python3.10/site-packages/vvm/install.py", line 267, in install_vyper
    _validate_installation(version, vvm_binary_path)
  File "/Users/ibis/.pyenv/versions/venv/lib/python3.10/site-packages/vvm/install.py", line 312, in _validate_installation
    raise VyperInstallationError(
vvm.exceptions.VyperInstallationError: Downloaded binary would not execute, or returned unexpected output.

How can it be fixed?

I'm unsure if vvm is able to compile Vyper from source, but that is one approach that could work (see this similar issue: ApeWorX/py-solc-x#152)

Alternatively if the Vyper release for Darwin were a Universal binary rather than x86, vvm would be able to install that without issue

@charles-cooper
Copy link
Member

tracked here: vyperlang/vyper#2687

@charles-cooper
Copy link
Member

this should be fixed as of vyper 0.3.10 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant