ApeWorX / py-solc-x

Python wrapper and version management tool for the solc Solidity compiler.
https://solcx.readthedocs.io/
MIT License
138 stars 48 forks source link

Lack of aarch64 support #134

Open hiteshbhatia3559 opened 2 years ago

hiteshbhatia3559 commented 2 years ago

Environment information

What was wrong?

As per this PR #66 , aarch64 support was added, and no commits/changes were made to the relevant code. In the current master however these functions simply don't exist, see https://github.com/iamdefinitelyahuman/py-solc-x/blob/master/solcx/install.py

After installing py-solc-x attempting to run install_solcx('0.6.0'), the error OSError: [Errno 8] Exec format error: '/home/ubuntu/.solcx/solc-v0.6.0' is shown.

How can it be fixed?

I suppose aarch64 support could be added back? I'm not aware of how, however.

hiteshbhatia3559 commented 2 years ago

Additionally when calling compile_solc('0.6.0'), compilation fails. Following is the log

ubuntu@ubuntu:~/demos/web3_py_simple_storage$ python3 deploy.py 
ERROR - Unknown or unsupported Ubuntu version ( hirsute )
ERROR - This might not work, but we are trying anyway.
Please drop us a message at https://gitter.im/ethereum/solidity-dev.
We only support Trusty, Utopic, Vivid, Wily, Xenial, Yakkety, Zesty, Artful and Bionic.
Hit:1 https://repos.influxdata.com/ubuntu bionic InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports hirsute InRelease
Hit:3 http://ppa.launchpad.net/ethereum/ethereum/ubuntu hirsute InRelease
Get:4 http://ports.ubuntu.com/ubuntu-ports hirsute-updates InRelease [115 kB]
Hit:5 http://ports.ubuntu.com/ubuntu-ports hirsute-backports InRelease
Get:6 http://ports.ubuntu.com/ubuntu-ports hirsute-updates/main arm64 Packages [380 kB]
Fetched 495 kB in 3s (157 kB/s)     
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Command '['sh', PosixPath('/tmp/solcx-tmp-5248/solidity_0.6.0/scripts/install_deps.sh')]' returned non-zero exit status 100.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/solcx/install.py", line 519, in compile_solc
    subprocess.check_call(
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', PosixPath('/tmp/solcx-tmp-5248/solidity_0.6.0/scripts/install_deps.sh')]' returned non-zero exit status 100.
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/tmp/solcx-tmp-5248/solidity_0.6.0/build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/solcx/install.py", line 531, in compile_solc
    subprocess.check_call(cmd, stderr=subprocess.DEVNULL)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '..']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/demos/web3_py_simple_storage/deploy.py", line 3, in <module>
    compile_solc('0.6.0')
  File "/usr/local/lib/python3.9/dist-packages/solcx/install.py", line 544, in compile_solc
    raise SolcInstallationError(err_msg)
solcx.exceptions.SolcInstallationError: cmake returned non-zero exit status 1 while attempting to build solc from the source.
This is likely due to a missing or incorrect version of a build dependency.
ubuntu@ubuntu:~/demos/web3_py_simple_storage$ 
cameel commented 2 years ago

It's probably not the cause of this error since this is building 0.6.0 but please note that install_deps.sh has been recently removed from the Solidity repo: https://github.com/ethereum/solidity/issues/9582.