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

meson failed in docker build - pip install with meson.build:15:22 #12677

Closed
aurelial opened this issue Dec 28, 2023 · 1 comment
Closed

meson failed in docker build - pip install with meson.build:15:22 #12677

aurelial opened this issue Dec 28, 2023 · 1 comment

Comments

@aurelial
Copy link

Describe the bug
meson build is failing while trying to build pandas as part of a pip install executed within a docker build.

To Reproduce
execute : docker build --tag=mybuild .
using Dockerfile :
# syntax=docker/dockerfile:1
FROM python:3.13.0a2-bookworm
WORKDIR /myproj
COPY . .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

and requirements.txt :
blinker==1.7.0
certifi==2023.11.17
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
cycler==0.12.1
Flask==3.0.0
fonttools==4.47.0
idna==3.6
itsdangerous==2.1.2
Jinja2==3.1.2
joblib==1.3.2
kiwisolver==1.4.5
MarkupSafe==2.1.3
meson==1.3.1
numpy==1.26.2
packaging==23.2
pandas==2.1.4
Pillow==10.1.0
pycryptodome==3.19.1
pyparsing==3.1.1
python-dateutil==2.8.2
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
scikit-learn==1.3.2
scipy==1.11.4
six==1.16.0
threadpoolctl==3.2.0
tzdata==2023.3
urllib3==2.1.0
Werkzeug==3.0.1
yaml-config==0.1.5

Expected behavior
build should succeed

system parameters
native build
Windows 10
Python 3.10.4
Meson v 1.2.1

ERROR LOG FOLLOWS
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 2.0s
=> CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> [internal] load metadata for docker.io/library/python:3.13.0a2-bookworm 1.6s
=> [internal] load .dockerignore 0.0s
=> [internal] load build context 0.7s
=> => transferring context: 1.34MB 0.7s
=> [1/6] FROM docker.io/library/python:3.13.0a2-bookworm@sha256:ad07d1a696b26f5fa10f5fd6b32ea8fb148bd053112bf4d1 0.0s
=> CACHED [2/6] WORKDIR /NMGC 0.0s
=> [3/6] COPY . . 1.0s
=> [4/6] RUN pip install --upgrade pip 4.5s
=> ERROR [5/6] RUN pip install -r requirements.txt 283.1s

