doloopwhile / pyjq

A Python binding for ./jq
MIT License
195 stars 30 forks source link

Not able to install pyjq 2.6, error in makefile #92

Open samtexkos opened 4 weeks ago

samtexkos commented 4 weeks ago

Hello, On Ubuntu 24.04, using python3.10, all dependencies installed (flex, bison (3.0 or newer), libtool, make, automake and autoconf)

No other topics covering this issue found.

commands tried: pip install pyjq pip install git+https://github.com/doloopwhile/pyjq.git both give the same result:

`error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [201 lines of output]
/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/config/expand.py:124: SetuptoolsWarning: File '/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470 599a9877911c11d40/CHANGELOG.md' cannot be found
return '\n'.join(
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
copying pyjq.py -> build/lib.linux-x86_64-cpython-310
running build_ext
Refactored /tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/gperf_unfold_key_conv.py
Files that were modified:
/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/gperf_unfold_key_conv.py
Refactored /tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/gperf_fold_key_conv.py
Files that were modified:
/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/gperf_fold_key_conv.py
Refactored /tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_property_data.py
Files that were modified:
/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_property_data.py
Refactored /tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_fold_data.py
Files that were modified:
/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_fold_data.py
Refactored /tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_egcb_data.py
Files that were modified:
/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/dependencies/onig-6.9.0/src/make_unicode_egcb_data.py
./configure: line 613: !defined: event not found
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... no checking for sys/stat.h... no checking for stdlib.h... no checking for string.h... no checking for memory.h... no checking for strings.h... no checking for inttypes.h... no checking for stdint.h... no checking for unistd.h... no checking for dlfcn.h... no checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking whether make sets $(MAKE)... (cached) yes checking for ANSI C header files... (cached) yes checking for stdlib.h... (cached) no checking for string.h... (cached) no checking for strings.h... (cached) no checking limits.h usability... no checking limits.h presence... yes configure: WARNING: limits.h: present but cannot be compiled configure: WARNING: limits.h: check for missing prerequisite headers? configure: WARNING: limits.h: see the Autoconf documentation configure: WARNING: limits.h: section "Present But Cannot Be Compiled" configure: WARNING: limits.h: proceeding with the compiler's result checking for limits.h... no checking sys/time.h usability... no checking sys/time.h presence... yes configure: WARNING: sys/time.h: present but cannot be compiled configure: WARNING: sys/time.h: check for missing prerequisite headers? configure: WARNING: sys/time.h: see the Autoconf documentation configure: WARNING: sys/time.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/time.h: proceeding with the compiler's result checking for sys/time.h... no checking for unistd.h... (cached) no checking sys/times.h usability... no checking sys/times.h presence... yes configure: WARNING: sys/times.h: present but cannot be compiled configure: WARNING: sys/times.h: check for missing prerequisite headers? configure: WARNING: sys/times.h: see the Autoconf documentation configure: WARNING: sys/times.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/times.h: proceeding with the compiler's result checking for sys/times.h... no checking size of int... 0 checking size of short... 0 checking size of long... 0 checking for an ANSI C-conforming const... yes checking whether time.h and sys/time.h may both be included... yes checking for sizet... no checking for working alloca.h... no checking for alloca... yes checking for working memcmp... no checking for prototypes... yes checking for variable length prototypes and stdarg.h... yes checking that generated files are newer than configure... done **configure: creating ./config.status /@[a-zA-Z][a-zA-Z_0-9]*@/build_os='linux-gnu' config.status: creating Makefile sed: can't find label for jump to uild_os='linux-gnu'' config.status: creating src/Makefile sed: can't find label for jump touild_os='linux-gnu'' config.status: creating test/Makefile sed: can't find label for jump to uild_os='linux-gnu'' config.status: creating sample/Makefile sed: can't find label for jump touild_os='linux-gnu'' config.status: creating onig-config sed: can't find label for jump to `uild_os='linux-gnu'' config.status: creating src/config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing default commands make: * No targets. Stop. Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/setup.py", line 113, in setup( File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/init.py", line 117, in setup return distutils.core.setup(**attrs) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 384, in run self.run_command("build") File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/home/samuel.texier/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 972, in run_command cmd_obj.run() File "/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/setup.py", line 31, in run self._build_oniguruma() File "/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/setup.py", line 45, in _build_oniguruma
self._build_lib( File "/tmp/pip-install-t2o0ac92/pyjq_8f2f26d683cf470599a9877911c11d40/setup.py", line 89, in _build_lib subprocess.check_call(command, cwd=lib_dir) File "/usr/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyjq ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyjq)`

Seems to come from a bad separator in sed, in the lines I put in bold. $ sed --version

sed (GNU sed) 4.9

Why would I be getting this error, and how could I fix it?

samtexkos commented 3 weeks ago

Error comes from the oniguruma 6.9.0 dependency. trying to install it manually but cannot fix the error