OSSystems / meta-browser

OpenEmbedded/Yocto BSP layer for Web Browsers
MIT License
185 stars 194 forks source link

Fails to compile with python 3.10 #577

Closed kraj closed 3 years ago

kraj commented 3 years ago

yocto is starting to use python 3.10 and jinja fails like this

|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/out/Release/../../mojo/public/tools/bindings/mojom_bindings_ge
nerator.py", line 43, in <module>
|     from mojom.generate import template_expander
|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/mojo/public/tools/mojom/mojom/generate/template_expander.py",
line 13, in <module>
|     import jinja2
|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/third_party/jinja2/__init__.py", line 33, in <module>
|     from jinja2.environment import Environment, Template
|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/third_party/jinja2/environment.py", line 16, in <module>
|     from jinja2.defaults import BLOCK_START_STRING, \
|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/third_party/jinja2/defaults.py", line 32, in <module>
|     from jinja2.tests import TESTS as DEFAULT_TESTS
|   File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/chromium-94.0.4606.71/third_party/jinja2/tests.py", line 13, in <module>
|     from collections import Mapping
| ImportError: cannot import name 'Mapping' from 'collections' (/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux-musl/chromium-ozone-wayland/94.0.4606.71-r0/recipe-sysroot-native/usr/lib/
python3.10/collections/__init__.py)
kraj commented 3 years ago

@shr-project are you able to reproduce this as well?

shr-project commented 3 years ago

I haven't tried yet (as meta-browser isn't included in any of my regular builds), but looks like the jinja2 fix Alex added to nodejs could be applicable here as well https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=e8214b76e461f218e1cea278622ec90c232e25c3)

kraj commented 3 years ago

I haven't tried yet (as meta-browser isn't included in any of my regular builds), but looks like the jinja2 fix Alex added to nodejs could be applicable here as well https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=e8214b76e461f218e1cea278622ec90c232e25c3)

yes that looks quite likely.