Closed dkillen closed 2 years ago
Hi, could you please try installing version 0.2.16 and see if the problem persists?
I have installed sol-warp v0.2.16 in my python venv.
To clarify, these are the versions of required packages I have installed in following the README:
I get a similar error to that above when doing attempting a transpile:
(sol-warp) david@imladris ~/dev/trufflesuite/starkware/warp > warp transpile ERC20.sol WARP
Traceback (most recent call last):
File "/Users/david/sol-warp/bin/warp", line 5, in
I'm not really a python guy but, I don't think getting warp installed and running needs a lot of python experience. Hopefully, this is helpful.
Can you please do pip list > installed.txt
and provide the installed.txt
file?
I see that both lark
and lark-parser
are installed. However, lark
introduces a breaking renaming change, which causes the error above.
I wonder if that lark
package is left from the previous installation? Could you please try with a fresh environment?
pip list prior to installing warp - installed-fresh.txt pip list after installing warp - installed-after.txt
It seems to have cleaned up lark. But, I now get a different error running warp transpile. This is an interesting error in the Trace "RuntimeError: Unsupported OS: Darwin-21.1.0-x86_64-i386-64bit"
warp-test) david@imladris ~/dev/trufflesuite/starkware/warp > warp transpile ERC20.sol WARP
Traceback (most recent call last):
File "/Users/david/warp-test/bin/kudu", line 44, in
Traceback (most recent call last):
File "/Users/david/warp-test/bin/warp", line 8, in
The issue is that we have to rely on some binary files and we might have not prebuilt them for macos12.
Could you please run python -c "import platform; print(platform.system())"
followed by
python -c "import platform; print(platform.mac_ver())"
?
And then report the results
Result from the first command: Darwin Result from the second command: ('10.16', ('', '', ''), 'x86_64')
That's rather funny that macos 10.15 returns ('10.15', ...)
, macos 11 returns ('11', ...)
and macos 12 returns ('10.16', ..)
.
Seems like some kind of bug, but we'll take that behaviour into account. Could you please for now test on linux?
Actually, it appears that it is a somewhat known issue and there is a workaround. WIll you please try that for now?
So this command works:
SYSTEM_VERSION_COMPAT=0 warp transpile ERC20.sol WARP
The output from this command SYSTEM_VERSION_COMPAT=0 python3 -c "import platform; print(platform.mac_ver())" is ('12.0.1', ('', '', ''), 'x86_64')
Is the solution satisfactory enough to close the issue?
Yes I think so. Thank you for your help.
I am running macOS Monterey 12.0.1. I have followed the installation guide in the repository's README. For context, I also have a python venv in which I am using cairo which I can use to compile, deploy and interact with cairo contracts. I have also built docker containers for cairo and OpenZeppelin Nile which both appear to work without error at this time. I have built a docker container for warp (following the installation instructions in the README). I have also tried the warp installation on my Linux machine (Ubuntu 20.04) neither of which work and display the same error set out below.
On my MacBook I have installed the following with brew:
I then created a new python venv activated it and installed sol-warp==0.2.15 with pip.
Everything appears to install properly and without error. However, when I run warp transpile I get the following error:
(sol-warp) # warp transpile ERC20.sol WARP Traceback (most recent call last): File "/Users/david/sol-warp/bin/warp", line 5, in
from cli.warp_cli import main
File "/Users/david/sol-warp/lib/python3.7/site-packages/cli/warp_cli.py", line 13, in
from cli.commands import _deploy, _invoke, _status
File "/Users/david/sol-warp/lib/python3.7/site-packages/cli/commands.py", line 13, in
from starkware.starknet.services.api.contract_definition import ContractDefinition
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/starknet/services/api/contract_definition.py", line 9, in
from starkware.cairo.lang.compiler.program import Program
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/program.py", line 10, in
from starkware.cairo.lang.compiler.debug_info import DebugInfo
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/debug_info.py", line 10, in
from starkware.cairo.lang.compiler.preprocessor.flow import FlowTrackingDataActual
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/preprocessor/flow.py", line 16, in
from starkware.cairo.lang.compiler.references import FlowTrackingError, Reference
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/references.py", line 18, in
from starkware.cairo.lang.compiler.fields import ExpressionAsStr
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/fields.py", line 4, in
from starkware.cairo.lang.compiler.parser import parse_expr, parse_type
File "/Users/david/sol-warp/lib/python3.7/site-packages/starkware/cairo/lang/compiler/parser.py", line 34, in
propagate_positions=True,
File "/Users/david/sol-warp/lib/python3.7/site-packages/lark/lark.py", line 355, in init
assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete'))
File "/Users/david/sol-warp/lib/python3.7/site-packages/lark/exceptions.py", line 21, in assert_config
raise ConfigurationError(msg % (value, options))
lark.exceptions.ConfigurationError: Got 'standard', expected one of ('basic', 'contextual', 'dynamic', 'dynamic_complete')
Your help with this would be appreciated.