[5/6] RUN pip install -r requirements.txt:
#13 0.830 Collecting blinker==1.7.0 (from -r requirements.txt (line 1))
#13 1.105 Downloading blinker-1.7.0-py3-none-any.whl.metadata (1.9 kB)
#13 1.171 Collecting certifi==2023.11.17 (from -r requirements.txt (line 2))
#13 1.255 Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
#13 1.395 Collecting charset-normalizer==3.3.2 (from -r requirements.txt (line 3))
#13 1.475 Downloading charset_normalizer-3.3.2-py3-none-any.whl.metadata (33 kB)
#13 1.584 Collecting click==8.1.7 (from -r requirements.txt (line 4))
#13 1.659 Downloading click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
#13 1.720 Collecting colorama==0.4.6 (from -r requirements.txt (line 5))
#13 1.796 Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
#13 1.858 Collecting cycler==0.12.1 (from -r requirements.txt (line 6))
#13 1.936 Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
#13 2.001 Collecting Flask==3.0.0 (from -r requirements.txt (line 7))
#13 2.079 Downloading flask-3.0.0-py3-none-any.whl.metadata (3.6 kB)
#13 2.199 Collecting fonttools==4.47.0 (from -r requirements.txt (line 8))
#13 2.279 Downloading fonttools-4.47.0-py3-none-any.whl.metadata (157 kB)
#13 2.394 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 157.2/157.2 kB 1.3 MB/s eta 0:00:00
#13 2.442 Collecting idna==3.6 (from -r requirements.txt (line 9))
#13 2.515 Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
#13 2.570 Collecting itsdangerous==2.1.2 (from -r requirements.txt (line 10))
#13 2.647 Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
#13 2.709 Collecting Jinja2==3.1.2 (from -r requirements.txt (line 11))
#13 2.796 Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
#13 2.832 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 3.8 MB/s eta 0:00:00
#13 2.880 Collecting joblib==1.3.2 (from -r requirements.txt (line 12))
#13 2.956 Downloading joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)
#13 3.033 Collecting kiwisolver==1.4.5 (from -r requirements.txt (line 13))
#13 3.113 Downloading kiwisolver-1.4.5.tar.gz (97 kB)
#13 3.153 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.6/97.6 kB 2.4 MB/s eta 0:00:00
#13 3.171 Installing build dependencies: started
#13 6.259 Installing build dependencies: finished with status 'done'
#13 6.260 Getting requirements to build wheel: started
#13 6.578 Getting requirements to build wheel: finished with status 'done'
#13 6.581 Preparing metadata (pyproject.toml): started
#13 6.855 Preparing metadata (pyproject.toml): finished with status 'done'
#13 6.923 Collecting MarkupSafe==2.1.3 (from -r requirements.txt (line 14))
#13 7.016 Downloading MarkupSafe-2.1.3.tar.gz (19 kB)
#13 7.029 Preparing metadata (setup.py): started
#13 7.273 Preparing metadata (setup.py): finished with status 'done'
#13 7.327 Collecting meson==1.3.1 (from -r requirements.txt (line 15))
#13 7.406 Downloading meson-1.3.1-py3-none-any.whl.metadata (1.8 kB)
#13 7.621 Collecting numpy==1.26.2 (from -r requirements.txt (line 16))
#13 7.702 Downloading numpy-1.26.2.tar.gz (15.7 MB)
#13 9.932 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 9.5 MB/s eta 0:00:00
#13 10.93 Installing build dependencies: started
#13 13.87 Installing build dependencies: finished with status 'done'
#13 13.87 Getting requirements to build wheel: started
#13 13.95 Getting requirements to build wheel: finished with status 'done'
#13 13.95 Installing backend dependencies: started
#13 15.24 Installing backend dependencies: finished with status 'done'
#13 15.24 Preparing metadata (pyproject.toml): started
#13 75.37 Preparing metadata (pyproject.toml): still running...
#13 115.2 Preparing metadata (pyproject.toml): finished with status 'done'
#13 115.3 Collecting packaging==23.2 (from -r requirements.txt (line 17))
#13 115.3 Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
#13 115.5 Collecting pandas==2.1.4 (from -r requirements.txt (line 18))
#13 115.6 Downloading pandas-2.1.4.tar.gz (4.3 MB)
#13 115.9 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 14.1 MB/s eta 0:00:00
#13 116.4 Installing build dependencies: started
#13 186.7 Installing build dependencies: still running...
#13 247.1 Installing build dependencies: still running...
#13 280.2 Installing build dependencies: finished with status 'done'
#13 280.2 Getting requirements to build wheel: started
#13 280.3 Getting requirements to build wheel: finished with status 'done'
#13 280.3 Installing backend dependencies: started
#13 281.2 Installing backend dependencies: finished with status 'done'
#13 281.2 Preparing metadata (pyproject.toml): started
#13 282.5 Preparing metadata (pyproject.toml): finished with status 'error'
#13 282.5 error: subprocess-exited-with-error
#13 282.5
#13 282.5 × Preparing metadata (pyproject.toml) did not run successfully.
#13 282.5 │ exit code: 2
#13 282.5 ╰─> [74 lines of output]
#13 282.5 + meson setup /tmp/pip-install-kj7wwvmu/pandas_5bd896f164494234bccec9fcb1b19e70 /tmp/pip-install-kj7wwvmu/pandas_5bd896f164494234bccec9fcb1b19e70/.mesonpy-ul41g9fa/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/tmp/pip-install-kj7wwvmu/pandas_5bd896f164494234bccec9fcb1b19e70/.mesonpy-ul41g9fa/build/meson-python-native-file.ini
#13 282.5 Traceback (most recent call last):
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/mesonmain.py", line 194, in run
#13 282.5 return options.run_func(options)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/msetup.py", line 358, in run
#13 282.5 app.generate()
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/msetup.py", line 183, in generate
#13 282.5 return self._generate(env, capture, vslite_ctx)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/msetup.py", line 228, in _generate
#13 282.5 intr.run()
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreter/interpreter.py", line 2997, in run
#13 282.5 super().run()
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 164, in run
#13 282.5 self.evaluate_codeblock(self.ast, start=1)
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 190, in evaluate_codeblock
#13 282.5 raise e
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 182, in evaluate_codeblock
#13 282.5 self.evaluate_statement(cur)
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 198, in evaluate_statement
#13 282.5 self.assignment(cur)
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 635, in assignment
#13 282.5 value = self.evaluate_statement(node.value)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 200, in evaluate_statement
#13 282.5 return self.method_call(cur)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 550, in method_call
#13 282.5 res = obj.method_call(method_name, args, kwargs)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreter/interpreterobjects.py", line 811, in method_call
#13 282.5 ret = method(state, args, kwargs)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/decorators.py", line 109, in wrapped
#13 282.5 ret = f(*wrapped_args, **wrapped_kwargs)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/decorators.py", line 277, in wrapper
#13 282.5 return f(*nargs, **wrapped_kwargs)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/interpreterbase/decorators.py", line 596, in wrapper
#13 282.5 return f(*wrapped_args, **wrapped_kwargs)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/modules/python.py", line 437, in find_installation
#13 282.5 python = self._find_installation_impl(state, display_name, name_or_path, required)
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/modules/python.py", line 393, in _find_installation_impl
#13 282.5 if python.sanity(state):
#13 282.5 ^^^^^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/modules/python.py", line 74, in sanity
#13 282.5 ret = super().sanity()
#13 282.5 ^^^^^^^^^^^^^^^^
#13 282.5 File "/tmp/pip-build-env-2xz8gr50/overlay/lib/python3.13/site-packages/mesonbuild/dependencies/python.py", line 114, in sanity
#13 282.5 with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f:
#13 282.5 ^^^^^^^^^^^^^^^^^^^^^^^^
#13 282.5 AttributeError: module 'importlib.resources' has no attribute 'path'
#13 282.5 The Meson build system
#13 282.5 Version: 1.2.1
#13 282.5 Source dir: /tmp/pip-install-kj7wwvmu/pandas_5bd896f164494234bccec9fcb1b19e70
#13 282.5 Build dir: /tmp/pip-install-kj7wwvmu/pandas_5bd896f164494234bccec9fcb1b19e70/.mesonpy-ul41g9fa/build
#13 282.5 Build type: native build
#13 282.5 Project name: pandas
#13 282.5 Project version: 2.1.4
#13 282.5 C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
#13 282.5 C linker for the host machine: cc ld.bfd 2.40
#13 282.5 C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (Debian 12.2.0-14) 12.2.0")
#13 282.5 C++ linker for the host machine: c++ ld.bfd 2.40
#13 282.5 Cython compiler for the host machine: cython (cython 0.29.37)
#13 282.5 Host machine cpu family: x86_64
#13 282.5 Host machine cpu: x86_64
#13 282.5
#13 282.5 ../../meson.build:15:22: ERROR: Unhandled python exception
#13 282.5
#13 282.5 This is a Meson bug and should be reported!
#13 282.5 [end of output]
#13 282.5
#13 282.5 note: This error originates from a subprocess, and is likely not a problem with pip.
#13 282.5 error: metadata-generation-failed
#13 282.5
#13 282.5 × Encountered error while generating package metadata.
#13 282.5 ╰─> See above for output.
#13 282.5
#13 282.5 note: This is an issue with the package mentioned above, not pip.
#13 282.5 hint: See above for details.


executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

@QuLogic
Copy link
Member

QuLogic commented Dec 29, 2023

This is a duplicate of #12401.

@QuLogic QuLogic closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2023
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