| Cost | $0.055 |
| Total elapsed time | 2m6s |
| LLM inference time | 1m26s |
| Command execution time | 40s |
| Commands executed | 26 |
All details >
| Attempt ID | 7b64txxdd5lxw | Attempt group | run-23-09-21-48 |
| Revision | ad46875d9374 | AWS Instance | m8i.2xlarge |
| Start time | 2025-09-23T20:24:35.144Z | End time | 2025-09-23T20:26:48.389Z |
| Task | jq-windows | Environment | ubuntu-22.04-amd64-wine |
| Model | | OpenRouter slug | deepseek/deepseek-v3.1-terminus |
| Temperature | 1 | Explicit prompt caching | false |
| User msg after tool call | false | Max tool calls | 100 |
| Total timeout seconds | 2400 | Single command timeout | 1200 |
| Cost | $0.055 | Duration | 2m6s |
| LLM inference time | 1m26s | Command execution time | 40s |
| Final context tokens | 17,127 | Total output tokens | 1,537 |
| Output reasoning tokens | 0 | Messages | 55 |
| Assistant messages | 27 | User messages | 1 |
| System messages | 1 | Commands executed | 26 |
jq 1.8.1 is a command-line JSON utility for viewing and transforming JSON.
Project link: github.com/jqlang/jq
Task:
Compile and install jq to a specific location. Cross-compile to Windows, link it statically.
Difficulties:
Cross-compilation to Windows, setting up the cross-compilation toolchain (compilers, etc), making sure that there are no dynamic libraries.
Environment:
Ubuntu 22.04 on amd64, with internet access.
You are a package-building specialist operating a Ubuntu 22.04 bash shell via one tool: run_terminal_cmd.
The current working directory of every run_terminal_cmd is /home/peter.
Execution rules:
- Always pass non-interactive flags for any command that could prompt (e.g., -y, --yes, DEBIAN_FRONTEND=noninteractive).
- Don't include any newlines in the command.
- You can use sudo.
If you encounter any errors or issues while doing the user's request, you must fix them and continue the task.
At the end verify you did the user request correctly.
You are given jq v1.8.1 source code at jq.tar.gz. Please compile the jq package for amd64 Windows and install it to /home/peter/result/jq.exe. Build it statically.
I'll help you compile jq v1.8.1 for Windows amd64 and install it as a static executable. Let me start by extracting the source code and setting up the build environment.
/home/peter
Let me first check what's in the current directory and then extract the jq source code.
compile-bench> ls -la total 2004
drwxr-x--- 1 peter peter 4096 Sep 23 20:24 .
drwxr-xr-x 1 root root 4096 Sep 15 11:21 ..
-rw-r--r-- 1 peter peter 220 Jan 6 2022 .bash_logout
-rw-r--r-- 1 peter peter 3771 Jan 6 2022 .bashrc
-rw-r--r-- 1 peter peter 807 Jan 6 2022 .profile
-rw-r--r-- 1 peter peter 2026798 Sep 23 20:24 jq.tar.gz
↓ 8 lines
total 2004 drwxr-x--- 1 peter peter 4096 Sep 23 20:24 . drwxr-xr-x 1 root root 4096 Sep 15 11:21 .. -rw-r--r-- 1 peter peter 220 Jan 6 2022 .bash_logout -rw-r--r-- 1 peter peter 3771 Jan 6 2022 .bashrc -rw-r--r-- 1 peter peter 807 Jan 6 2022 .profile -rw-r--r-- 1 peter peter 2026798 Sep 23 20:24 jq.tar.gz
Now I'll extract the jq source code:
[empty output]
Let me list the directory to see if the extraction worked:
compile-bench> ls -la total 2008
drwxr-x--- 1 peter peter 4096 Sep 23 20:24 .
drwxr-xr-x 1 root root 4096 Sep 15 11:21 ..
-rw-r--r-- 1 peter peter 220 Jan 6 2022 .bash_logout
-rw-r--r-- 1 peter peter 3771 Jan 6 2022 .bashrc
-rw-r--r-- 1 peter peter 807 Jan 6 2022 .profile
drwxr-xr-x 9 peter peter 4096 Jul 1 11:40 jq-1.8.1
-rw-r--r-- 1 peter peter 2026798 Sep 23 20:24 jq.tar.gz
↓ 9 lines
total 2008 drwxr-x--- 1 peter peter 4096 Sep 23 20:24 . drwxr-xr-x 1 root root 4096 Sep 15 11:21 .. -rw-r--r-- 1 peter peter 220 Jan 6 2022 .bash_logout -rw-r--r-- 1 peter peter 3771 Jan 6 2022 .bashrc -rw-r--r-- 1 peter peter 807 Jan 6 2022 .profile drwxr-xr-x 9 peter peter 4096 Jul 1 11:40 jq-1.8.1 -rw-r--r-- 1 peter peter 2026798 Sep 23 20:24 jq.tar.gz
Good! The source code has been extracted. Now I need to install the necessary build dependencies for cross-compiling to Windows amd64. I'll need a cross-compilation toolchain:
compile-bench> sudo apt-get update
0% [Working]
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%]
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%]
0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
0% [3 InRelease 12.7 kB/128 kB 10%] [1 InRelease 20.0 kB/129 kB 15%]
0% [3 InRelease 67.7 kB/128 kB 53%]
0% [3 InRelease 93.8 kB/128 kB 73%]
0% [Waiting for headers] [Waiting for headers]
0% [Waiting for headers] [Waiting for headers]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5526 kB]
0% [Waiting for headers] [4 Packages 2655 B/5526 kB 0%]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
0% [5 InRelease 2588 B/127 kB 2%] [4 Packages 85.2 kB/5526 kB 2%]
0% [4 Packages 185 kB/5526 kB 3%]
18% [Waiting for headers] [4 Packages 276 kB/5526 kB 5%]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.1 kB]
19% [6 Packages 2658 B/69.1 kB 4%] [4 Packages 434 kB/5526 kB 8%]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3681 kB]
19% [7 Packages 11.1 kB/3681 kB 0%] [4 Packages 586 kB/5526 kB 11%]
19% [6 Packages store 0 B] [7 Packages 11.1 kB/3681 kB 0%] [4 Packages 586 kB/5
20% [7 Packages 16.9 kB/3681 kB 0%] [4 Packages 599 kB/5526 kB 11%]
43% [7 Packages 1329 kB/3681 kB 36%]
43% [4 Packages store 0 B] [7 Packages 1329 kB/3681 kB 36%]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3336 kB]
49% [4 Packages store 0 B] [7 Packages 2784 kB/3681 kB 76%] [8 Packages 46.3 kB
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5779 kB]
53% [4 Packages store 0 B] [9 Packages 5956 B/5779 kB 0%] [8 Packages 456 kB/33
59% [9 Packages 1280 kB/5779 kB 22%] [8 Packages 456 kB/3336 kB 14%]
59% [7 Packages store 0 B] [9 Packages 1307 kB/5779 kB 23%] [8 Packages 456 kB/
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1577 kB]
78% [7 Packages store 0 B] [10 Packages 20.5 kB/1577 kB 1%] [8 Packages 1160 kB
81% [10 Packages 607 kB/1577 kB 38%] [8 Packages 1289 kB/3336 kB 39%]
81% [9 Packages store 0 B] [10 Packages 607 kB/1577 kB 38%] [8 Packages 1289 kB
88% [9 Packages store 0 B] [8 Packages 2071 kB/3336 kB 62%]
92% [8 Packages 3241 kB/3336 kB 97%]
92% [10 Packages store 0 B] [8 Packages 3241 kB/3336 kB 97%]
93% [10 Packages store 0 B] [Waiting for headers]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1274 kB]
93% [10 Packages store 0 B] [11 Packages 31.6 kB/1274 kB 2%]
98% [10 Packages store 0 B] [Waiting for headers]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [71.0 kB]
98% [10 Packages store 0 B] [12 Packages 24.0 kB/71.0 kB 34%]
98% [12 Packages 28.7 kB/71.0 kB 40%]
98% [8 Packages store 0 B] [12 Packages 28.7 kB/71.0 kB 40%]
98% [8 Packages store 0 B]
99% [Working]
99% [11 Packages store 0 B]
99% [Working]
99% [12 Packages store 0 B]
100% [Working]
Fetched 21.7 MB in 2s (12.2 MB/s)
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 3%
Reading package lists... 3%
Reading package lists... 4%
Reading package lists... 4%
Reading package lists... 41%
Reading package lists... 41%
Reading package lists... 42%
Reading package lists... 42%
Reading package lists... 51%
Reading package lists... 51%
Reading package lists... 67%
Reading package lists... 67%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 81%
Reading package lists... 81%
Reading package lists... 96%
Reading package lists... 96%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... Done
↓ 15 lines
0% [Working] Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] 0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%] Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease 0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%] 0% [Waiting for headers] [1 InRelease 14.2 kB/129 kB 11%] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] 0% [3 InRelease 12.7 kB/128 kB 10%] [1 InRelease 20.0 kB/129 kB 15%] 0% [3 InRelease 67.7 kB/128 kB 53%] 0% [3 InRelease 93.8 kB/128 kB 73%] 0% [Waiting for headers] [Waiting for headers] 0% [Waiting for headers] [Waiting for headers] Get:4 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5526 kB] 0% [Waiting for headers] [4 Packages 2655 B/5526 kB 0%] Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] 0% [5 InRelease 2588 B/127 kB 2%] [4 Packages 85.2 kB/5526 kB 2%] 0% [4 Packages 185 kB/5526 kB 3%] 18% [Waiting for headers] [4 Packages 276 kB/5526 kB 5%] Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.1 kB] 19% [6 Packages 2658 B/69.1 kB 4%] [4 Packages 434 kB/5526 kB 8%] Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3681 kB] 19% [7 Packages 11.1 kB/3681 kB 0%] [4 Packages 586 kB/5526 kB 11%] 19% [6 Packages store 0 B] [7 Packages 11.1 kB/3681 kB 0%] [4 Packages 586 kB/5 20% [7 Packages 16.9 kB/3681 kB 0%] [4 Packages 599 kB/5526 kB 11%] 43% [7 Packages 1329 kB/3681 kB 36%] 43% [4 Packages store 0 B] [7 Packages 1329 kB/3681 kB 36%] Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3336 kB] 49% [4 Packages store 0 B] [7 Packages 2784 kB/3681 kB 76%] [8 Packages 46.3 kB Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5779 kB] 53% [4 Packages store 0 B] [9 Packages 5956 B/5779 kB 0%] [8 Packages 456 kB/33 59% [9 Packages 1280 kB/5779 kB 22%] [8 Packages 456 kB/3336 kB 14%] 59% [7 Packages store 0 B] [9 Packages 1307 kB/5779 kB 23%] [8 Packages 456 kB/ Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1577 kB] 78% [7 Packages store 0 B] [10 Packages 20.5 kB/1577 kB 1%] [8 Packages 1160 kB 81% [10 Packages 607 kB/1577 kB 38%] [8 Packages 1289 kB/3336 kB 39%] 81% [9 Packages store 0 B] [10 Packages 607 kB/1577 kB 38%] [8 Packages 1289 kB 88% [9 Packages store 0 B] [8 Packages 2071 kB/3336 kB 62%] 92% [8 Packages 3241 kB/3336 kB 97%] 92% [10 Packages store 0 B] [8 Packages 3241 kB/3336 kB 97%] 93% [10 Packages store 0 B] [Waiting for headers] Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1274 kB] 93% [10 Packages store 0 B] [11 Packages 31.6 kB/1274 kB 2%] 98% [10 Packages store 0 B] [Waiting for headers] Get:12 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [71.0 kB] 98% [10 Packages store 0 B] [12 Packages 24.0 kB/71.0 kB 34%] 98% [12 Packages 28.7 kB/71.0 kB 40%] 98% [8 Packages store 0 B] [12 Packages 28.7 kB/71.0 kB 40%] 98% [8 Packages store 0 B] 99% [Working] 99% [11 Packages store 0 B] 99% [Working] 99% [12 Packages store 0 B] 100% [Working] Fetched 21.7 MB in 2s (12.2 MB/s) Reading package lists... 0% Reading package lists... 0% Reading package lists... 0% Reading package lists... 3% Reading package lists... 3% Reading package lists... 4% Reading package lists... 4% Reading package lists... 41% Reading package lists... 41% Reading package lists... 42% Reading package lists... 42% Reading package lists... 51% Reading package lists... 51% Reading package lists... 67% Reading package lists... 67% Reading package lists... 71% Reading package lists... 71% Reading package lists... 71% Reading package lists... 71% Reading package lists... 72% Reading package lists... 72% Reading package lists... 72% Reading package lists... 72% Reading package lists... 81% Reading package lists... 81% Reading package lists... 96% Reading package lists... 96% Reading package lists... 99% Reading package lists... 99% Reading package lists... 99% Reading package lists... 99% Reading package lists... Done
Now I'll install the cross-compilation tools:
compile-bench> sudo apt-get install -y mingw-w64 build-essential autoconf automake libtool pkg-config
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 3%
Reading package lists... 3%
Reading package lists... 4%
Reading package lists... 4%
Reading package lists... 41%
Reading package lists... 41%
Reading package lists... 42%
Reading package lists... 42%
Reading package lists... 51%
Reading package lists... 51%
Reading package lists... 67%
Reading package lists... 67%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 71%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 72%
Reading package lists... 81%
Reading package lists... 81%
Reading package lists... 96%
Reading package lists... 96%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... 99%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... 0%
Building dependency tree... 50%
Building dependency tree... 50%
Building dependency tree... Done
Reading state information... 0%
Reading state information... 0%
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
The following additional packages will be installed:
autotools-dev binutils-mingw-w64-i686 binutils-mingw-w64-x86-64
g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-i686-posix
g++-mingw-w64-i686-win32 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix
g++-mingw-w64-x86-64-win32 gcc-mingw-w64 gcc-mingw-w64-base
gcc-mingw-w64-i686 gcc-mingw-w64-i686-posix gcc-mingw-w64-i686-posix-runtime
gcc-mingw-w64-i686-win32 gcc-mingw-w64-i686-win32-runtime
gcc-mingw-w64-x86-64 gcc-mingw-w64-x86-64-posix
gcc-mingw-w64-x86-64-posix-runtime gcc-mingw-w64-x86-64-win32
gcc-mingw-w64-x86-64-win32-runtime libltdl-dev libsigsegv2 m4
mingw-w64-common mingw-w64-i686-dev mingw-w64-x86-64-dev
Suggested packages:
autoconf-archive gnu-standards autoconf-doc gettext gcc-10-locales
libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev binutils-mingw-w64-i686
binutils-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686
g++-mingw-w64-i686-posix g++-mingw-w64-i686-win32 g++-mingw-w64-x86-64
g++-mingw-w64-x86-64-posix g++-mingw-w64-x86-64-win32 gcc-mingw-w64
gcc-mingw-w64-base gcc-mingw-w64-i686 gcc-mingw-w64-i686-posix
gcc-mingw-w64-i686-posix-runtime gcc-mingw-w64-i686-win32
gcc-mingw-w64-i686-win32-runtime gcc-mingw-w64-x86-64
gcc-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix-runtime
gcc-mingw-w64-x86-64-win32 gcc-mingw-w64-x86-64-win32-runtime libltdl-dev
libsigsegv2 libtool m4 mingw-w64 mingw-w64-common mingw-w64-i686-dev
mingw-w64-x86-64-dev pkg-config
0 upgraded, 33 newly installed, 0 to remove and 8 not upgraded.
Need to get 230 MB of archives.
After this ope
[command output truncated]
/x86_64-w64-mingw32-gcc-posix to provide /usr/bin/x86_64-w64-mingw32-gcc (x86_64-w64-mingw32-gcc) in auto mode
Setting up gcc-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: using /usr/bin/x86_64-w64-mingw32-gcc-win32 to provide /usr/bin/x86_64-w64-mingw32-gcc (x86_64-w64-mingw32-gcc) in auto mode
Setting up gcc-mingw-w64-x86-64 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/x86_64-w64-mingw32-gcc-win32 because link group x86_64-w64-mingw32-gcc is broken
update-alternatives: warning: skip creation of /usr/bin/x86_64-w64-mingw32-gcc-8 because associated file /usr/bin/x86_64-w64-mingw32-gcc-8.3-win32 (of link group x86_64-w64-mingw32-gcc) doesn't exist
Setting up autoconf (2.71-2) ...
Setting up mingw-w64-i686-dev (8.0.0-1) ...
Setting up automake (1:1.16.5-1.3) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/automake.1.gz because associated file /usr/share/man/man1/automake-1.16.1.gz (of link group automake) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/aclocal.1.gz because associated file /usr/share/man/man1/aclocal-1.16.1.gz (of link group automake) doesn't exist
Setting up gcc-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-win32 to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode
Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode
Setting up gcc-mingw-w64-i686-posix (10.3.0-14ubuntu1+24.3) ...
Setting up g++-mingw-w64-x86-64-posix (10.3.0-14ubuntu1+24.3) ...
Setting up gcc-mingw-w64-i686 (10.3.0-14ubuntu1+24.3) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/i686-w64-mingw32-gcc-win32 because link group i686-w64-mingw32-gcc is broken
update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-8 because associated file /usr/bin/i686-w64-mingw32-gcc-8.3-win32 (of link group i686-w64-mingw32-gcc) doesn't exist
Setting up libltdl-dev:amd64 (2.4.6-15build2) ...
Setting up g++-mingw-w64-x86-64 (10.3.0-14ubuntu1+24.3) ...
Setting up gcc-mingw-w64 (10.3.0-14ubuntu1+24.3) ...
Setting up g++-mingw-w64-i686-posix (10.3.0-14ubuntu1+24.3) ...
Setting up g++-mingw-w64-i686 (10.3.0-14ubuntu1+24.3) ...
Setting up g++-mingw-w64 (10.3.0-14ubuntu1+24.3) ...
Setting up mingw-w64 (8.0.0-1) ...
Processing triggers for libwine:amd64 (6.0.3~repack-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
↓ 67 lines
Reading package lists... 0% Reading package lists... 0% Reading package lists... 0% Reading package lists... 3% Reading package lists... 3% Reading package lists... 4% Reading package lists... 4% Reading package lists... 41% Reading package lists... 41% Reading package lists... 42% Reading package lists... 42% Reading package lists... 51% Reading package lists... 51% Reading package lists... 67% Reading package lists... 67% Reading package lists... 71% Reading package lists... 71% Reading package lists... 71% Reading package lists... 71% Reading package lists... 72% Reading package lists... 72% Reading package lists... 72% Reading package lists... 72% Reading package lists... 81% Reading package lists... 81% Reading package lists... 96% Reading package lists... 96% Reading package lists... 99% Reading package lists... 99% Reading package lists... 99% Reading package lists... 99% Reading package lists... Done Building dependency tree... 0% Building dependency tree... 0% Building dependency tree... 50% Building dependency tree... 50% Building dependency tree... Done Reading state information... 0% Reading state information... 0% Reading state information... Done build-essential is already the newest version (12.9ubuntu3). The following additional packages will be installed: autotools-dev binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-i686-posix g++-mingw-w64-i686-win32 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix g++-mingw-w64-x86-64-win32 gcc-mingw-w64 gcc-mingw-w64-base gcc-mingw-w64-i686 gcc-mingw-w64-i686-posix gcc-mingw-w64-i686-posix-runtime gcc-mingw-w64-i686-win32 gcc-mingw-w64-i686-win32-runtime gcc-mingw-w64-x86-64 gcc-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix-runtime gcc-mingw-w64-x86-64-win32 gcc-mingw-w64-x86-64-win32-runtime libltdl-dev libsigsegv2 m4 mingw-w64-common mingw-w64-i686-dev mingw-w64-x86-64-dev Suggested packages: autoconf-archive gnu-standards autoconf-doc gettext gcc-10-locales libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc The following NEW packages will be installed: autoconf automake autotools-dev binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-i686-posix g++-mingw-w64-i686-win32 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix g++-mingw-w64-x86-64-win32 gcc-mingw-w64 gcc-mingw-w64-base gcc-mingw-w64-i686 gcc-mingw-w64-i686-posix gcc-mingw-w64-i686-posix-runtime gcc-mingw-w64-i686-win32 gcc-mingw-w64-i686-win32-runtime gcc-mingw-w64-x86-64 gcc-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix-runtime gcc-mingw-w64-x86-64-win32 gcc-mingw-w64-x86-64-win32-runtime libltdl-dev libsigsegv2 libtool m4 mingw-w64 mingw-w64-common mingw-w64-i686-dev mingw-w64-x86-64-dev pkg-config 0 upgraded, 33 newly installed, 0 to remove and 8 not upgraded. Need to get 230 MB of archives. After this ope [command output truncated] /x86_64-w64-mingw32-gcc-posix to provide /usr/bin/x86_64-w64-mingw32-gcc (x86_64-w64-mingw32-gcc) in auto mode Setting up gcc-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ... update-alternatives: using /usr/bin/x86_64-w64-mingw32-gcc-win32 to provide /usr/bin/x86_64-w64-mingw32-gcc (x86_64-w64-mingw32-gcc) in auto mode Setting up gcc-mingw-w64-x86-64 (10.3.0-14ubuntu1+24.3) ... update-alternatives: warning: forcing reinstallation of alternative /usr/bin/x86_64-w64-mingw32-gcc-win32 because link group x86_64-w64-mingw32-gcc is broken update-alternatives: warning: skip creation of /usr/bin/x86_64-w64-mingw32-gcc-8 because associated file /usr/bin/x86_64-w64-mingw32-gcc-8.3-win32 (of link group x86_64-w64-mingw32-gcc) doesn't exist Setting up autoconf (2.71-2) ... Setting up mingw-w64-i686-dev (8.0.0-1) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/automake.1.gz because associated file /usr/share/man/man1/automake-1.16.1.gz (of link group automake) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/aclocal.1.gz because associated file /usr/share/man/man1/aclocal-1.16.1.gz (of link group automake) doesn't exist Setting up gcc-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ... update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-win32 to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ... update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ... update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode Setting up gcc-mingw-w64-i686-posix (10.3.0-14ubuntu1+24.3) ... Setting up g++-mingw-w64-x86-64-posix (10.3.0-14ubuntu1+24.3) ... Setting up gcc-mingw-w64-i686 (10.3.0-14ubuntu1+24.3) ... update-alternatives: warning: forcing reinstallation of alternative /usr/bin/i686-w64-mingw32-gcc-win32 because link group i686-w64-mingw32-gcc is broken update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-8 because associated file /usr/bin/i686-w64-mingw32-gcc-8.3-win32 (of link group i686-w64-mingw32-gcc) doesn't exist Setting up libltdl-dev:amd64 (2.4.6-15build2) ... Setting up g++-mingw-w64-x86-64 (10.3.0-14ubuntu1+24.3) ... Setting up gcc-mingw-w64 (10.3.0-14ubuntu1+24.3) ... Setting up g++-mingw-w64-i686-posix (10.3.0-14ubuntu1+24.3) ... Setting up g++-mingw-w64-i686 (10.3.0-14ubuntu1+24.3) ... Setting up g++-mingw-w64 (10.3.0-14ubuntu1+24.3) ... Setting up mingw-w64 (8.0.0-1) ... Processing triggers for libwine:amd64 (6.0.3~repack-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
Now let's check if the cross-compiler is properly installed:
/usr/bin/x86_64-w64-mingw32-gcc
Good! Now let's change to the jq source directory and check its build system:
compile-bench> cd jq-1.8.1 && ls -la total 1184
drwxr-xr-x 9 peter peter 4096 Jul 1 11:40 .
drwxr-x--- 1 peter peter 4096 Sep 23 20:24 ..
-rw-r--r-- 1 peter peter 10686 Jul 1 11:39 AUTHORS
-rw-r--r-- 1 peter peter 7887 Jul 1 11:39 COPYING
-rw-r--r-- 1 peter peter 33286 Jul 1 11:39 ChangeLog
-rw-r--r-- 1 peter peter 9090 Jul 1 11:39 Makefile.am
-rw-r--r-- 1 peter peter 75461 Jul 1 11:39 Makefile.in
-rw-r--r-- 1 peter peter 24670 Jul 1 11:39 NEWS.md
-rw-r--r-- 1 peter peter 2434 Jul 1 11:39 README.md
-rw-r--r-- 1 peter peter 46459 Jul 1 11:39 aclocal.m4
drwxr-xr-x 3 peter peter 4096 Jul 1 11:40 config
-rwxr-xr-x 1 peter peter 665647 Jul 1 11:39 configure
-rw-r--r-- 1 peter peter 9881 Jul 1 11:39 configure.ac
drwxr-xr-x 5 peter peter 4096 Jul 1 11:40 docs
-rw-r--r-- 1 peter peter 124253 Jul 1 11:39 jq.1
-rw-r--r-- 1 peter peter 124253 Jul 1 11:39 jq.1.prebuilt
-rw-r--r-- 1 peter peter 1431 Jul 1 11:39 jq.spec
-rw-r--r-- 1 peter peter 255 Jul 1 11:39 libjq.pc
-rw-r--r-- 1 peter peter 246 Jul 1 11:39 libjq.pc.in
drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 m4
drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 scripts
drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 src
drwxr-xr-x 4 peter peter 4096 Jul 1 11:40 tests
drwxr-xr-x 4 peter peter 4096 Jul 1 11:40 vendor
↓ 26 lines
total 1184 drwxr-xr-x 9 peter peter 4096 Jul 1 11:40 . drwxr-x--- 1 peter peter 4096 Sep 23 20:24 .. -rw-r--r-- 1 peter peter 10686 Jul 1 11:39 AUTHORS -rw-r--r-- 1 peter peter 7887 Jul 1 11:39 COPYING -rw-r--r-- 1 peter peter 33286 Jul 1 11:39 ChangeLog -rw-r--r-- 1 peter peter 9090 Jul 1 11:39 Makefile.am -rw-r--r-- 1 peter peter 75461 Jul 1 11:39 Makefile.in -rw-r--r-- 1 peter peter 24670 Jul 1 11:39 NEWS.md -rw-r--r-- 1 peter peter 2434 Jul 1 11:39 README.md -rw-r--r-- 1 peter peter 46459 Jul 1 11:39 aclocal.m4 drwxr-xr-x 3 peter peter 4096 Jul 1 11:40 config -rwxr-xr-x 1 peter peter 665647 Jul 1 11:39 configure -rw-r--r-- 1 peter peter 9881 Jul 1 11:39 configure.ac drwxr-xr-x 5 peter peter 4096 Jul 1 11:40 docs -rw-r--r-- 1 peter peter 124253 Jul 1 11:39 jq.1 -rw-r--r-- 1 peter peter 124253 Jul 1 11:39 jq.1.prebuilt -rw-r--r-- 1 peter peter 1431 Jul 1 11:39 jq.spec -rw-r--r-- 1 peter peter 255 Jul 1 11:39 libjq.pc -rw-r--r-- 1 peter peter 246 Jul 1 11:39 libjq.pc.in drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 m4 drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 scripts drwxr-xr-x 2 peter peter 4096 Jul 1 11:40 src drwxr-xr-x 4 peter peter 4096 Jul 1 11:40 tests drwxr-xr-x 4 peter peter 4096 Jul 1 11:40 vendor
Now I need to configure jq for cross-compilation to Windows. I'll set up the appropriate cross-compilation flags:
bash: ./configure: No such file or directory
It seems the configure script might not be executable. Let me check and make it executable:
ls: cannot access 'configure': No such file or directory
Let me check the current directory and try again with the correct path:
/home/peter
I need to navigate to the jq source directory first:
-rwxr-xr-x 1 peter peter 665647 Jul 1 11:39 configure
Good! The configure script is executable. Now I'll configure jq for cross-compilation to Windows:
bash: ./configure: No such file or directory
This is strange. Let me check if I'm in the correct directory:
compile-bench> pwd && ls -la configure /home/peter
ls: cannot access 'configure': No such file or directory
↓ 3 lines
/home/peter ls: cannot access 'configure': No such file or directory
It seems each command runs in a fresh shell. Let me chain the commands properly:
compile-bench> cd /home/peter/jq-1.8.1 && CC=x86_64-w64-mingw32-gcc ./configure --host=x86_64-w64-mingw32 --prefix=/home/peter/result --disable-shared --enable-static checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to enable C11 features... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking the archiver (x86_64-w64-mingw32-ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-w64-mingw32-gcc... (cached) x86_64-w64-mingw32-gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether x86_64-w64-mingw32-gcc accepts -g... (cached) yes
checking for x86_64-w64-mingw32-gcc option to enable C11 features... (cached) none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... (cached) yes
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for bison... no
checking for byacc... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
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 x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld
checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm -B
checking the name lister (/usr/bin/x86_64-w64-mingw32-nm -B) interface... BSD n
[command output truncated]
efixed with host triplet
checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking command to parse /usr/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-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 x86_64-w64-mingw32-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-gcc static flag -static works... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-gcc linker (/usr/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
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 sys/time.h... yes
checking for unistd.h... (cached) yes
checking for sys/times.h... no
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking size of void*... 8
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating sample/Makefile
config.status: creating onig-config
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
↓ 120 lines
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether x86_64-w64-mingw32-gcc accepts -g... yes checking for x86_64-w64-mingw32-gcc option to enable C11 features... none needed checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking dependency style of x86_64-w64-mingw32-gcc... gcc3 checking whether make supports nested variables... (cached) yes checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar checking the archiver (x86_64-w64-mingw32-ar) interface... ar checking whether to enable maintainer-specific portions of Makefiles... no checking for x86_64-w64-mingw32-gcc... (cached) x86_64-w64-mingw32-gcc checking whether the compiler supports GNU C... (cached) yes checking whether x86_64-w64-mingw32-gcc accepts -g... (cached) yes checking for x86_64-w64-mingw32-gcc option to enable C11 features... (cached) none needed checking whether x86_64-w64-mingw32-gcc understands -c and -o together... (cached) yes checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E checking for bison... no checking for byacc... no checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-w64-mingw32 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 x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm -B checking the name lister (/usr/bin/x86_64-w64-mingw32-nm -B) interface... BSD n [command output truncated] efixed with host triplet checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool checking how to associate runtime and link libraries... func_cygming_dll_for_implib checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar checking for archiver @FILE support... @ checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib checking command to parse /usr/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-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 x86_64-w64-mingw32-mt... no checking for mt... no checking if : is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... no checking for objdir... .libs checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes checking if x86_64-w64-mingw32-gcc static flag -static works... yes checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes checking whether the x86_64-w64-mingw32-gcc linker (/usr/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe 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 sys/time.h... yes checking for unistd.h... (cached) yes checking for sys/times.h... no checking size of int... 4 checking size of long... 4 checking size of long long... 8 checking size of void*... 8 checking for size_t... yes checking for working alloca.h... no checking for alloca... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating test/Makefile config.status: creating sample/Makefile config.status: creating onig-config config.status: creating src/config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing default commands
Great! The configuration was successful. Now I'll build jq using make:
compile-bench> cd jq-1.8.1 && make -j$(nproc) mkdir -p src
mkdir -p src
GEN src/builtin.inc
GEN src/config_opts.inc
mkdir -p src
GEN src/version.h
make all-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making all in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making all in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make all-am
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c -o regparse.lo regparse.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c -o regcomp.lo regcomp.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c -o regexec.lo regexec.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c -o regenc.lo regenc.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c -o regerror.lo regerror.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c -o regext.lo regext.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c -o regsyntax.lo regsyntax.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c -o regtrav.lo regtrav.c
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regenc.lo -MD -MP -
[command output truncated]
uilding static only
libtool: link: x86_64-w64-mingw32-ar cr .libs/libonig.a regparse.o regcomp.o regexec.o regenc.o regerror.o regext.o regsyntax.o regtrav.o regversion.o st.o reggnu.o unicode.o unicode_unfold_key.o unicode_fold1_key.o unicode_fold2_key.o unicode_fold3_key.o ascii.o utf8.o utf16_be.o utf16_le.o utf32_be.o utf32_le.o euc_jp.o euc_jp_prop.o sjis.o sjis_prop.o iso8859_1.o iso8859_2.o iso8859_3.o iso8859_4.o iso8859_5.o iso8859_6.o iso8859_7.o iso8859_8.o iso8859_9.o iso8859_10.o iso8859_11.o iso8859_13.o iso8859_14.o iso8859_15.o iso8859_16.o euc_tw.o euc_kr.o big5.o gb18030.o koi8_r.o cp1251.o onig_init.o
libtool: link: x86_64-w64-mingw32-ranlib .libs/libonig.a
libtool: link: ( cd ".libs" && rm -f "libonig.la" && ln -s "../libonig.la" "libonig.la" )
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
Making all in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making all in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
sed -e 's,[@]datadir[@],/home/peter/result/share,g' -e 's,[@]datarootdir[@],/home/peter/result/share,g' -e 's,[@]PACKAGE_VERSION[@],6.9.10,g' -e 's,[@]prefix[@],/home/peter/result,g' -e 's,[@]exec_prefix[@],/home/peter/result,g' -e 's,[@]libdir[@],/home/peter/result/lib,g' -e 's,[@]includedir[@],/home/peter/result/include,g' < ./oniguruma.pc.in > oniguruma.pc
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Entering directory '/home/peter/jq-1.8.1'
CC src/builtin.lo
CC src/bytecode.lo
CC src/compile.lo
CC src/execute.lo
CC src/jq_test.lo
CC src/jv.lo
CC src/jv_alloc.lo
CC src/jv_aux.lo
CC src/jv_dtoa.lo
CC src/jv_file.lo
CC src/jv_parse.lo
CC src/jv_print.lo
CC src/jv_unicode.lo
CC src/linker.lo
CC src/locfile.lo
CC src/util.lo
CC src/jv_dtoa_tsd.lo
CC vendor/decNumber/decContext.lo
CC vendor/decNumber/decNumber.lo
CC src/lexer.lo
CC src/parser.lo
mkdir -p src
GEN src/version.h
CC src/main.o
src/main.c:21:1: warning: function declaration isn't a prototype [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict-prototypes-Wstrict-prototypes]8;;]
21 | extern void jv_tsd_dtoa_ctx_init();
| ^~~~~~
CCLD libjq.la
CCLD jq.exe
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 81 lines
mkdir -p src
mkdir -p src
GEN src/builtin.inc
GEN src/config_opts.inc
mkdir -p src
GEN src/version.h
make all-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making all in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making all in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make all-am
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c -o regparse.lo regparse.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c -o regcomp.lo regcomp.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c -o regexec.lo regexec.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c -o regenc.lo regenc.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c -o regerror.lo regerror.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c -o regext.lo regext.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c -o regsyntax.lo regsyntax.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c -o regtrav.lo regtrav.c
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT regenc.lo -MD -MP -
[command output truncated]
uilding static only
libtool: link: x86_64-w64-mingw32-ar cr .libs/libonig.a regparse.o regcomp.o regexec.o regenc.o regerror.o regext.o regsyntax.o regtrav.o regversion.o st.o reggnu.o unicode.o unicode_unfold_key.o unicode_fold1_key.o unicode_fold2_key.o unicode_fold3_key.o ascii.o utf8.o utf16_be.o utf16_le.o utf32_be.o utf32_le.o euc_jp.o euc_jp_prop.o sjis.o sjis_prop.o iso8859_1.o iso8859_2.o iso8859_3.o iso8859_4.o iso8859_5.o iso8859_6.o iso8859_7.o iso8859_8.o iso8859_9.o iso8859_10.o iso8859_11.o iso8859_13.o iso8859_14.o iso8859_15.o iso8859_16.o euc_tw.o euc_kr.o big5.o gb18030.o koi8_r.o cp1251.o onig_init.o
libtool: link: x86_64-w64-mingw32-ranlib .libs/libonig.a
libtool: link: ( cd ".libs" && rm -f "libonig.la" && ln -s "../libonig.la" "libonig.la" )
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
Making all in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making all in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
sed -e 's,[@]datadir[@],/home/peter/result/share,g' -e 's,[@]datarootdir[@],/home/peter/result/share,g' -e 's,[@]PACKAGE_VERSION[@],6.9.10,g' -e 's,[@]prefix[@],/home/peter/result,g' -e 's,[@]exec_prefix[@],/home/peter/result,g' -e 's,[@]libdir[@],/home/peter/result/lib,g' -e 's,[@]includedir[@],/home/peter/result/include,g' < ./oniguruma.pc.in > oniguruma.pc
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Entering directory '/home/peter/jq-1.8.1'
CC src/builtin.lo
CC src/bytecode.lo
CC src/compile.lo
CC src/execute.lo
CC src/jq_test.lo
CC src/jv.lo
CC src/jv_alloc.lo
CC src/jv_aux.lo
CC src/jv_dtoa.lo
CC src/jv_file.lo
CC src/jv_parse.lo
CC src/jv_print.lo
CC src/jv_unicode.lo
CC src/linker.lo
CC src/locfile.lo
CC src/util.lo
CC src/jv_dtoa_tsd.lo
CC vendor/decNumber/decContext.lo
CC vendor/decNumber/decNumber.lo
CC src/lexer.lo
CC src/parser.lo
mkdir -p src
GEN src/version.h
CC src/main.o
src/main.c:21:1: warning: function declaration isn't a prototype [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict-prototypes-Wstrict-prototypes]8;;]
21 | extern void jv_tsd_dtoa_ctx_init();
| ^~~~~~
CCLD libjq.la
CCLD jq.exe
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
Excellent! The build was successful and produced jq.exe. Now I need to create the output directory and install the compiled executable. Let me check if the jq.exe was built:
jq.exe: PE32+ executable (console) x86-64, for MS Windows
Great! The Windows executable was built successfully. Now I need to create the result directory and install jq.exe there:
[empty output]
Let me verify that jq.exe was successfully copied to the result directory:
compile-bench> ls -la /home/peter/result/ total 4140
drwxr-xr-x 2 peter peter 4096 Sep 23 20:25 .
drwxr-x--- 1 peter peter 4096 Sep 23 20:25 ..
-rwxr-xr-x 1 peter peter 4229782 Sep 23 20:25 jq.exe
↓ 5 lines
total 4140 drwxr-xr-x 2 peter peter 4096 Sep 23 20:25 . drwxr-x--- 1 peter peter 4096 Sep 23 20:25 .. -rwxr-xr-x 1 peter peter 4229782 Sep 23 20:25 jq.exe
Let me verify that the executable is statically linked as requested:
/home/peter/result/jq.exe: PE32+ executable (console) x86-64, for MS Windows
Let me check if it's statically linked using the file command which can give more details:
/home/peter/result/jq.exe: PE32+ executable (console) x86-64, for MS Windows
Since we're on Linux and trying to check a Windows executable, let me use objdump to verify the static linking:
compile-bench> objdump -p /home/peter/result/jq.exe | head -20
/home/peter/result/jq.exe: file format pei-x86-64
Characteristics 0x26
executable
line numbers stripped
large address aware
Time/Date Tue Sep 23 20:25:48 2025
Magic 020b (PE32+)
MajorLinkerVersion 2
MinorLinkerVersion 38
SizeOfCode 000000000007a400
SizeOfInitializedData 00000000000e8200
SizeOfUninitializedData 0000000000001000
AddressOfEntryPoint 0000000000001520
BaseOfCode 0000000000001000
ImageBase 0000000140000000
SectionAlignment 00001000
FileAlignment 00000200
↓ 20 lines
/home/peter/result/jq.exe: file format pei-x86-64 Characteristics 0x26 executable line numbers stripped large address aware Time/Date Tue Sep 23 20:25:48 2025 Magic 020b (PE32+) MajorLinkerVersion 2 MinorLinkerVersion 38 SizeOfCode 000000000007a400 SizeOfInitializedData 00000000000e8200 SizeOfUninitializedData 0000000000001000 AddressOfEntryPoint 0000000000001520 BaseOfCode 0000000000001000 ImageBase 0000000140000000 SectionAlignment 00001000 FileAlignment 00000200
Let me check further to see if there are dynamic dependencies:
compile-bench> cd jq-1.8.1 && x86_64-w64-mingw32-objdump -p jq.exe | grep -i dll DllCharacteristics 00000160
vma: Hint Time Forward DLL First
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
DLL Name: libwinpthread-1.dll
DLL Name: SHLWAPI.dll
↓ 7 lines
DllCharacteristics 00000160 vma: Hint Time Forward DLL First DLL Name: KERNEL32.dll DLL Name: msvcrt.dll DLL Name: libwinpthread-1.dll DLL Name: SHLWAPI.dll
I see the issue! The executable has some Windows DLL dependencies, which means it's not fully static. I need to rebuild jq with proper static linking flags. Let me reconfigure with additional static linking options:
compile-bench> cd jq-1.8.1 && make clean Making clean in vendor/oniguruma
make[1]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making clean in src
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
test -z "libonig.la" || rm -f libonig.la
rm -f ./so_locations
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
Making clean in test
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
rm -f test_utf8.exe test_syntax.exe test_options.exe testc.exe testcu.exe test_regset.exe test_back.exe
rm -f test_utf8 test_syntax test_options testc testcu test_regset test_back
rm -rf .libs _libs
rm -f *.o
test -z "test_utf8.log test_syntax.log test_options.log testc.log testcu.log test_regset.log test_back.log" || rm -f test_utf8.log test_syntax.log test_options.log testc.log testcu.log test_regset.log test_back.log
test -z "test_utf8.trs test_syntax.trs test_options.trs testc.trs testcu.trs test_regset.trs test_back.trs" || rm -f test_utf8.trs test_syntax.trs test_options.trs testc.trs testcu.trs test_regset.trs test_back.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making clean in sample
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
rm -f encode.exe listcap.exe names.exe simple.exe sql.exe syntax.exe user_property.exe callout.exe echo.exe count.exe bug_fix.exe regset.exe scan.exe callback_each_match.exe
rm -f encode listcap names simple sql syntax user_property callout echo count bug_fix regset scan callback_each_match
rm -rf .libs _libs
rm -f *.o
test -z "encode.log listcap.log names.log simple.log sql.log syntax.log user_property.log callout.log echo.log count.log bug_fix.log regset.log scan.log callback_each_match.log" || rm -f encode.log listcap.log names.log simple.log sql.log syntax.log user_property.log callout.log echo.log count.log bug_fix.log regset.log scan.log callback_each_match.log
test -z "encode.trs listcap.trs names.trs simple.trs sql.trs syntax.trs user_property.trs callout.trs echo.trs count.trs bug_fix.trs regset.trs scan.trs callback_each_match.trs" || rm -f encode.trs listcap.trs names.trs simple.trs sql.trs syntax.trs user_property.trs callout.trs echo.trs count.trs bug_fix.trs regset.trs scan.trs callback_each_match.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[1]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[1]: Entering directory '/home/peter/jq-1.8.1'
rm -f jq.exe
rm -f jq
test -z "src/version.h .remake-version-h src/builtin.inc src/config_opts.inc jq.1" || rm -f src/version.h .remake-version-h src/builtin.inc src/config_opts.inc jq.1
test -z "libjq.la " || rm -f libjq.la
rm -f ./so_locations
rm -rf .libs _libs
rm -rf src/.libs src/_libs
rm -rf vendor/decNumber/.libs vendor/decNumber/_libs
rm -f *.o
rm -f src/*.o
rm -f src/*.lo
rm -f vendor/decNumber/*.o
rm -f vendor/decNumber/*.lo
test -z "tests/mantest.log tests/jqtest.log tests/shtest.log tests/utf8test.log tests/base64test.log tests/uritest.log tests/onigtest.log tests/manonigtest.log" || rm -f tests/mantest.log tests/jqtest.log tests/shtest.log tests/utf8test.log tests/base64test.log tests/uritest.log tests/onigtest.log tests/manonigtest.log
test -z "tests/mantest.trs tests/jqtest.trs tests/shtest.trs tests/utf8test.trs tests/base64test.trs tests/uritest.trs tests/onigtest.trs tests/manonigtest.trs" || rm -f tests/mantest.trs tests/jqtest.trs tests/shtest.trs tests/utf8test.trs tests/base64test.trs tests/uritest.trs tests/onigtest.trs tests/manonigtest.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 57 lines
Making clean in vendor/oniguruma make[1]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma' Making clean in src make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src' test -z "libonig.la" || rm -f libonig.la rm -f ./so_locations rm -rf .libs _libs rm -f *.o rm -f *.lo make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src' Making clean in test make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test' rm -f test_utf8.exe test_syntax.exe test_options.exe testc.exe testcu.exe test_regset.exe test_back.exe rm -f test_utf8 test_syntax test_options testc testcu test_regset test_back rm -rf .libs _libs rm -f *.o test -z "test_utf8.log test_syntax.log test_options.log testc.log testcu.log test_regset.log test_back.log" || rm -f test_utf8.log test_syntax.log test_options.log testc.log testcu.log test_regset.log test_back.log test -z "test_utf8.trs test_syntax.trs test_options.trs testc.trs testcu.trs test_regset.trs test_back.trs" || rm -f test_utf8.trs test_syntax.trs test_options.trs testc.trs testcu.trs test_regset.trs test_back.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test' Making clean in sample make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample' rm -f encode.exe listcap.exe names.exe simple.exe sql.exe syntax.exe user_property.exe callout.exe echo.exe count.exe bug_fix.exe regset.exe scan.exe callback_each_match.exe rm -f encode listcap names simple sql syntax user_property callout echo count bug_fix regset scan callback_each_match rm -rf .libs _libs rm -f *.o test -z "encode.log listcap.log names.log simple.log sql.log syntax.log user_property.log callout.log echo.log count.log bug_fix.log regset.log scan.log callback_each_match.log" || rm -f encode.log listcap.log names.log simple.log sql.log syntax.log user_property.log callout.log echo.log count.log bug_fix.log regset.log scan.log callback_each_match.log test -z "encode.trs listcap.trs names.trs simple.trs sql.trs syntax.trs user_property.trs callout.trs echo.trs count.trs bug_fix.trs regset.trs scan.trs callback_each_match.trs" || rm -f encode.trs listcap.trs names.trs simple.trs sql.trs syntax.trs user_property.trs callout.trs echo.trs count.trs bug_fix.trs regset.trs scan.trs callback_each_match.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample' make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma' rm -rf .libs _libs rm -f *.lo make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma' make[1]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma' make[1]: Entering directory '/home/peter/jq-1.8.1' rm -f jq.exe rm -f jq test -z "src/version.h .remake-version-h src/builtin.inc src/config_opts.inc jq.1" || rm -f src/version.h .remake-version-h src/builtin.inc src/config_opts.inc jq.1 test -z "libjq.la " || rm -f libjq.la rm -f ./so_locations rm -rf .libs _libs rm -rf src/.libs src/_libs rm -rf vendor/decNumber/.libs vendor/decNumber/_libs rm -f *.o rm -f src/*.o rm -f src/*.lo rm -f vendor/decNumber/*.o rm -f vendor/decNumber/*.lo test -z "tests/mantest.log tests/jqtest.log tests/shtest.log tests/utf8test.log tests/base64test.log tests/uritest.log tests/onigtest.log tests/manonigtest.log" || rm -f tests/mantest.log tests/jqtest.log tests/shtest.log tests/utf8test.log tests/base64test.log tests/uritest.log tests/onigtest.log tests/manonigtest.log test -z "tests/mantest.trs tests/jqtest.trs tests/shtest.trs tests/utf8test.trs tests/base64test.trs tests/uritest.trs tests/onigtest.trs tests/manonigtest.trs" || rm -f tests/mantest.trs tests/jqtest.trs tests/shtest.trs tests/utf8test.trs tests/base64test.trs tests/uritest.trs tests/onigtest.trs tests/manonigtest.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo make[1]: Leaving directory '/home/peter/jq-1.8.1'
Now I'll reconfigure with static linking flags:
compile-bench> cd /home/peter/jq-1.8.1 && ./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared --with-oniguruma=builtin LDFLAGS="-static -static-libgcc -static-libstdc++" CFLAGS="-static" checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to enable C11 features... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking the archiver (x86_64-w64-mingw32-ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-w64-mingw32-gcc... (cached) x86_64-w64-mingw32-gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether x86_64-w64-mingw32-gcc accepts -g... (cached) yes
checking for x86_64-w64-mingw32-gcc option to enable C11 features... (cached) none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... (cached) yes
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for bison... no
checking for byacc... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
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 x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld
checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm -B
checking the name lister (/usr/bin/x86_64-w64-mingw32-nm -B) interface... BSD n
[command output truncated]
_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking command to parse /usr/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-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 x86_64-w64-mingw32-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-gcc static flag -static works... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-gcc linker (/usr/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
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 sys/time.h... yes
checking for unistd.h... (cached) yes
checking for sys/times.h... no
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking size of void*... 8
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating sample/Makefile
config.status: creating onig-config
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
↓ 120 lines
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether x86_64-w64-mingw32-gcc accepts -g... yes checking for x86_64-w64-mingw32-gcc option to enable C11 features... none needed checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking dependency style of x86_64-w64-mingw32-gcc... gcc3 checking whether make supports nested variables... (cached) yes checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar checking the archiver (x86_64-w64-mingw32-ar) interface... ar checking whether to enable maintainer-specific portions of Makefiles... no checking for x86_64-w64-mingw32-gcc... (cached) x86_64-w64-mingw32-gcc checking whether the compiler supports GNU C... (cached) yes checking whether x86_64-w64-mingw32-gcc accepts -g... (cached) yes checking for x86_64-w64-mingw32-gcc option to enable C11 features... (cached) none needed checking whether x86_64-w64-mingw32-gcc understands -c and -o together... (cached) yes checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E checking for bison... no checking for byacc... no checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-w64-mingw32 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 x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm -B checking the name lister (/usr/bin/x86_64-w64-mingw32-nm -B) interface... BSD n [command output truncated] _64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool checking how to associate runtime and link libraries... func_cygming_dll_for_implib checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar checking for archiver @FILE support... @ checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib checking command to parse /usr/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-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 x86_64-w64-mingw32-mt... no checking for mt... no checking if : is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... no checking for objdir... .libs checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes checking if x86_64-w64-mingw32-gcc static flag -static works... yes checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes checking whether the x86_64-w64-mingw32-gcc linker (/usr/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe 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 sys/time.h... yes checking for unistd.h... (cached) yes checking for sys/times.h... no checking size of int... 4 checking size of long... 4 checking size of long long... 8 checking size of void*... 8 checking for size_t... yes checking for working alloca.h... no checking for alloca... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating test/Makefile config.status: creating sample/Makefile config.status: creating onig-config config.status: creating src/config.h config.status: src/config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands config.status: executing default commands
Now let me rebuild with the static flags:
compile-bench> cd /home/peter/jq-1.8.1 && make -j$(nproc) mkdir -p src
mkdir -p src
GEN src/builtin.inc
GEN src/config_opts.inc
mkdir -p src
GEN src/version.h
make all-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making all in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making all in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make all-am
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c -o regparse.lo regparse.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c -o regcomp.lo regcomp.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c -o regexec.lo regexec.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c -o regenc.lo regenc.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c -o regerror.lo regerror.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c -o regext.lo regext.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c -o regsyntax.lo regsyntax.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c -o regtrav.lo regtrav.c
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
[command output truncated]
undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
libtool: link: x86_64-w64-mingw32-ar cr .libs/libonig.a regparse.o regcomp.o regexec.o regenc.o regerror.o regext.o regsyntax.o regtrav.o regversion.o st.o reggnu.o unicode.o unicode_unfold_key.o unicode_fold1_key.o unicode_fold2_key.o unicode_fold3_key.o ascii.o utf8.o utf16_be.o utf16_le.o utf32_be.o utf32_le.o euc_jp.o euc_jp_prop.o sjis.o sjis_prop.o iso8859_1.o iso8859_2.o iso8859_3.o iso8859_4.o iso8859_5.o iso8859_6.o iso8859_7.o iso8859_8.o iso8859_9.o iso8859_10.o iso8859_11.o iso8859_13.o iso8859_14.o iso8859_15.o iso8859_16.o euc_tw.o euc_kr.o big5.o gb18030.o koi8_r.o cp1251.o onig_init.o
libtool: link: x86_64-w64-mingw32-ranlib .libs/libonig.a
libtool: link: ( cd ".libs" && rm -f "libonig.la" && ln -s "../libonig.la" "libonig.la" )
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
Making all in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making all in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
sed -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]datarootdir[@],/usr/local/share,g' -e 's,[@]PACKAGE_VERSION[@],6.9.10,g' -e 's,[@]prefix[@],/usr/local,g' -e 's,[@]exec_prefix[@],/usr/local,g' -e 's,[@]libdir[@],/usr/local/lib,g' -e 's,[@]includedir[@],/usr/local/include,g' < ./oniguruma.pc.in > oniguruma.pc
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Entering directory '/home/peter/jq-1.8.1'
CC src/builtin.lo
CC src/bytecode.lo
CC src/compile.lo
CC src/execute.lo
CC src/jq_test.lo
CC src/jv.lo
CC src/jv_alloc.lo
CC src/jv_aux.lo
CC src/jv_dtoa.lo
CC src/jv_file.lo
CC src/jv_parse.lo
CC src/jv_print.lo
CC src/jv_unicode.lo
CC src/linker.lo
CC src/locfile.lo
CC src/util.lo
CC src/jv_dtoa_tsd.lo
CC vendor/decNumber/decContext.lo
CC vendor/decNumber/decNumber.lo
CC src/lexer.lo
CC src/parser.lo
GEN jq.1
CC src/main.o
CCLD libjq.la
src/main.c:21:1: warning: function declaration isn't a prototype [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict-prototypes-Wstrict-prototypes]8;;]
21 | extern void jv_tsd_dtoa_ctx_init();
| ^~~~~~
CCLD jq.exe
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 81 lines
mkdir -p src
mkdir -p src
GEN src/builtin.inc
GEN src/config_opts.inc
mkdir -p src
GEN src/version.h
make all-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making all in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making all in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make all-am
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c -o regparse.lo regparse.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c -o regcomp.lo regcomp.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c -o regexec.lo regexec.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c -o regenc.lo regenc.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c -o regerror.lo regerror.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c -o regext.lo regext.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c -o regsyntax.lo regsyntax.c
/bin/bash ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -static -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c -o regtrav.lo regtrav.c
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
[command output truncated]
undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
libtool: link: x86_64-w64-mingw32-ar cr .libs/libonig.a regparse.o regcomp.o regexec.o regenc.o regerror.o regext.o regsyntax.o regtrav.o regversion.o st.o reggnu.o unicode.o unicode_unfold_key.o unicode_fold1_key.o unicode_fold2_key.o unicode_fold3_key.o ascii.o utf8.o utf16_be.o utf16_le.o utf32_be.o utf32_le.o euc_jp.o euc_jp_prop.o sjis.o sjis_prop.o iso8859_1.o iso8859_2.o iso8859_3.o iso8859_4.o iso8859_5.o iso8859_6.o iso8859_7.o iso8859_8.o iso8859_9.o iso8859_10.o iso8859_11.o iso8859_13.o iso8859_14.o iso8859_15.o iso8859_16.o euc_tw.o euc_kr.o big5.o gb18030.o koi8_r.o cp1251.o onig_init.o
libtool: link: x86_64-w64-mingw32-ranlib .libs/libonig.a
libtool: link: ( cd ".libs" && rm -f "libonig.la" && ln -s "../libonig.la" "libonig.la" )
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
Making all in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making all in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
sed -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]datarootdir[@],/usr/local/share,g' -e 's,[@]PACKAGE_VERSION[@],6.9.10,g' -e 's,[@]prefix[@],/usr/local,g' -e 's,[@]exec_prefix[@],/usr/local,g' -e 's,[@]libdir[@],/usr/local/lib,g' -e 's,[@]includedir[@],/usr/local/include,g' < ./oniguruma.pc.in > oniguruma.pc
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[2]: Entering directory '/home/peter/jq-1.8.1'
CC src/builtin.lo
CC src/bytecode.lo
CC src/compile.lo
CC src/execute.lo
CC src/jq_test.lo
CC src/jv.lo
CC src/jv_alloc.lo
CC src/jv_aux.lo
CC src/jv_dtoa.lo
CC src/jv_file.lo
CC src/jv_parse.lo
CC src/jv_print.lo
CC src/jv_unicode.lo
CC src/linker.lo
CC src/locfile.lo
CC src/util.lo
CC src/jv_dtoa_tsd.lo
CC vendor/decNumber/decContext.lo
CC vendor/decNumber/decNumber.lo
CC src/lexer.lo
CC src/parser.lo
GEN jq.1
CC src/main.o
CCLD libjq.la
src/main.c:21:1: warning: function declaration isn't a prototype [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict-prototypes-Wstrict-prototypes]8;;]
21 | extern void jv_tsd_dtoa_ctx_init();
| ^~~~~~
CCLD jq.exe
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
The build completed successfully, but I noticed we're still linking against Windows DLLs. Let me try a different approach by explicitly passing different linker flags. First, let me check what the current binary looks like and try a different configuration:
task failed: jq help does not contain expected string