Description
Creating a docker image with python:3.10-alpine3.16 base images. Here i used pyjq 2.6 version but while building the docker image it is failing with following error.
13:14:33 Building wheel for pyjq (setup.py): started
13:14:37 Building wheel for pyjq (setup.py): finished with status 'error'
13:14:37 error: subprocess-exited-with-error
13:14:37
13:14:37 × python setup.py bdist_wheel did not run successfully.
13:14:37 │ exit code: 1
13:14:37 ╰─> [182 lines of output]
13:14:37 /usr/local/lib/python3.10/site-packages/setuptools/config/expand.py:144: UserWarning: File '/tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/CHANGELOG.md' cannot be found
13:14:37 warnings.warn(f"File {path!r} cannot be found")
13:14:37 running bdist_wheel
13:14:37 running build
13:14:37 running build_py
13:14:37 creating build
13:14:37 creating build/lib.linux-x86_64-cpython-310
13:14:37 copying pyjq.py -> build/lib.linux-x86_64-cpython-310
13:14:37 running build_ext
13:14:37 Refactored /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_property_data.py
13:14:37 Files that were modified:
13:14:37 /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_property_data.py
13:14:37 Refactored /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_fold_data.py
13:14:37 Files that were modified:
13:14:37 /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_fold_data.py
13:14:37 Refactored /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_egcb_data.py
13:14:37 Files that were modified:
13:14:37 /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/make_unicode_egcb_data.py
13:14:37 Refactored /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/gperf_fold_key_conv.py
13:14:37 Files that were modified:
13:14:37 /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/gperf_fold_key_conv.py
13:14:37 Refactored /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/gperf_unfold_key_conv.py
13:14:37 Files that were modified:
13:14:37 /tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/dependencies/onig-6.9.0/src/gperf_unfold_key_conv.py
13:14:37 checking for a BSD-compatible install... /usr/bin/install -c
13:14:37 checking whether build environment is sane... yes
13:14:37 checking for a thread-safe mkdir -p... ./install-sh -c -d
13:14:37 checking for gawk... no
13:14:37 checking for mawk... no
13:14:37 checking for nawk... no
13:14:37 checking for awk... awk
13:14:37 checking whether make sets $(MAKE)... no
13:14:37 checking whether make supports nested variables... no
13:14:37 checking for gcc... gcc
13:14:37 checking whether the C compiler works... yes
13:14:37 checking for C compiler default output file name... a.out
13:14:37 checking for suffix of executables...
13:14:37 checking whether we are cross compiling... no
13:14:37 checking for suffix of object files... o
13:14:37 checking whether we are using the GNU C compiler... yes
13:14:37 checking whether gcc accepts -g... yes
13:14:37 checking for gcc option to accept ISO C89... none needed
13:14:37 checking whether gcc understands -c and -o together... yes
13:14:37 checking for style of include used by make... none
13:14:37 checking dependency style of gcc... none
13:14:37 checking build system type... x86_64-pc-linux-musl
13:14:37 checking host system type... x86_64-pc-linux-musl
13:14:37 checking how to print strings... printf
13:14:37 checking for a sed that does not truncate output... /bin/sed
13:14:37 checking for grep that handles long lines and -e... /bin/grep
13:14:37 checking for egrep... /bin/grep -E
13:14:37 checking for fgrep... /bin/grep -F
13:14:37 checking for ld used by gcc... /usr/x86_64-alpine-linux-musl/bin/ld
13:14:37 checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
13:14:37 checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
13:14:37 checking the name lister (/usr/bin/nm -B) interface... BSD nm
13:14:37 checking whether ln -s works... yes
13:14:37 checking the maximum length of command line arguments... 98304
13:14:37 checking how to convert x86_64-pc-linux-musl file names to x86_64-pc-linux-musl format... func_convert_file_noop
13:14:37 checking how to convert x86_64-pc-linux-musl file names to toolchain format... func_convert_file_noop
13:14:37 checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
13:14:37 checking for objdump... objdump
13:14:37 checking how to recognize dependent libraries... pass_all
13:14:37 checking for dlltool... no
13:14:37 checking how to associate runtime and link libraries... printf %s\n
13:14:37 checking for ar... ar
13:14:37 checking for archiver @file support... @
13:14:37 checking for strip... strip
13:14:37 checking for ranlib... ranlib
13:14:37 checking command to parse /usr/bin/nm -B output from gcc object... ok
13:14:37 checking for sysroot... no
13:14:37 checking for a working dd... /bin/dd
13:14:37 checking how to truncate binary pipes... /bin/dd bs=4096 count=1
13:14:37 checking for mt... no
13:14:37 checking if : is a manifest tool... no
13:14:37 checking how to run the C preprocessor... gcc -E
13:14:37 checking for ANSI C header files... yes
13:14:37 checking for sys/types.h... yes
13:14:37 checking for sys/stat.h... yes
13:14:37 checking for stdlib.h... yes
13:14:37 checking for string.h... yes
13:14:37 checking for memory.h... yes
13:14:37 checking for strings.h... yes
13:14:37 checking for inttypes.h... yes
13:14:37 checking for stdint.h... yes
13:14:37 checking for unistd.h... yes
13:14:37 checking for dlfcn.h... yes
13:14:37 checking for objdir... .libs
13:14:37 checking if gcc supports -fno-rtti -fno-exceptions... no
13:14:37 checking for gcc option to produce PIC... -fPIC -DPIC
13:14:37 checking if gcc PIC flag -fPIC -DPIC works... yes
13:14:37 checking if gcc static flag -static works... yes
13:14:37 checking if gcc supports -c -o file.o... yes
13:14:37 checking if gcc supports -c -o file.o... (cached) yes
13:14:37 checking whether the gcc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
13:14:37 checking dynamic linker characteristics... GNU/Linux ld.so
13:14:37 checking how to hardcode library paths into programs... immediate
13:14:37 checking whether stripping libraries is possible... yes
13:14:37 checking if libtool supports shared libraries... yes
13:14:37 checking whether to build shared libraries... no
13:14:37 checking whether to build static libraries... yes
13:14:37 checking whether make sets $(MAKE)... (cached) no
13:14:37 checking for ANSI C header files... (cached) yes
13:14:37 checking for stdlib.h... (cached) yes
13:14:37 checking for string.h... (cached) yes
13:14:37 checking for strings.h... (cached) yes
13:14:37 checking limits.h usability... yes
13:14:37 checking limits.h presence... yes
13:14:37 checking for limits.h... yes
13:14:37 checking sys/time.h usability... yes
13:14:37 checking sys/time.h presence... yes
13:14:37 checking for sys/time.h... yes
13:14:37 checking for unistd.h... (cached) yes
13:14:37 checking sys/times.h usability... yes
13:14:37 checking sys/times.h presence... yes
13:14:37 checking for sys/times.h... yes
13:14:37 checking size of int... 4
13:14:37 checking size of short... 2
13:14:37 checking size of long... 8
13:14:37 checking for an ANSI C-conforming const... yes
13:14:37 checking whether time.h and sys/time.h may both be included... yes
13:14:37 checking for size_t... yes
13:14:37 checking for working alloca.h... yes
13:14:37 checking for alloca... yes
13:14:37 checking for working memcmp... yes
13:14:37 checking for prototypes... yes
13:14:37 checking for variable length prototypes and stdarg.h... yes
13:14:37 checking that generated files are newer than configure... done
13:14:37 configure: creating ./config.status
13:14:37 config.status: creating Makefile
13:14:37 config.status: creating src/Makefile
13:14:37 config.status: creating test/Makefile
13:14:37 config.status: creating sample/Makefile
13:14:37 config.status: creating onig-config
13:14:37 config.status: creating src/config.h
13:14:37 config.status: executing depfiles commands
13:14:37 config.status: executing libtool commands
13:14:37 config.status: executing default commands
13:14:37 make: /bin/sh: Operation not permitted
13:14:37 make: *** [Makefile:495: all-recursive] Error 127
13:14:37 Traceback (most recent call last):
13:14:37 File "", line 2, in
13:14:37 File "", line 34, in
13:14:37 File "/tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/setup.py", line 113, in
13:14:37 setup(
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/init.py", line 87, in setup
13:14:37 return distutils.core.setup(**attrs)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
13:14:37 return run_commands(dist)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
13:14:37 dist.run_commands()
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
13:14:37 self.run_command(cmd)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
13:14:37 super().run_command(command)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
13:14:37 cmd_obj.run()
13:14:37 File "/usr/local/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
13:14:37 self.run_command("build")
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
13:14:37 self.distribution.run_command(command)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
13:14:37 super().run_command(command)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
13:14:37 cmd_obj.run()
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
13:14:37 self.run_command(cmd_name)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
13:14:37 self.distribution.run_command(command)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
13:14:37 super().run_command(command)
13:14:37 File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
13:14:37 cmd_obj.run()
13:14:37 File "/tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/setup.py", line 31, in run
13:14:37 self._build_oniguruma()
13:14:37 File "/tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/setup.py", line 45, in _build_oniguruma
13:14:37 self._build_lib(
13:14:37 File "/tmp/pip-install-qowyh8wc/pyjq_9fb38684436a4e4f8859bd1577eb49a6/setup.py", line 89, in _build_lib
13:14:37 subprocess.check_call(command, cwd=lib_dir)
13:14:37 File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
13:14:37 raise CalledProcessError(retcode, cmd)
13:14:37 subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
13:14:37 [end of output]
13:14:37
13:14:37 note: This error originates from a subprocess, and is likely not a problem with pip.
13:14:37 ERROR: Failed building wheel for pyjq
13:14:37 Running setup.py clean for pyjq
13:14:39 Successfully built PyYAML
13:14:39 Failed to build pyjq
13:14:39 ERROR: Could not build wheels for pyjq, which is required to install pyproject.toml-based projects