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

Multiple python ModuleNotFoundError issues observed while building gunyah inside docker #12

Open
archersmind opened this issue Jun 24, 2024 · 1 comment

Comments

@archersmind
Copy link

Building gunyah inside Docker, but encounter with following errors:

Firstly ModuleNotFoundError: No module named 'Cheetah'

(gunyah-venv) alan@hyp-dev-env:~/share/gunyah$ build-gunyah.sh qemu
./configure.py platform=qemu featureset=gunyah-rm-qemu quality=debug ; ninja
[3/3] _mkdir build/qemu/gunyah-rm-qemu
[20/1079] code_gen build/qemu/gunyah-rm-qemu/de.../arm_arch_timer/include/platform_timer_consts.h
FAILED: build/qemu/gunyah-rm-qemu/debug/hyp/platform/arm_arch_timer/include/platform_timer_consts.h build/qemu/gunyah-rm-qemu/debug/hyp/platform/arm_arch_timer/include/platform_timer_consts.h.d
tools/codegen/codegen.py -a qemu -a qemu-armv8-5a-rng -a armv8-64 -a armv8 -a aarch64 -a gic-qemu -imacros build/qemu/gunyah-rm-qemu/debug/config.h -f /usr/local/mnt/tools/llvm/bin/clang-format -o build/qemu/gunyah-rm-qemu/debug/hyp/platform/arm_arch_timer/include/platform_timer_consts.h -d build/qemu/gunyah-rm-qemu/debug/hyp/platform/arm_arch_timer/include/platform_timer_consts.h.d hyp/platform/arm_arch_timer/templates/platform_timer_consts.h.tmpl
Traceback (most recent call last):
  File "/home/alan/share/gunyah/hyp/tools/codegen/codegen.py", line 16, in <module>
    from Cheetah.Template import Template
ModuleNotFoundError: No module named 'Cheetah'
[29/1079] cpp-dsl build/qemu/gunyah-rm-qemu/debug/hyp/misc/prng_hw/prng_api.tc.pp
ninja: build stopped: subcommand failed.

Then I installed the module with sudo pip3 install cheetah3, but encountered another error
ModuleNotFoundError: No module named 'lark'

After installing the lark module as well, now I met a difficult one

Traceback (most recent call last):
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3112, in _transform_children
    yield ast_nodes.TToken(str(c), c, self.program)
  File "/home/alan/share/gunyah/hyp/tools/typed/ast_nodes.py", line 77, in __new__
    pos_in_stream = token.pos_in_stream
AttributeError: 'Token' object has no attribute 'pos_in_stream'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3110, in _transform_children
    yield self._transform_tree(c)
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3099, in _transform_tree
    children = list(self._transform_children(tree.children))
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3115, in _transform_children
    except Discard:
TypeError: catching classes that do not inherit from BaseException is not allowed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alan/share/gunyah/hyp/tools/typed/type_gen.py", line 179, in <module>
    main()
  File "/home/alan/share/gunyah/hyp/tools/typed/type_gen.py", line 114, in main
    ir = parse_dsl(parser, options.input, options.abi)
  File "/home/alan/share/gunyah/hyp/tools/typed/type_gen.py", line 35, in parse_dsl
    cur_tree = TransformTypes(text).transform(parse_tree)
  File "/usr/local/lib/python3.10/dist-packages/lark/visitors.py", line 161, in transform
    return self._transform_tree(tree)
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3099, in _transform_tree
    children = list(self._transform_children(tree.children))
  File "/home/alan/share/gunyah/hyp/tools/typed/ir.py", line 3115, in _transform_children
    except Discard:
TypeError: catching classes that do not inherit from BaseException is not allowed
ninja: build stopped: subcommand failed.
(gunyah-venv) alan@hyp-dev-env:~/share/gunyah$

I just followed the instructions in this repo, what should I do next?

@quic-yvasi
Copy link
Contributor

quic-yvasi commented Jun 24, 2024 via email

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