quic / gunyah-support-scripts

Other
6 stars 3 forks source link

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

Open archersmind opened 2 months ago

archersmind commented 2 months ago

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 commented 2 months ago

Cheetah module is installed when gunyah venv is installed.

Please refer to toolchain-support/scripts/core-utils/build-py-vdev.sh

Not sure why your environment shows its not available. Did you modify anything in docker environment?

For now you can repeat the installation of the modules listed in the above shell script and try.

From: Alan @.> Sent: Monday, June 24, 2024 12:50 AM To: quic/gunyah-support-scripts @.> Cc: Subscribed @.***> Subject: [quic/gunyah-support-scripts] Multiple python ModuleNotFoundError issues observed while building gunyah inside docker (Issue #12)

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

Building gunyah inside Docker, but encounter with following errors:

Firstly ModuleNotFoundError: No module named 'Cheetah'

(gunyah-venv) @.***:~/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

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

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) @.***:~/share/gunyah$

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

— Reply to this email directly, view it on GitHubhttps://github.com/quic/gunyah-support-scripts/issues/12, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A32MLWEGUUJEAYYRRHOMMQTZI7FT7AVCNFSM6AAAAABJZI24Q6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DSNJQGE2DOOI. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>