fix: missing pkg-config in image build
Build was failing with the following error during the installation of mysqlclient==2.2.0: #39 22.19 Collecting mysqlclient==2.2.0 (from -r requirements/production.txt (line 435)) #39 22.20 Downloading mysqlclient-2.2.0.tar.gz (89 kB) #39 22.20 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 95.8 MB/s eta 0:00:00 #39 22.24 Installing build dependencies: started #39 24.79 Installing build dependencies: finished with status 'done' #39 24.81 Getting requirements to build wheel: started #39 25.07 Getting requirements to build wheel: finished with status 'error' #39 25.08 error: subprocess-exited-with-error #39 25.08 #39 25.08 × Getting requirements to build wheel did not run successfully. #39 25.08 │ exit code: 1 #39 25.08 ╰─> [24 lines of output] #39 25.08 /bin/sh: 1: pkg-config: not found #39 25.08 /bin/sh: 1: pkg-config: not found #39 25.08 Trying pkg-config --exists mysqlclient #39 25.08 Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127. #39 25.08 Trying pkg-config --exists mariadb #39 25.08 Command 'pkg-config --exists mariadb' returned non-zero exit status 127. #39 25.08 Traceback (most recent call last): #39 25.08 File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> #39 25.08 main() #39 25.08 File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main #39 25.08 json_out['return_val'] = hook(**hook_input['kwargs']) #39 25.08 File "/openedx/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel #39 25.08 return hook(config_settings) #39 25.08 File "/tmp/pip-build-env-5hyrozx4/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel #39 25.08 return self._get_build_requires(config_settings, requirements=['wheel']) #39 25.08 File "/tmp/pip-build-env-5hyrozx4/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires #39 25.08 self.run_setup() #39 25.08 File "/tmp/pip-build-env-5hyrozx4/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup #39 25.08 exec(code, locals()) #39 25.08 File "<string>", line 154, in <module> #39 25.08 File "<string>", line 48, in get_config_posix #39 25.08 File "<string>", line 27, in find_package_name #39 25.08 Exception: Can not find valid pkg-config name. #39 25.08 Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually #39 25.08 [end of output]
This commit is contained in:
parent
bddd793bfd
commit
21b82de63f
1
changelog.d/20230908_095220_regis_nightly.md
Normal file
1
changelog.d/20230908_095220_regis_nightly.md
Normal file
@ -0,0 +1 @@
|
||||
- [Bugfix] Fix missing pkg-config during image build. (by @regisb)
|
||||
@ -4,10 +4,11 @@ FROM docker.io/ubuntu:20.04 as minimal
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
|
||||
apt update && \
|
||||
apt install -y curl git-core language-pack-en python3 python3-pip python3-venv \
|
||||
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev
|
||||
apt install -y curl git-core language-pack-en python3 python3-dev python3-pip python3-venv \
|
||||
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
|
||||
pkg-config
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
ARG APP_USER_ID=1000
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user