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

Language server crashes on aarch64 (arm64) #271

Open
mtugan opened this issue Sep 19, 2023 · 1 comment
Open

Language server crashes on aarch64 (arm64) #271

mtugan opened this issue Sep 19, 2023 · 1 comment

Comments

@mtugan
Copy link

mtugan commented Sep 19, 2023

When using an aarch64 host, one will encounter an issue such as the following:

Running '/home/user/.local/bin/woke lsp --port 43831'
[Error - 6:13:31 PM] Traceback (most recent call last):
  File "/home/user/.local/pipx/venvs/woke/lib/python3.11/site-packages/woke/lsp/server.py", line 268, in _task_done_callback
    task.result()
  File "/home/user/.local/pipx/venvs/woke/lib/python3.11/site-packages/woke/compiler/compiler.py", line 1130, in compile_unit_raw
    return await self.__solc_frontend.compile(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/woke/lib/python3.11/site-packages/woke/compiler/solc_frontend/solc_runner.py", line 55, in compile
    return await self.__run_solc(target_version, standard_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/woke/lib/python3.11/site-packages/woke/compiler/solc_frontend/solc_runner.py", line 83, in __run_solc
    proc = await asyncio.create_subprocess_exec(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/subprocess.py", line 218, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1694, in subprocess_exec
    transport = await self._make_subprocess_transport(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/unix_events.py", line 207, in _make_subprocess_transport
    transp = _UnixSubprocessTransport(self, protocol, args, shell,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "/usr/lib/python3.11/asyncio/unix_events.py", line 810, in _start
    self._proc = subprocess.Popen(
                 ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/user/.local/share/woke/compilers/solc-linux-amd64-v0.8.20+commit.a1b79de6/solc-linux-amd64-v0.8.20+commit.a1b79de6'

This is due to the following:

https://github.com/Ackee-Blockchain/woke/blob/045171c86fa8c6971e9c1b4544ba9b34f3fc575b/woke/svm/svm.py#L60C1-L61

At least on Linux, it would be preferable if SolcVersionManager autodetected the hosts architecture for solc version downloads.

@michprev
Copy link
Member

Pre-built solc ARM binaries are not currently available at https://github.com/ethereum/solc-bin. The only thing we can do now is to raise an exception if we encounter an unsupported architecture.

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

2 participants