| Cost | $0.313 |
| Total elapsed time | 1m57s |
| LLM inference time | 1m41s |
| Command execution time | 17s |
| Commands executed | 39 |
All details >
| Attempt ID | 9cu17hgje0phe | Attempt group | run-29-09-25-19-32 |
| Revision | 0cfc533b3f68 | AWS Instance | m8i.2xlarge |
| Start time | 2025-09-29T17:50:47.097Z | End time | 2025-09-29T17:52:44.885Z |
| Task | jq-static-musl | Environment | ubuntu-22.04-amd64 |
| Model | | OpenRouter slug | anthropic/claude-sonnet-4.5 |
| Temperature | 1 | Explicit prompt caching | true |
| User msg after tool call | false | Max tool calls | 100 |
| Total timeout seconds | 1200 | Single command timeout | 600 |
| Cost | $0.313 | Duration | 1m57s |
| LLM inference time | 1m41s | Command execution time | 17s |
| Final context tokens | 26,411 | Total output tokens | 4,757 |
| Output reasoning tokens | 0 | Messages | 72 |
| Assistant messages | 31 | User messages | 1 |
| System messages | 1 | Commands executed | 39 |
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 statically-linked jq to a specific location. The binary must use musl C library (not the standard glibc).
Difficulties:
musl toolchain setup, avoiding glibc-only assumptions.
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 /home/peter/jq.tar.gz. Please compile the jq package using musl as the C standard library and install it to /home/peter/result. Create a symlink from /home/peter/result/jq to the compiled jq binary. The binary must be statically linked and must use musl (not glibc).
I'll help you compile jq v1.8.1 with musl as the C standard library, statically linked, and install it to /home/peter/result. Let me break this down into steps:
1. First, let me check what we have and install necessary tools
2. Extract the source code
3. Install musl and build tools
4. Configure and compile jq with musl
5. Install to the specified directory
6. Create the symlink
7. Verify the binary
Let's start:
-rw-r--r-- 1 peter peter 2.0M Sep 29 17:50 /home/peter/jq.tar.gz
[empty output]
[empty output]
compile-bench> ls -la /home/peter/ total 2012
drwxr-x--- 1 peter peter 4096 Sep 29 17:50 .
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 29 17:50 jq.tar.gz
drwxr-xr-x 2 peter peter 4096 Sep 29 17:50 result
↓ 10 lines
total 2012 drwxr-x--- 1 peter peter 4096 Sep 29 17:50 . 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 29 17:50 jq.tar.gz drwxr-xr-x 2 peter peter 4096 Sep 29 17:50 result
Good! The source is extracted to jq-1.8.1. Now let's install musl and the necessary build tools:
compile-bench> sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
0% [Working]
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
0% [Connecting to archive.ubuntu.com (185.125.190.82)] [1 InRelease 14.2 kB/129
0% [Waiting for headers]
0% [Waiting for headers]
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
0% [Waiting for headers]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5609 kB]
0% [Waiting for headers] [3 Packages 6999 B/5609 kB 0%]
0% [Waiting for headers] [3 Packages 278 kB/5609 kB 5%]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
0% [4 InRelease 14.2 kB/128 kB 11%] [3 Packages 1204 kB/5609 kB 21%]
0% [4 InRelease 15.6 kB/128 kB 12%]
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers
Get:5 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1274 kB]
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [5 Packages 65.3 kB/
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers
Get:6 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [71.0 kB]
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [6 Packages 35.9 kB/
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3371 kB]
0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [7 Packages 30.2 kB/
0% [3 Packages store 0 B] [4 InRelease 24.3 kB/128 kB 19%]
0% [4 InRelease 72.1 kB/128 kB 56%]
0% [5 Packages store 0 B] [4 InRelease 72.1 kB/128 kB 56%]
0% [4 InRelease 95.3 kB/128 kB 74%]
0% [6 Packages store 0 B] [4 InRelease 95.3 kB/128 kB 74%]
0% [4 InRelease 98.2 kB/128 kB 77%]
0% [7 Packages store 0 B] [4 InRelease 98.2 kB/128 kB 77%]
0% [7 Packages store 0 B] [Waiting for headers]
0% [7 Packages store 0 B] [Waiting for headers]
0% [Waiting for headers]
Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
0% [8 InRelease 2588 B/127 kB 2%]
0% [Working]
56% [Waiting for headers]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1577 kB]
56% [9 Packages 2655 B/1577 kB 0%]
62% [Waiting for headers]
62% [9 Packages store 0 B] [Waiting for headers]
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5804 kB]
62% [9 Packages store 0 B] [10 Packages 12.8 kB/5804 kB 0%]
65% [10 Packages 711 kB/5804 kB 12%]
84% [Waiting for headers]
Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.1 kB]
84% [11 Packages 69.1 kB/69.1 kB 100%]
84% [Working]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3690 kB]
84% [10 Packages store 0 B] [12 Packages 17.2 kB/3690 kB 0%]
Get:13 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB]
98% [10 Packages store 0 B] [13 Packages 35.2 kB/35.2 kB 100%]
98% [10 Packages store 0 B]
98% [Working]
98% [11 Packages store 0 B]
99% [Working]
99% [12 Packages store 0 B]
99% [Working]
99% [13 Packages store 0 B]
100% [Working]
Fetched 21.9 MB in 2s (13.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... 80%
Reading package lists... 80%
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
↓ 16 lines
0% [Working] Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] 0% [Connecting to archive.ubuntu.com (185.125.190.82)] [1 InRelease 14.2 kB/129 0% [Waiting for headers] 0% [Waiting for headers] Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease 0% [Waiting for headers] Get:3 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5609 kB] 0% [Waiting for headers] [3 Packages 6999 B/5609 kB 0%] 0% [Waiting for headers] [3 Packages 278 kB/5609 kB 5%] Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] 0% [4 InRelease 14.2 kB/128 kB 11%] [3 Packages 1204 kB/5609 kB 21%] 0% [4 InRelease 15.6 kB/128 kB 12%] 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers Get:5 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1274 kB] 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [5 Packages 65.3 kB/ 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers Get:6 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [71.0 kB] 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [6 Packages 35.9 kB/ 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [Waiting for headers Get:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3371 kB] 0% [3 Packages store 0 B] [4 InRelease 15.6 kB/128 kB 12%] [7 Packages 30.2 kB/ 0% [3 Packages store 0 B] [4 InRelease 24.3 kB/128 kB 19%] 0% [4 InRelease 72.1 kB/128 kB 56%] 0% [5 Packages store 0 B] [4 InRelease 72.1 kB/128 kB 56%] 0% [4 InRelease 95.3 kB/128 kB 74%] 0% [6 Packages store 0 B] [4 InRelease 95.3 kB/128 kB 74%] 0% [4 InRelease 98.2 kB/128 kB 77%] 0% [7 Packages store 0 B] [4 InRelease 98.2 kB/128 kB 77%] 0% [7 Packages store 0 B] [Waiting for headers] 0% [7 Packages store 0 B] [Waiting for headers] 0% [Waiting for headers] Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] 0% [8 InRelease 2588 B/127 kB 2%] 0% [Working] 56% [Waiting for headers] Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1577 kB] 56% [9 Packages 2655 B/1577 kB 0%] 62% [Waiting for headers] 62% [9 Packages store 0 B] [Waiting for headers] Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5804 kB] 62% [9 Packages store 0 B] [10 Packages 12.8 kB/5804 kB 0%] 65% [10 Packages 711 kB/5804 kB 12%] 84% [Waiting for headers] Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.1 kB] 84% [11 Packages 69.1 kB/69.1 kB 100%] 84% [Working] Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3690 kB] 84% [10 Packages store 0 B] [12 Packages 17.2 kB/3690 kB 0%] Get:13 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB] 98% [10 Packages store 0 B] [13 Packages 35.2 kB/35.2 kB 100%] 98% [10 Packages store 0 B] 98% [Working] 98% [11 Packages store 0 B] 99% [Working] 99% [12 Packages store 0 B] 99% [Working] 99% [13 Packages store 0 B] 100% [Working] Fetched 21.9 MB in 2s (13.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... 80% Reading package lists... 80% 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
compile-bench> sudo DEBIAN_FRONTEND=noninteractive apt-get install -y musl-tools musl-dev build-essential autoconf automake libtool
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... 80%
Reading package lists... 80%
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... 85%
Building dependency tree... Done
Reading state information... 0%
Reading state information... 1%
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
The following additional packages will be installed:
autotools-dev libltdl-dev libltdl7 libsigsegv2 m4 musl
Suggested packages:
autoconf-archive gnu-standards autoconf-doc gettext libtool-doc gfortran
| fortran95-compiler gcj-jdk m4-doc
Recommended packages:
linux-musl-dev
The following NEW packages will be installed:
autoconf automake autotools-dev libltdl-dev libltdl7 libsigsegv2 libtool m4
musl musl-dev musl-tools
0 upgraded, 11 newly installed, 0 to remove and 10 not upgraded.
Need to get 2545 kB of archives.
After this operation, 11.0 MB of additional disk space will be used.
0% [Working]
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libsigsegv2 amd64 2.13-1ubuntu3 [14.6 kB]
0% [1 libsigsegv2 14.2 kB/14.6 kB 97%]
2% [Waiting for headers]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 m4 amd64 1.4.18-5ubuntu2 [199 kB]
2% [2 m4 2604 B/199 kB 1%]
Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 autoconf all 2.71-2 [338 kB]
10% [3 autoconf 1852 B/338 kB 1%]
23% [Waiting for headers]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 autotools-dev all 20220109.1 [44.9 kB]
23% [4 autotools-dev 854 B/44.9 kB 2%]
26% [Waiting for headers]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 automake all 1:1.16.5-1.3 [558 kB]
26% [5 automake 2012 B/558 kB 0%]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64
[command output truncated]
ase ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 10711 files and directories currently installed.)
Preparing to unpack .../00-libsigsegv2_2.13-1ubuntu3_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.13-1ubuntu3) ...
Selecting previously unselected package m4.
Preparing to unpack .../01-m4_1.4.18-5ubuntu2_amd64.deb ...
Unpacking m4 (1.4.18-5ubuntu2) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../02-autoconf_2.71-2_all.deb ...
Unpacking autoconf (2.71-2) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../03-autotools-dev_20220109.1_all.deb ...
Unpacking autotools-dev (20220109.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../04-automake_1%3a1.16.5-1.3_all.deb ...
Unpacking automake (1:1.16.5-1.3) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../05-libltdl7_2.4.6-15build2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../06-libltdl-dev_2.4.6-15build2_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libtool.
Preparing to unpack .../07-libtool_2.4.6-15build2_all.deb ...
Unpacking libtool (2.4.6-15build2) ...
Selecting previously unselected package musl:amd64.
Preparing to unpack .../08-musl_1.2.2-4_amd64.deb ...
Unpacking musl:amd64 (1.2.2-4) ...
Selecting previously unselected package musl-dev:amd64.
Preparing to unpack .../09-musl-dev_1.2.2-4_amd64.deb ...
Unpacking musl-dev:amd64 (1.2.2-4) ...
Selecting previously unselected package musl-tools.
Preparing to unpack .../10-musl-tools_1.2.2-4_amd64.deb ...
Unpacking musl-tools (1.2.2-4) ...
Setting up autotools-dev (20220109.1) ...
Setting up libsigsegv2:amd64 (2.13-1ubuntu3) ...
Setting up libltdl7:amd64 (2.4.6-15build2) ...
Setting up musl:amd64 (1.2.2-4) ...
Setting up libtool (2.4.6-15build2) ...
Setting up m4 (1.4.18-5ubuntu2) ...
Setting up musl-dev:amd64 (1.2.2-4) ...
Setting up autoconf (2.71-2) ...
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 libltdl-dev:amd64 (2.4.6-15build2) ...
Setting up musl-tools (1.2.2-4) ...
Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
↓ 73 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... 80% Reading package lists... 80% 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... 85% Building dependency tree... Done Reading state information... 0% Reading state information... 1% Reading state information... Done build-essential is already the newest version (12.9ubuntu3). The following additional packages will be installed: autotools-dev libltdl-dev libltdl7 libsigsegv2 m4 musl Suggested packages: autoconf-archive gnu-standards autoconf-doc gettext libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc Recommended packages: linux-musl-dev The following NEW packages will be installed: autoconf automake autotools-dev libltdl-dev libltdl7 libsigsegv2 libtool m4 musl musl-dev musl-tools 0 upgraded, 11 newly installed, 0 to remove and 10 not upgraded. Need to get 2545 kB of archives. After this operation, 11.0 MB of additional disk space will be used. 0% [Working] Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libsigsegv2 amd64 2.13-1ubuntu3 [14.6 kB] 0% [1 libsigsegv2 14.2 kB/14.6 kB 97%] 2% [Waiting for headers] Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 m4 amd64 1.4.18-5ubuntu2 [199 kB] 2% [2 m4 2604 B/199 kB 1%] Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 autoconf all 2.71-2 [338 kB] 10% [3 autoconf 1852 B/338 kB 1%] 23% [Waiting for headers] Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 autotools-dev all 20220109.1 [44.9 kB] 23% [4 autotools-dev 854 B/44.9 kB 2%] 26% [Waiting for headers] Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 automake all 1:1.16.5-1.3 [558 kB] 26% [5 automake 2012 B/558 kB 0%] Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64 [command output truncated] ase ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 10711 files and directories currently installed.) Preparing to unpack .../00-libsigsegv2_2.13-1ubuntu3_amd64.deb ... Unpacking libsigsegv2:amd64 (2.13-1ubuntu3) ... Selecting previously unselected package m4. Preparing to unpack .../01-m4_1.4.18-5ubuntu2_amd64.deb ... Unpacking m4 (1.4.18-5ubuntu2) ... Selecting previously unselected package autoconf. Preparing to unpack .../02-autoconf_2.71-2_all.deb ... Unpacking autoconf (2.71-2) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../03-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../04-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package libltdl7:amd64. Preparing to unpack .../05-libltdl7_2.4.6-15build2_amd64.deb ... Unpacking libltdl7:amd64 (2.4.6-15build2) ... Selecting previously unselected package libltdl-dev:amd64. Preparing to unpack .../06-libltdl-dev_2.4.6-15build2_amd64.deb ... Unpacking libltdl-dev:amd64 (2.4.6-15build2) ... Selecting previously unselected package libtool. Preparing to unpack .../07-libtool_2.4.6-15build2_all.deb ... Unpacking libtool (2.4.6-15build2) ... Selecting previously unselected package musl:amd64. Preparing to unpack .../08-musl_1.2.2-4_amd64.deb ... Unpacking musl:amd64 (1.2.2-4) ... Selecting previously unselected package musl-dev:amd64. Preparing to unpack .../09-musl-dev_1.2.2-4_amd64.deb ... Unpacking musl-dev:amd64 (1.2.2-4) ... Selecting previously unselected package musl-tools. Preparing to unpack .../10-musl-tools_1.2.2-4_amd64.deb ... Unpacking musl-tools (1.2.2-4) ... Setting up autotools-dev (20220109.1) ... Setting up libsigsegv2:amd64 (2.13-1ubuntu3) ... Setting up libltdl7:amd64 (2.4.6-15build2) ... Setting up musl:amd64 (1.2.2-4) ... Setting up libtool (2.4.6-15build2) ... Setting up m4 (1.4.18-5ubuntu2) ... Setting up musl-dev:amd64 (1.2.2-4) ... Setting up autoconf (2.71-2) ... 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 libltdl-dev:amd64 (2.4.6-15build2) ... Setting up musl-tools (1.2.2-4) ... Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
Great! Now let's check the jq source and see what we need to build it. Let's also check if we need any additional dependencies:
compile-bench> cd /home/peter/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 29 17:50 ..
-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 29 17:50 .. -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
Good, there's already a configure script. Let's check if there's a README to see what dependencies we need:
compile-bench> cd /home/peter/jq-1.8.1 && cat README.md # jq
`jq` is a lightweight and flexible command-line JSON processor akin to `sed`,`awk`,`grep`, and friends for JSON data. It's written in portable C and has zero runtime dependencies, allowing you to easily slice, filter, map, and transform structured data.
## Documentation
- **Official Documentation**: [jqlang.org](https://jqlang.org)
- **Try jq Online**: [play.jqlang.org](https://play.jqlang.org)
## Installation
### Prebuilt Binaries
Download the latest releases from the [GitHub release page](https://github.com/jqlang/jq/releases).
### Docker Image
Pull the [jq image](https://github.com/jqlang/jq/pkgs/container/jq) to start quickly with Docker.
#### Run with Docker
##### Example: Extracting the version from a `package.json` file
```bash
docker run --rm -i ghcr.io/jqlang/jq:latest < package.json '.version'
```
##### Example: Extracting the version from a `package.json` file with a mounted volume
```bash
docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json
```
### Building from source
#### Dependencies
- libtool
- make
- automake
- autoconf
#### Instructions
```console
git submodule update --init # if building from git to get oniguruma
autoreconf -i # if building from git
./configure --with-oniguruma=builtin
make clean # if upgrading from a version previously built from source
make -j8
make check
sudo make install
```
Build a statically linked version:
```console
make LDFLAGS=-all-static
```
If you're not using the latest git version but instead building a released tarball (available on the release page), skip the `autoreconf` step, and flex or bison won't be needed.
##### Cross-Compilation
For details on cross-compilation, check out the [GitHub Actions file](.github/workflows/ci.yml) and the [cross-compilation wiki page](https://github.com/jqlang/jq/wiki/Cross-compilation).
## Community & Support
- Questions & Help: [Stack Overflow (jq tag)](https://stackoverflow.com/questions/tagged/jq)
- Chat & Community: [Join us on Discord](https://discord.gg/yg6yjNmgAC)
- Wiki & Advanced Topics: [Explore the Wiki](https://github.com/jqlang/jq/wiki)
## License
`jq` is released under the [MIT License](COPYING). `jq`'s documentation is
licensed under the [Creative Commons CC BY 3.0](COPYING).
`jq` uses parts of the open source C library "decNumber", which is distributed
under [ICU License](COPYING)
↓ 79 lines
# jq `jq` is a lightweight and flexible command-line JSON processor akin to `sed`,`awk`,`grep`, and friends for JSON data. It's written in portable C and has zero runtime dependencies, allowing you to easily slice, filter, map, and transform structured data. ## Documentation - **Official Documentation**: [jqlang.org](https://jqlang.org) - **Try jq Online**: [play.jqlang.org](https://play.jqlang.org) ## Installation ### Prebuilt Binaries Download the latest releases from the [GitHub release page](https://github.com/jqlang/jq/releases). ### Docker Image Pull the [jq image](https://github.com/jqlang/jq/pkgs/container/jq) to start quickly with Docker. #### Run with Docker ##### Example: Extracting the version from a `package.json` file ```bash docker run --rm -i ghcr.io/jqlang/jq:latest < package.json '.version' ``` ##### Example: Extracting the version from a `package.json` file with a mounted volume ```bash docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json ``` ### Building from source #### Dependencies - libtool - make - automake - autoconf #### Instructions ```console git submodule update --init # if building from git to get oniguruma autoreconf -i # if building from git ./configure --with-oniguruma=builtin make clean # if upgrading from a version previously built from source make -j8 make check sudo make install ``` Build a statically linked version: ```console make LDFLAGS=-all-static ``` If you're not using the latest git version but instead building a released tarball (available on the release page), skip the `autoreconf` step, and flex or bison won't be needed. ##### Cross-Compilation For details on cross-compilation, check out the [GitHub Actions file](.github/workflows/ci.yml) and the [cross-compilation wiki page](https://github.com/jqlang/jq/wiki/Cross-compilation). ## Community & Support - Questions & Help: [Stack Overflow (jq tag)](https://stackoverflow.com/questions/tagged/jq) - Chat & Community: [Join us on Discord](https://discord.gg/yg6yjNmgAC) - Wiki & Advanced Topics: [Explore the Wiki](https://github.com/jqlang/jq/wiki) ## License `jq` is released under the [MIT License](COPYING). `jq`'s documentation is licensed under the [Creative Commons CC BY 3.0](COPYING). `jq` uses parts of the open source C library "decNumber", which is distributed under [ICU License](COPYING)
Perfect! Now let's configure and build jq with musl. We need to use the musl-gcc compiler wrapper and build it statically. Let me check the available musl compiler:
/usr/bin/musl-gcc
Good! Now let's configure and compile jq with musl. We'll use CC=musl-gcc and add the static linking flags:
compile-bench> cd /home/peter/jq-1.8.1 && CC=musl-gcc CFLAGS="-static" LDFLAGS="-static" ./configure --prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin checking for gcc... musl-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 the compiler supports GNU C... yes
checking whether musl-gcc accepts -g... yes
checking for musl-gcc option to enable C11 features... none needed
checking whether musl-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 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 musl-gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) musl-gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether musl-gcc accepts -g... (cached) yes
checking for musl-gcc option to enable C11 features... (cached) none needed
checking whether musl-gcc understands -c and -o together... (cached) yes
checking how to run the C preprocessor... musl-gcc -E
checking for bison... no
checking for byacc... no
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
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 musl-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-musl file names to x86_64-pc-linux-musl format... func_convert_file_noop
checking how to convert x86_64-pc-linux-musl file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking
[command output truncated]
cking 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 file... file
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 musl-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... 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... yes
checking for objdir... .libs
checking if musl-gcc supports -fno-rtti -fno-exceptions... no
checking for musl-gcc option to produce PIC... -fPIC -DPIC
checking if musl-gcc PIC flag -fPIC -DPIC works... yes
checking if musl-gcc static flag -static works... yes
checking if musl-gcc supports -c -o file.o... yes
checking if musl-gcc supports -c -o file.o... (cached) yes
checking whether the musl-gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
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... yes
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... yes
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of void*... 8
checking for size_t... yes
checking for working alloca.h... yes
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
↓ 130 lines
checking for gcc... musl-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 the compiler supports GNU C... yes checking whether musl-gcc accepts -g... yes checking for musl-gcc option to enable C11 features... none needed checking whether musl-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 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 musl-gcc... gcc3 checking whether make supports nested variables... (cached) yes checking for ar... ar checking the archiver (ar) interface... ar checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... (cached) musl-gcc checking whether the compiler supports GNU C... (cached) yes checking whether musl-gcc accepts -g... (cached) yes checking for musl-gcc option to enable C11 features... (cached) none needed checking whether musl-gcc understands -c and -o together... (cached) yes checking how to run the C preprocessor... musl-gcc -E checking for bison... no checking for byacc... no checking build system type... x86_64-pc-linux-musl checking host system type... x86_64-pc-linux-musl 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 musl-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-musl file names to x86_64-pc-linux-musl format... func_convert_file_noop checking how to convert x86_64-pc-linux-musl file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking [command output truncated] cking 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 file... file 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 musl-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... 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... yes checking for objdir... .libs checking if musl-gcc supports -fno-rtti -fno-exceptions... no checking for musl-gcc option to produce PIC... -fPIC -DPIC checking if musl-gcc PIC flag -fPIC -DPIC works... yes checking if musl-gcc static flag -static works... yes checking if musl-gcc supports -c -o file.o... yes checking if musl-gcc supports -c -o file.o... (cached) yes checking whether the musl-gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no 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... yes 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... yes checking size of int... 4 checking size of long... 8 checking size of long long... 8 checking size of void*... 8 checking for size_t... yes checking for working alloca.h... yes 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 succeeded. Now let's build jq:
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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
mv -f .deps/regext.Tpo .deps/regext.Plo
mv -f .deps/regsyntax.Tpo .dep
[command output truncated]
sjis.lo sjis_prop.lo iso8859_1.lo iso8859_2.lo iso8859_3.lo iso8859_4.lo iso8859_5.lo iso8859_6.lo iso8859_7.lo iso8859_8.lo iso8859_9.lo iso8859_10.lo iso8859_11.lo iso8859_13.lo iso8859_14.lo iso8859_15.lo iso8859_16.lo euc_tw.lo euc_kr.lo big5.lo gb18030.lo koi8_r.lo cp1251.lo onig_init.lo
libtool: link: 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: 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
mkdir -p src
CC src/parser.lo
GEN src/version.h
CC src/main.o
CCLD libjq.la
CCLD jq
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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o mv -f .deps/regext.Tpo .deps/regext.Plo mv -f .deps/regsyntax.Tpo .dep [command output truncated] sjis.lo sjis_prop.lo iso8859_1.lo iso8859_2.lo iso8859_3.lo iso8859_4.lo iso8859_5.lo iso8859_6.lo iso8859_7.lo iso8859_8.lo iso8859_9.lo iso8859_10.lo iso8859_11.lo iso8859_13.lo iso8859_14.lo iso8859_15.lo iso8859_16.lo euc_tw.lo euc_kr.lo big5.lo gb18030.lo koi8_r.lo cp1251.lo onig_init.lo libtool: link: 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: 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 mkdir -p src CC src/parser.lo GEN src/version.h CC src/main.o CCLD libjq.la CCLD jq make[2]: Leaving directory '/home/peter/jq-1.8.1' make[1]: Leaving directory '/home/peter/jq-1.8.1'
Excellent! The build completed successfully. Now let's install it to the /home/peter/result directory:
compile-bench> cd /home/peter/jq-1.8.1 && make install mkdir -p src
GEN src/version.h
make install-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making install in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making install in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libonig.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libonig.lai /home/peter/result/lib/libonig.la
libtool: install: /usr/bin/install -c .libs/libonig.a /home/peter/result/lib/libonig.a
libtool: install: chmod 644 /home/peter/result/lib/libonig.a
libtool: install: ranlib /home/peter/result/lib/libonig.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 oniguruma.h oniggnu.h '/home/peter/result/include'
make install-data-hook
make[5]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[5]: Nothing to be done for 'install-data-hook'.
make[5]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
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 install in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making install in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Not
[command output truncated]
p '/home/peter/result/bin'
/usr/bin/install -c onig-config '/home/peter/result/bin'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 oniguruma.pc '/home/peter/result/lib/pkgconfig'
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
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'
mkdir -p src
GEN src/version.h
CC src/main.o
CCLD jq
make[3]: Entering directory '/home/peter/jq-1.8.1'
mkdir -p src
GEN src/version.h
CC src/main.o
CCLD jq
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libjq.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libjq.lai /home/peter/result/lib/libjq.la
libtool: install: /usr/bin/install -c .libs/libjq.a /home/peter/result/lib/libjq.a
libtool: install: chmod 644 /home/peter/result/lib/libjq.a
libtool: install: ranlib /home/peter/result/lib/libjq.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c jq '/home/peter/result/bin'
libtool: install: /usr/bin/install -c jq /home/peter/result/bin/jq
/usr/bin/mkdir -p '/home/peter/result/share/doc/jq'
/usr/bin/install -c -m 644 README.md NEWS.md COPYING AUTHORS '/home/peter/result/share/doc/jq'
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 src/jv.h src/jq.h '/home/peter/result/include'
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 jq.1 '/home/peter/result/share/man/man1'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 libjq.pc '/home/peter/result/lib/pkgconfig'
make[3]: Leaving directory '/home/peter/jq-1.8.1'
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 112 lines
mkdir -p src
GEN src/version.h
make install-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making install in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making install in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libonig.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libonig.lai /home/peter/result/lib/libonig.la
libtool: install: /usr/bin/install -c .libs/libonig.a /home/peter/result/lib/libonig.a
libtool: install: chmod 644 /home/peter/result/lib/libonig.a
libtool: install: ranlib /home/peter/result/lib/libonig.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 oniguruma.h oniggnu.h '/home/peter/result/include'
make install-data-hook
make[5]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[5]: Nothing to be done for 'install-data-hook'.
make[5]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
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 install in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making install in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Not
[command output truncated]
p '/home/peter/result/bin'
/usr/bin/install -c onig-config '/home/peter/result/bin'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 oniguruma.pc '/home/peter/result/lib/pkgconfig'
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
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'
mkdir -p src
GEN src/version.h
CC src/main.o
CCLD jq
make[3]: Entering directory '/home/peter/jq-1.8.1'
mkdir -p src
GEN src/version.h
CC src/main.o
CCLD jq
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libjq.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libjq.lai /home/peter/result/lib/libjq.la
libtool: install: /usr/bin/install -c .libs/libjq.a /home/peter/result/lib/libjq.a
libtool: install: chmod 644 /home/peter/result/lib/libjq.a
libtool: install: ranlib /home/peter/result/lib/libjq.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c jq '/home/peter/result/bin'
libtool: install: /usr/bin/install -c jq /home/peter/result/bin/jq
/usr/bin/mkdir -p '/home/peter/result/share/doc/jq'
/usr/bin/install -c -m 644 README.md NEWS.md COPYING AUTHORS '/home/peter/result/share/doc/jq'
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 src/jv.h src/jq.h '/home/peter/result/include'
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 jq.1 '/home/peter/result/share/man/man1'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 libjq.pc '/home/peter/result/lib/pkgconfig'
make[3]: Leaving directory '/home/peter/jq-1.8.1'
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
Great! The installation is complete. Now let's create the symlink from /home/peter/result/jq to the compiled jq binary:
[empty output]
Perfect! Now let's verify that the binary is statically linked and uses musl (not glibc):
/home/peter/result/bin/jq: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, with debug_info, not stripped
/home/peter/result/bin/jq: error while loading shared libraries: /lib/x86_64-linux-gnu/libc.so: invalid ELF header
I see the issue. The binary was built but it's dynamically linked, not statically linked. The CFLAGS and LDFLAGS I set weren't sufficient. Let me rebuild it properly with full static linking. I need to use the -all-static flag with libtool:
compile-bench> cd /home/peter/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 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 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
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/optionaltest.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/optionaltest.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/optionaltest.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/optionaltest.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'
↓ 54 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 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 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 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/optionaltest.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/optionaltest.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/optionaltest.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/optionaltest.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 let's rebuild with proper static linking flags:
compile-bench> cd /home/peter/jq-1.8.1 && make LDFLAGS=-all-static -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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o
libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o
mv -f .deps/regext.Tpo .deps/regext.Plo
mv -f .deps/regsyntax.Tpo .dep
[command output truncated]
nig.la -rpath /home/peter/result/lib regparse.lo regcomp.lo regexec.lo regenc.lo regerror.lo regext.lo regsyntax.lo regtrav.lo regversion.lo st.lo reggnu.lo unicode.lo unicode_unfold_key.lo unicode_fold1_key.lo unicode_fold2_key.lo unicode_fold3_key.lo ascii.lo utf8.lo utf16_be.lo utf16_le.lo utf32_be.lo utf32_le.lo euc_jp.lo euc_jp_prop.lo sjis.lo sjis_prop.lo iso8859_1.lo iso8859_2.lo iso8859_3.lo iso8859_4.lo iso8859_5.lo iso8859_6.lo iso8859_7.lo iso8859_8.lo iso8859_9.lo iso8859_10.lo iso8859_11.lo iso8859_13.lo iso8859_14.lo iso8859_15.lo iso8859_16.lo euc_tw.lo euc_kr.lo big5.lo gb18030.lo koi8_r.lo cp1251.lo onig_init.lo
libtool: link: 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: 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'
make[3]: Nothing to be done for 'all-am'.
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
CCLD jq
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 80 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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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 musl-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: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regerror.lo -MD -MP -MF .deps/regerror.Tpo -c regerror.c -o regerror.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regcomp.lo -MD -MP -MF .deps/regcomp.Tpo -c regcomp.c -o regcomp.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regparse.lo -MD -MP -MF .deps/regparse.Tpo -c regparse.c -o regparse.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regenc.lo -MD -MP -MF .deps/regenc.Tpo -c regenc.c -o regenc.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regexec.lo -MD -MP -MF .deps/regexec.Tpo -c regexec.c -o regexec.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regsyntax.lo -MD -MP -MF .deps/regsyntax.Tpo -c regsyntax.c -o regsyntax.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regext.lo -MD -MP -MF .deps/regext.Tpo -c regext.c -o regext.o libtool: compile: musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -MT regtrav.lo -MD -MP -MF .deps/regtrav.Tpo -c regtrav.c -o regtrav.o mv -f .deps/regext.Tpo .deps/regext.Plo mv -f .deps/regsyntax.Tpo .dep [command output truncated] nig.la -rpath /home/peter/result/lib regparse.lo regcomp.lo regexec.lo regenc.lo regerror.lo regext.lo regsyntax.lo regtrav.lo regversion.lo st.lo reggnu.lo unicode.lo unicode_unfold_key.lo unicode_fold1_key.lo unicode_fold2_key.lo unicode_fold3_key.lo ascii.lo utf8.lo utf16_be.lo utf16_le.lo utf32_be.lo utf32_le.lo euc_jp.lo euc_jp_prop.lo sjis.lo sjis_prop.lo iso8859_1.lo iso8859_2.lo iso8859_3.lo iso8859_4.lo iso8859_5.lo iso8859_6.lo iso8859_7.lo iso8859_8.lo iso8859_9.lo iso8859_10.lo iso8859_11.lo iso8859_13.lo iso8859_14.lo iso8859_15.lo iso8859_16.lo euc_tw.lo euc_kr.lo big5.lo gb18030.lo koi8_r.lo cp1251.lo onig_init.lo libtool: link: 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: 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' make[3]: Nothing to be done for 'all-am'. 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 CCLD jq make[2]: Leaving directory '/home/peter/jq-1.8.1' make[1]: Leaving directory '/home/peter/jq-1.8.1'
Good! Now let's install again and check if it's properly statically linked:
compile-bench> cd /home/peter/jq-1.8.1 && make install make install-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making install in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making install in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libonig.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libonig.lai /home/peter/result/lib/libonig.la
libtool: install: /usr/bin/install -c .libs/libonig.a /home/peter/result/lib/libonig.a
libtool: install: chmod 644 /home/peter/result/lib/libonig.a
libtool: install: ranlib /home/peter/result/lib/libonig.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 oniguruma.h oniggnu.h '/home/peter/result/include'
make install-data-hook
make[5]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[5]: Nothing to be done for 'install-data-hook'.
make[5]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
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 install in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making install in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
[command output truncated]
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
/usr/bin/mkdir -p '/home/peter/result/bin'
/usr/bin/install -c onig-config '/home/peter/result/bin'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 oniguruma.pc '/home/peter/result/lib/pkgconfig'
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
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'
make[3]: Entering directory '/home/peter/jq-1.8.1'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libjq.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libjq.lai /home/peter/result/lib/libjq.la
libtool: install: /usr/bin/install -c .libs/libjq.a /home/peter/result/lib/libjq.a
libtool: install: chmod 644 /home/peter/result/lib/libjq.a
libtool: install: ranlib /home/peter/result/lib/libjq.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c jq '/home/peter/result/bin'
libtool: install: /usr/bin/install -c jq /home/peter/result/bin/jq
/usr/bin/mkdir -p '/home/peter/result/share/doc/jq'
/usr/bin/install -c -m 644 README.md NEWS.md COPYING AUTHORS '/home/peter/result/share/doc/jq'
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 src/jv.h src/jq.h '/home/peter/result/include'
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 jq.1 '/home/peter/result/share/man/man1'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 libjq.pc '/home/peter/result/lib/pkgconfig'
make[3]: Leaving directory '/home/peter/jq-1.8.1'
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
↓ 106 lines
make install-recursive
make[1]: Entering directory '/home/peter/jq-1.8.1'
Making install in vendor/oniguruma
make[2]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
Making install in src
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libonig.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libonig.lai /home/peter/result/lib/libonig.la
libtool: install: /usr/bin/install -c .libs/libonig.a /home/peter/result/lib/libonig.a
libtool: install: chmod 644 /home/peter/result/lib/libonig.a
libtool: install: ranlib /home/peter/result/lib/libonig.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 oniguruma.h oniggnu.h '/home/peter/result/include'
make install-data-hook
make[5]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
make[5]: Nothing to be done for 'install-data-hook'.
make[5]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/src'
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 install in test
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
make[3]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma/test'
Making install in sample
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma/sample'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
[command output truncated]
make[3]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
make[4]: Entering directory '/home/peter/jq-1.8.1/vendor/oniguruma'
/usr/bin/mkdir -p '/home/peter/result/bin'
/usr/bin/install -c onig-config '/home/peter/result/bin'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 oniguruma.pc '/home/peter/result/lib/pkgconfig'
make[4]: Leaving directory '/home/peter/jq-1.8.1/vendor/oniguruma'
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'
make[3]: Entering directory '/home/peter/jq-1.8.1'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libjq.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libjq.lai /home/peter/result/lib/libjq.la
libtool: install: /usr/bin/install -c .libs/libjq.a /home/peter/result/lib/libjq.a
libtool: install: chmod 644 /home/peter/result/lib/libjq.a
libtool: install: ranlib /home/peter/result/lib/libjq.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/home/peter/result/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c jq '/home/peter/result/bin'
libtool: install: /usr/bin/install -c jq /home/peter/result/bin/jq
/usr/bin/mkdir -p '/home/peter/result/share/doc/jq'
/usr/bin/install -c -m 644 README.md NEWS.md COPYING AUTHORS '/home/peter/result/share/doc/jq'
/usr/bin/mkdir -p '/home/peter/result/include'
/usr/bin/install -c -m 644 src/jv.h src/jq.h '/home/peter/result/include'
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 jq.1 '/home/peter/result/share/man/man1'
/usr/bin/mkdir -p '/home/peter/result/lib/pkgconfig'
/usr/bin/install -c -m 644 libjq.pc '/home/peter/result/lib/pkgconfig'
make[3]: Leaving directory '/home/peter/jq-1.8.1'
make[2]: Leaving directory '/home/peter/jq-1.8.1'
make[1]: Leaving directory '/home/peter/jq-1.8.1'
Now let's verify the binary again:
/home/peter/result/bin/jq: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped
not a dynamic executable
Excellent! The binary is now statically linked. Now let's verify it uses musl and not glibc by checking the strings in the binary:
compile-bench> strings /home/peter/result/bin/jq | grep -i musl | head -5 --prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static
MUSL_LOCPATH
/build/musl-kKuXgX/musl-1.2.2
↓ 4 lines
--prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static MUSL_LOCPATH /build/musl-kKuXgX/musl-1.2.2
[empty output]
Perfect! The binary contains musl references and no glibc references. Let's also test that the binary works correctly:
jq-1.8.1
Great! Let's test the symlink:
lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 /home/peter/result/jq -> /home/peter/result/bin/jq
jq-1.8.1
Perfect! Let's do a quick functional test to ensure jq works correctly:
"test"
Excellent! Now let's do a final comprehensive verification:
compile-bench> ls -lh /home/peter/result/ total 16K
drwxr-xr-x 2 peter peter 4.0K Sep 29 17:51 bin
drwxr-xr-x 2 peter peter 4.0K Sep 29 17:51 include
lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 jq -> /home/peter/result/bin/jq
drwxr-xr-x 3 peter peter 4.0K Sep 29 17:51 lib
drwxr-xr-x 4 peter peter 4.0K Sep 29 17:51 share
↓ 7 lines
total 16K drwxr-xr-x 2 peter peter 4.0K Sep 29 17:51 bin drwxr-xr-x 2 peter peter 4.0K Sep 29 17:51 include lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 jq -> /home/peter/result/bin/jq drwxr-xr-x 3 peter peter 4.0K Sep 29 17:51 lib drwxr-xr-x 4 peter peter 4.0K Sep 29 17:51 share
compile-bench> readelf -h /home/peter/result/bin/jq | grep -E "Type|Machine" Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
↓ 3 lines
Type: EXEC (Executable file) Machine: Advanced Micro Devices X86-64
0000000000491990 T __libc_start_main
Good! The presence of __libc_start_main is from musl's libc implementation (not glibc). Let's verify one more time that it's using musl by checking for musl-specific symbols:
00000000004916e0 T __init_libc
The __init_libc symbol is a musl-specific symbol. Let's do one final check to confirm it's statically linked to musl and not glibc:
[empty output]
Perfect! No NEEDED libraries means it's fully statically linked. Let me create a summary verification:
compile-bench> echo "=== VERIFICATION SUMMARY ===" && echo && echo "1. Binary location and symlink:" && ls -lh /home/peter/result/jq && echo && echo "2. File type:" && file /home/peter/result/bin/jq && echo && echo "3. Dynamic linking check:" && ldd /home/peter/result/bin/jq 2>&1 && echo && echo "4. musl evidence:" && strings /home/peter/result/bin/jq | grep -i musl | head -2 && echo && echo "5. glibc check:" && (strings /home/peter/result/bin/jq | grep -i "glibc" || echo "No glibc references found") && echo && echo "6. Functional test:" && echo '{"test":true}' | /home/peter/result/jq '.' === VERIFICATION SUMMARY ===
1. Binary location and symlink:
lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 /home/peter/result/jq -> /home/peter/result/bin/jq
2. File type:
/home/peter/result/bin/jq: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped
3. Dynamic linking check:
not a dynamic executable
↓ 11 lines
=== VERIFICATION SUMMARY === 1. Binary location and symlink: lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 /home/peter/result/jq -> /home/peter/result/bin/jq 2. File type: /home/peter/result/bin/jq: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped 3. Dynamic linking check: not a dynamic executable
It seems the command was too long. Let me complete the verification:
compile-bench> echo "4. musl evidence:" && strings /home/peter/result/bin/jq | grep "musl-gcc" | head -1 4. musl evidence:
--prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static
↓ 3 lines
4. musl evidence: --prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static
compile-bench> echo "5. No glibc references:" && (strings /home/peter/result/bin/jq | grep -i "glibc" > /dev/null && echo "ERROR: Found glibc" || echo "Confirmed: No glibc found") 5. No glibc references:
Confirmed: No glibc found
↓ 3 lines
5. No glibc references: Confirmed: No glibc found
compile-bench> echo "6. Functional test:" && echo '{"test":true,"array":[1,2,3]}' | /home/peter/result/jq '.array | length' 6. Functional test:
3
↓ 3 lines
6. Functional test: 3
Perfect! Let me verify the directory structure one final time:
compile-bench> tree -L 2 /home/peter/result/ 2>/dev/null || find /home/peter/result -type f -o -type l | sort /home/peter/result/
|-- bin
| |-- jq
| `-- onig-config
|-- include
| |-- jq.h
| |-- jv.h
| |-- oniggnu.h
| `-- oniguruma.h
|-- jq -> /home/peter/result/bin/jq
|-- lib
| |-- libjq.a
| |-- libjq.la
| |-- libonig.a
| |-- libonig.la
| `-- pkgconfig
`-- share
|-- doc
`-- man
7 directories, 11 files
↓ 22 lines
/home/peter/result/
|-- bin
| |-- jq
| `-- onig-config
|-- include
| |-- jq.h
| |-- jv.h
| |-- oniggnu.h
| `-- oniguruma.h
|-- jq -> /home/peter/result/bin/jq
|-- lib
| |-- libjq.a
| |-- libjq.la
| |-- libonig.a
| |-- libonig.la
| `-- pkgconfig
`-- share
|-- doc
`-- man
7 directories, 11 files
Excellent! Everything is set up correctly. Let me create a final comprehensive report:
compile-bench> cat << 'EOF'
================================================================================
JQ COMPILATION REPORT
================================================================================
TASK: Compile jq v1.8.1 with musl C library (statically linked)
INSTALLATION DETAILS:
- Source: /home/peter/jq.tar.gz (jq-1.8.1)
- Installation directory: /home/peter/result
- Binary location: /home/peter/result/bin/jq
- Symlink: /home/peter/result/jq -> /home/peter/result/bin/jq
COMPILATION CONFIGURATION:
- Compiler: musl-gcc (musl C library wrapper)
- C Standard Library: musl (NOT glibc)
- Linking: Static (no dynamic dependencies)
- Flags: CFLAGS=-static LDFLAGS=-static
- Oniguruma: Built-in (included in static binary)
VERIFICATION RESULTS:
✓ Binary is statically linked (verified with 'ldd' and 'file')
✓ Uses musl C library (verified with 'strings' - found musl-gcc references)
✓ No glibc references found in binary
✓ No dynamic library dependencies (objdump shows no NEEDED libraries)
✓ Binary is executable and functional
✓ Symlink created successfully at /home/peter/result/jq
BINARY DETAILS:
- Type: ELF 64-bit LSB executable
- Architecture: x86-64
- Linking: statically linked
- Size: Fully self-contained with no runtime dependencies
FUNCTIONAL TEST:
✓ jq version: 1.8.1
✓ JSON processing: Working correctly
================================================================================
EOF
================================================================================
JQ COMPILATION REPORT
================================================================================
TASK: Compile jq v1.8.1 with musl C library (statically linked)
INSTALLATION DETAILS:
- Source: /home/peter/jq.tar.gz (jq-1.8.1)
- Installation directory: /home/peter/result
- Binary location: /home/peter/result/bin/jq
- Symlink: /home/peter/result/jq -> /home/peter/result/bin/jq
COMPILATION CONFIGURATION:
- Compiler: musl-gcc (musl C library wrapper)
- C Standard Library: musl (NOT glibc)
- Linking: Static (no dynamic dependencies)
- Flags: CFLAGS=-static LDFLAGS=-static
- Oniguruma: Built-in (included in static binary)
VERIFICATION RESULTS:
Binary is statically linked (verified with 'ldd' and 'file')
Uses musl C library (verified with 'strings' - found musl-gcc references)
No glibc references found in binary
No dynamic library dependencies (objdump shows no NEEDED libraries)
Binary is executable and functional
Symlink created successfully at /home/peter/result/jq
BINARY DETAILS:
- Type: ELF 64-bit LSB executable
- Architecture: x86-64
- Linking: statically linked
- Size: Fully self-contained with no runtime dependencies
FUNCTIONAL TEST:
jq version: 1.8.1
JSON processing: Working correctly
================================================================================
↓ 39 lines
================================================================================
JQ COMPILATION REPORT
================================================================================
TASK: Compile jq v1.8.1 with musl C library (statically linked)
INSTALLATION DETAILS:
- Source: /home/peter/jq.tar.gz (jq-1.8.1)
- Installation directory: /home/peter/result
- Binary location: /home/peter/result/bin/jq
- Symlink: /home/peter/result/jq -> /home/peter/result/bin/jq
COMPILATION CONFIGURATION:
- Compiler: musl-gcc (musl C library wrapper)
- C Standard Library: musl (NOT glibc)
- Linking: Static (no dynamic dependencies)
- Flags: CFLAGS=-static LDFLAGS=-static
- Oniguruma: Built-in (included in static binary)
VERIFICATION RESULTS:
Binary is statically linked (verified with 'ldd' and 'file')
Uses musl C library (verified with 'strings' - found musl-gcc references)
No glibc references found in binary
No dynamic library dependencies (objdump shows no NEEDED libraries)
Binary is executable and functional
Symlink created successfully at /home/peter/result/jq
BINARY DETAILS:
- Type: ELF 64-bit LSB executable
- Architecture: x86-64
- Linking: statically linked
- Size: Fully self-contained with no runtime dependencies
FUNCTIONAL TEST:
jq version: 1.8.1
JSON processing: Working correctly
================================================================================
Perfect! Let me do one final verification to show the complete success:
compile-bench> echo "=== FINAL VERIFICATION ===" && echo && echo "Symlink exists:" && ls -l /home/peter/result/jq && echo && echo "Binary size:" && ls -lh /home/peter/result/bin/jq && echo && echo "Version check:" && /home/peter/result/jq --version && echo && echo "Static linking confirmed:" && file /home/peter/result/bin/jq | grep -o "statically linked" === FINAL VERIFICATION ===
Symlink exists:
lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 /home/peter/result/jq -> /home/peter/result/bin/jq
Binary size:
-rwxr-xr-x 1 peter peter 1.3M Sep 29 17:51 /home/peter/result/bin/jq
Version check:
jq-1.8.1
Static linking confirmed:
statically linked
↓ 14 lines
=== FINAL VERIFICATION === Symlink exists: lrwxrwxrwx 1 peter peter 25 Sep 29 17:51 /home/peter/result/jq -> /home/peter/result/bin/jq Binary size: -rwxr-xr-x 1 peter peter 1.3M Sep 29 17:51 /home/peter/result/bin/jq Version check: jq-1.8.1 Static linking confirmed: statically linked
Perfect! Let me verify one more time that it's using musl and not glibc by checking the actual libc implementation:
compile-bench> echo "Checking for musl-specific internal symbols:" && nm /home/peter/result/bin/jq 2>/dev/null | grep -E "__init_libc|__libc_start_main" && echo && echo "Compiler used (from embedded config):" && strings /home/peter/result/bin/jq | grep "CC=musl-gcc" Checking for musl-specific internal symbols:
00000000004916e0 T __init_libc
0000000000491990 T __libc_start_main
Compiler used (from embedded config):
--prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static
↓ 7 lines
Checking for musl-specific internal symbols: 00000000004916e0 T __init_libc 0000000000491990 T __libc_start_main Compiler used (from embedded config): --prefix=/home/peter/result --disable-maintainer-mode --with-oniguruma=builtin CC=musl-gcc CFLAGS=-static LDFLAGS=-static
Summary
I have successfully completed the task! Here's what was accomplished:
✅ Task Completed Successfully
1. Extracted jq v1.8.1 source code from /home/peter/jq.tar.gz
2. Installed the required build tools:
- musl-tools and musl-dev (for musl C library)
- build-essential, autoconf, automake, libtool
3. Compiled jq with musl as the C standard library:
- Used CC=musl-gcc to ensure musl compiler
- Added CFLAGS=-static and LDFLAGS=-static for static linking
- Built with --with-oniguruma=builtin for self-contained binary
- Used make LDFLAGS=-all-static to ensure full static linking
4. Installed to /home/peter/result with all components
5. Created symlink from /home/peter/result/jq to /home/peter/result/bin/jq
✅ Verification Confirmed:
- ✓ Binary is statically linked (no dynamic dependencies)
- ✓ Uses musl C library (verified by musl-gcc compiler reference and musl-specific symbols)
- ✓ No glibc references in the binary
- ✓ Binary is fully functional (tested with JSON processing)
- ✓ Version: jq-1.8.1
- ✓ Symlink correctly points to the binary
The jq binary is now ready to use at /home/peter/result/bin/jq or via the symlink at /home/peter/result/jq.