-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
meson 0.53.0 gives "TypeError: Forward references must evaluate to types. Got NotImplemented." #6427
Comments
confirmed in libwacom too. easiest way to reproduce that I found is with a podman container:
python version is 3.5.2 |
I didn't see this error with Python 3.5.4 or 3.5.3. I do get this error with Python 3.5.2. So it appears our minimum has crept up to Python 3.5.3. |
The previous minimum was Python 3.5.2 since Meson 0.52. An issue with trying to go back on this is we need to get type annotation completed to increase the quality of Meson with so many compilers and libraries that would be excessively difficult to cover all combinations with CI. |
Latest meson doesn't work with older python 3.5, which is present on Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until we properly bump all necessary Ubuntu images to 18.04. See: mesonbuild/meson#6427
Latest meson doesn't work with older python 3.5, which is present on Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until we properly bump all necessary Ubuntu images to 18.04. See: mesonbuild/meson#6427
Latest meson doesn't work with older python 3.5, which is present on Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until we properly bump all necessary Ubuntu images to 18.04. See: mesonbuild/meson#6427
Python 3.5.2 comes with Ubuntu 16.04 (at least on x86 targets; it's highly confusing as the package is actually named 3.5.1-xxx, see the list of files at https://packages.ubuntu.com/xenial/python3.5). So if you increase the minimum version requirement to Python 3.5.3 you prevent using the latest meson on Ubuntu 16.04, which is still rather widely used. |
Meson 0.53.0 broke compatibility with Python 3.5.2 Error message with meson 0.53.0 in our Ubuntu 16.04/Python 3.5.2 CI environment: ``` meson -Dtarget=sim-verilator -Dot_version=opentitan-snapshot-20191101-1-434-gb99db7f -Ddev_bin_dir=/home/vsts/work/1/a/build-bin/sw/device/sim-verilator -Dhost_bin_dir=/home/vsts/work/1/a/build-bin/sw/host --cross-file=/tmp/toolchain.dhA3HP.txt /home/vsts/work/1/a/build-out/sw/sim-verilator Traceback (most recent call last): File "/usr/local/bin/meson", line 11, in <module> load_entry_point('meson==0.53.0', 'console_scripts', 'meson')() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point return ep.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2443, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2449, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.5/dist-packages/mesonbuild/mesonmain.py", line 25, in <module> from . import mconf, mdist, minit, minstall, mintro, msetup, mtest, rewriter, msubprojects, munstable_coredata File "/usr/local/lib/python3.5/dist-packages/mesonbuild/mconf.py", line 16, in <module> from . import coredata, environment, mesonlib, build, mintro, mlog File "/usr/local/lib/python3.5/dist-packages/mesonbuild/environment.py", line 32, in <module> from . import compilers File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/__init__.py", line 102, in <module> from .compilers import ( File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/compilers.py", line 389, in <module> class CompilerArgs(typing.MutableSequence[str]): File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/compilers.py", line 658, in CompilerArgs def __eq__(self, other: typing.Any) -> typing.Union[bool, 'NotImplemented']: "Forward references must evaluate to types.") File "/usr/lib/python3.5/typing.py", line 312, in _type_check raise TypeError(msg + " Got %.100r." % (arg,)) TypeError: Forward references must evaluate to types. Got NotImplemented. ``` Works around lowRISC#1288 for now. Reported upstream at mesonbuild/meson#6427 Signed-off-by: Philipp Wagner <phw@lowrisc.org>
Meson 0.53.0 broke compatibility with Python 3.5.2 Error message with meson 0.53.0 in our Ubuntu 16.04/Python 3.5.2 CI environment: ``` meson -Dtarget=sim-verilator -Dot_version=opentitan-snapshot-20191101-1-434-gb99db7f -Ddev_bin_dir=/home/vsts/work/1/a/build-bin/sw/device/sim-verilator -Dhost_bin_dir=/home/vsts/work/1/a/build-bin/sw/host --cross-file=/tmp/toolchain.dhA3HP.txt /home/vsts/work/1/a/build-out/sw/sim-verilator Traceback (most recent call last): File "/usr/local/bin/meson", line 11, in <module> load_entry_point('meson==0.53.0', 'console_scripts', 'meson')() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point return ep.load() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2443, in load return self.resolve() File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2449, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.5/dist-packages/mesonbuild/mesonmain.py", line 25, in <module> from . import mconf, mdist, minit, minstall, mintro, msetup, mtest, rewriter, msubprojects, munstable_coredata File "/usr/local/lib/python3.5/dist-packages/mesonbuild/mconf.py", line 16, in <module> from . import coredata, environment, mesonlib, build, mintro, mlog File "/usr/local/lib/python3.5/dist-packages/mesonbuild/environment.py", line 32, in <module> from . import compilers File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/__init__.py", line 102, in <module> from .compilers import ( File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/compilers.py", line 389, in <module> class CompilerArgs(typing.MutableSequence[str]): File "/usr/local/lib/python3.5/dist-packages/mesonbuild/compilers/compilers.py", line 658, in CompilerArgs def __eq__(self, other: typing.Any) -> typing.Union[bool, 'NotImplemented']: "Forward references must evaluate to types.") File "/usr/lib/python3.5/typing.py", line 312, in _type_check raise TypeError(msg + " Got %.100r." % (arg,)) TypeError: Forward references must evaluate to types. Got NotImplemented. ``` Works around #1288 for now. Reported upstream at mesonbuild/meson#6427 Signed-off-by: Philipp Wagner <phw@lowrisc.org>
Latest meson doesn't work with older python 3.5, which is present on Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until we properly bump all necessary Ubuntu images to 18.04. See: mesonbuild/meson#6427
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. Let's pin meson to 0.52.0 while the fix is being prepared in meson. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Luca Boccassi <bluca@debian.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
I also didn't realize that Ubuntu 16.04 was actually Python 3.5.2 due to the confusing naming convention. Thanks. |
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. Let's pin meson to 0.52.0 while the fix is being prepared in meson. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com>
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. Let's pin meson to 0.47.1 while the fix is being prepared in meson. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com>
We can probably get around this by defining the type inside a T.TYPE_CHECKING block. If not I guess we'll have to drop the return type annotations from those. |
Please continue to support ubuntu16.04 by removing whatever causes meson to break. |
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. Let's pin meson to 0.47.1 while the fix is being prepared in meson. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com>
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. On the other hand, the minimal version supported in dpdk is 0.47.1. Stick to this version to avoid getting hit by regressions in meson latest shiny release. 1: mesonbuild/meson#6427 Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. On the other hand, the minimal version supported in dpdk is 0.47.1. Stick to this version to avoid getting hit by regressions in meson latest shiny release. 1: mesonbuild/meson#6427 Cc: stable@dpdk.org Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
…s with python 3.5.2 which is shipped with Ubuntu 16.04. Better stick to a specific version and only update after checking compatibility. See mesonbuild/meson#6427.
…s with python 3.5.2 which is shipped with Ubuntu 16.04. Better stick to a specific version and only update after checking compatibility. See mesonbuild/meson#6427.
Thanks to everyone who reported this so quickly. It looks like #6438 is one potential pathway forward to improve Meson internals with recent Python version syntax while postprocessing source appropriate for older Python versions. |
[ upstream commit a02b9406a8769247737b55dbfa50b6b5f896d946 ] meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. On the other hand, the minimal version supported in dpdk is 0.47.1. Stick to this version to avoid getting hit by regressions in meson latest shiny release. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[ upstream commit a02b9406a8769247737b55dbfa50b6b5f896d946 ] meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. On the other hand, the minimal version supported in dpdk is 0.47.1. Stick to this version to avoid getting hit by regressions in meson latest shiny release. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
[ upstream commit a02b9406a8769247737b55dbfa50b6b5f896d946 ] meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04. On the other hand, the minimal version supported in dpdk is 0.47.1. Stick to this version to avoid getting hit by regressions in meson latest shiny release. 1: mesonbuild/meson#6427 Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes #6427
…s with python 3.5.2 which is shipped with Ubuntu 16.04. Better stick to a specific version and only update after checking compatibility. See mesonbuild/meson#6427.
With the newly-released 0.53.0 we get the following error on Ubuntu 16.04 with its default Python
3.5.13.5.2 (for x86). The previous version of meson worked perfectly.You can also see the error in this CI build: https://dev.azure.com/lowrisc/opentitan/_build/results?buildId=6916&view=logs&j=5df5adf8-3577-5927-f0b2-31afed2697ee&t=dcb8db2a-d944-5acc-e50e-bea93f2a14e9&l=31
To reproduce: All code is contained in https://github.com/lowRISC/opentitan. Get the code, then type
./meson_init.sh
(which is a wrapper around meson). Full docs are at https://docs.opentitan.org/doc/ug/getting_started_sw/Let me know if the stacktrace is already sufficient for you to see what's going on, otherwise I can do a bisect.
The text was updated successfully, but these errors were encountered: