Skip to content

build0.sh: ModuleNotFoundError: No module named 'asdl' #2855

Description

@moreati

The build/installation instructions in README.sh do no mention that the libasr submodule also needs to be populated. So running build0.sh in a freshly cloned lpython repo fails as follows

(lp) ➜ lpython git:(main) ./build0.sh + ci/version.sh++ git describe --tags --dirty+ version=v0.22.0-116-g5880e96d2+ version=0.22.0-116-g5880e96d2+ echo 0.22.0-116-g5880e96d2+ python grammar/asdl_py.pyTraceback (most recent call last): File "/Users/alex/src/py_wasm_play/lpython/grammar/asdl_py.py", line 9, in <module> import asdlModuleNotFoundError: No module named 'asdl'

Populating the submodule resolves the error

(lp) ➜ lpython git:(main) git submodule init Submodule 'libasr' (https://github.com/lfortran/lfortran.git) registered for path 'libasr'(lp) ➜ lpython git:(main) git submodule update Cloning into '/Users/alex/src/py_wasm_play/lpython/libasr'...Submodule path 'libasr': checked out '3916a0d3d8d82bcfe7b53a7c3392e80b0531b167'
(lp) ➜ lpython git:(main) ./build0.sh + ci/version.sh++ git describe --tags --dirty+ version=v0.22.0-116-g5880e96d2+ version=0.22.0-116-g5880e96d2+ echo 0.22.0-116-g5880e96d2+ python grammar/asdl_py.pyAssuming default values of Python.asdl and python_ast.py+ python libasr/src/libasr/asdl_cpp.py grammar/Python.asdl src/lpython/python_ast.h+ python libasr/src/libasr/asdl_cpp.py libasr/src/libasr/ASR.asdl libasr/src/libasr/asr.h+ python libasr/src/libasr/wasm_instructions_visitor.pyAssuming default values of wasm_instructions.txt and wasm_visitor.h+ python libasr/src/libasr/intrinsic_func_registry_util_gen.pyAssuming default values of intrinsic_function_registry_util.h+ cd src/lpython/parser+ re2c -W -b tokenizer.re -o tokenizer.cpp+ cd src/lpython/parser+ bison -Wall -d -r all parser.yy+ python -c 'file = '\''src/lpython/parser/parser.tab.cc'\''with open(file, '\''r'\'') as f: text = f.read()with open(file, '\''w'\'') as f: f.write('\''[[maybe_unused]] int yynerrs'\''.join(text.split('\''int yynerrs'\'')))'+ grep -n ''\''' src/lpython/parser/parser.yy+ echo OKOK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions