Task
jq-static-musl
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.
Best attempt
| Model |
|
| Attempt |
ljrrjxf36j07k
|
| # of commands | 5 |
| Total time | 2m25s |
| Cost | $0.011 |
Terminal transcript >
compile-bench> cd /home/peter && ls -l jq.tar.gz && sudo apt update && sudo apt install -y musl-tools autoconf libtool-bin pkg-config bison flex gettext && tar -xzf jq.tar.gz && cd jq-1.8.1 && autoreconf -fiv && ./configure CC=musl-gcc LDFLAGS="-static" --prefix=/home/peter/result && make LDFLAGS="-static" && make install && ln -sf /home/peter/result/bin/jq /home/peter/result/jq && ldd /home/peter/result/bin/jq /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' /home/peter/result/bin/jq: error while loading shared libraries: /lib/x86_64-linux-gnu/libc.so: invalid ELF header compile-bench> cd /home/peter/jq-1.8.1; make distclean; rm -rf /home/peter/result; mkdir -p /home/peter/result; ./configure CC=musl-gcc --disable-shared LDFLAGS="-static" --prefix=/home/peter/result; make LDFLAGS="-static"; make install; ln -sf /home/peter/result/bin/jq /home/peter/result/jq; ldd /home/peter/result/bin/jq /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' /home/peter/result/bin/jq: error while loading shared libraries: /lib/x86_64-linux-gnu/libc.so: invalid ELF header compile-bench> cd /home/peter/jq-1.8.1; ./configure --help | grep -i static --enable-static[=PKGS] build static libraries [default=yes] --enable-all-static link jq with static libraries only compile-bench> cd /home/peter/jq-1.8.1; make distclean; ./configure CC=musl-gcc --disable-shared --enable-all-static LDFLAGS="-static" --prefix=/home/peter/result; make LDFLAGS="-static"; make install; ln -sf /home/peter/result/bin/jq /home/peter/result/jq; ldd /home/peter/result/bin/jq /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' not a dynamic executable compile-bench> file /home/peter/result/bin/jq; ls -l /home/peter/result/jq /home/peter/result/bin/jq: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped lrwxrwxrwx 1 peter peter 25 Sep 16 20:35 /home/peter/result/jq -> /home/peter/result/bin/jq
Model ranking
| # | Model | ||||
|---|---|---|---|---|---|
| 1 |
|
100%
|
17 (3.4x) | 2m57s (2.6x) | $0.078 (6.9x) |
| 2 |
|
100%
|
20 (4.0x) | 4m12s (3.7x) | $0.032 (2.9x) |
| 3 |
|
100%
|
24 (4.8x) | 3m23s (3.0x) | $0.375 (33.2x) |
| 4 |
|
100%
|
25 (5.0x) | 2m38s (2.3x) | $0.169 (14.9x) |
| 5 |
|
100%
|
29 (5.8x) | 1m46s (1.6x) | $0.220 (19.5x) |
| 6 |
|
100%
|
29 (5.8x) | 2m45s (2.4x) | $0.299 (26.5x) |
| 7 |
|
100%
|
32 (6.4x) | 1m43s (1.5x) | $0.312 (27.6x) |
| 8 |
|
100%
|
39 (7.8x) | 1m58s (1.7x) | $0.313 (27.7x) |
| 9 |
|
100%
|
44 (8.8x) | 4m16s (3.8x) | $0.265 (23.5x) |
| 10 |
|
67%
|
5 (1.0x) | 1m57s (1.7x) | $0.011 (1.0x) |
| 11 |
|
67%
|
12 (2.4x) | 1m26s (1.3x) | $0.040 (3.5x) |
| 12 |
|
67%
|
24 (4.8x) | 1m33s (1.4x) | $0.111 (9.8x) |
| 13 |
|
67%
|
35 (7.0x) | 2m9s (1.9x) | $0.302 (26.8x) |
| 14 |
|
67%
|
45 (9.0x) | 4m44s (4.2x) | $0.160 (14.2x) |
| 15 |
|
33%
|
10 (2.0x) | 2m28s (2.2x) | $0.147 (13.0x) |
| 16 |
|
33%
|
18 (3.6x) | 1m8s (1.0x) | $0.158 (14.0x) |
| 17 |
|
33%
|
19 (3.8x) | 1m14s (1.1x) | $0.035 (3.1x) |
| 18 |
|
33%
|
19 (3.8x) | 2m48s (2.5x) | $1.022 (90.4x) |
| 19 |
|
33%
|
31 (6.2x) | 4m11s (3.7x) | $0.029 (2.5x) |
| 20 |
|
33%
|
52 (10.4x) | 4m34s (4.0x) | $0.165 (14.6x) |
| 21 |
|
0%
|
|||
| 22 |
|
0%
|
|||
| 23 |
|
0%
|
|||
| 24 |
|
0%
|
Attempts
| Model | Attempt ID | Cost | Duration | Status / Error |
|---|---|---|---|---|
|
|
3hjt6z0gs0v7u
|
$0.979 | 2m53s | Failure task failed: jq is not statically linked |
|
|
h1iod2d5n7pn9
|
$1.022 | 2m48s | Success |
|
|
u3iuoo14sr2yi
|
$1.149 | 3m1s | Failure task failed: jq is not statically linked |
|
|
bjx5dy673nj23
|
$0.178 | 1m35s | Success |
|
|
gnam2lgg704v4
|
$0.222 | 1m51s | Success |
|
|
x4zo17a6772cu
|
$0.220 | 1m46s | Success |
|
|
1lqob8o8fgs5g
|
$0.299 | 2m45s | Success |
|
|
2i1mu18nmdu6k
|
$0.219 | 2m24s | Success |
|
|
sofnn6hrtycfj
|
$0.450 | 3m15s | Success |
|
|
1p5qpnhpepimv
|
$0.262 | 1m32s | Success |
|
|
9cu17hgje0phe
|
$0.313 | 1m58s | Success |
|
|
kev1pxwi2nsa8
|
$0.520 | 2m35s | Success |
|
|
1crio5dqx6gno
|
$0.457 | 3m10s | Success |
|
|
gq80zpkncna4o
|
$0.476 | 2m57s | Failure task failed: jq binary does not show musl markers |
|
|
klltd6vsh357h
|
$0.302 | 2m9s | Success |
|
|
3w1btu0svmoqa
|
$0.279 | 1m37s | Success |
|
|
t37r92ftwagql
|
$0.572 | 2m58s | Success |
|
|
v772kvxqtcaoy
|
$0.312 | 1m43s | Success |
|
|
foqvgc88fdwpr
|
$0.175 | 3m55s | Success |
|
|
rfr46v53ma12p
|
$0.330 | 5m5s | Success |
|
|
rqlz1a80zxnf6
|
$0.265 | 4m16s | Success |
|
|
4vo0qowourp2x
|
$0.267 | 4m3s | Failure task failed: jq binary does not exist |
|
|
wuvsgpxterenf
|
$0.035 | 1m14s | Success |
|
|
xgtgg0l4eqhdd
|
$0.238 | 2m57s | Failure task failed: jq binary does not exist |
|
|
jhh3934iqs1g8
|
$0.126 | 3m47s | Failure task failed: jq is not statically linked |
|
|
vd21pck4x3p21
|
$0.297 | 5m49s | Failure task failed: jq binary does not exist |
|
|
vwe53jv3bfcm4
|
$0.165 | 4m34s | Success |
|
|
efw1rw1pzilv4
|
$0.191 | 2m27s | Failure task failed: jq binary does not exist |
|
|
jn63ltdcm43n2
|
$0.087 | 1m21s | Failure task failed: jq is not statically linked |
|
|
nle29iwjqf9p9
|
$0.350 | 3m37s | Failure task failed: jq is not statically linked |
|
|
3v1e9bbm91nqp
|
$0.222 | 2m49s | Success |
|
|
78bmmqixx7ofr
|
$0.009 | 23s | Failure task failed: jq binary does not exist |
|
|
b0hxijrv7ghqu
|
$0.111 | 1m33s | Success |
|
|
5ry2340t8ffq5
|
$0.293 | 3m24s | Failure task failed: jq is not statically linked |
|
|
ax7v12bvnwj41
|
$0.430 | 2m37s | Failure task failed: jq is not statically linked |
|
|
f2u7e17o8cqfn
|
$0.146 | 1m0s | Failure task failed: jq is not statically linked |
|
|
s8y2djf3d5u39
|
$0.007 | 50s | Failure task failed: jq is not statically linked |
|
|
sz34lbz4tfzla
|
$0.007 | 39s | Failure task failed: jq is not statically linked |
|
|
trwl27b2sjave
|
$0.006 | 28s | Failure task failed: jq is not statically linked |
|
|
2shz81esqlh60
|
$0.086 | 1m17s | Success |
|
|
f1ig42g5qqfdp
|
$0.169 | 2m38s | Success |
|
|
f6blahvfwbv2t
|
$0.219 | 3m14s | Success |
|
|
16a031xzu2q4l
|
$0.078 | 2m57s | Success |
|
|
97y2o6a6u4gdo
|
$0.164 | 4m18s | Success |
|
|
nll1333z3b7nr
|
$0.071 | 2m13s | Success |
|
|
0j51p23s6yj1u
|
$0.032 | 4m26s | Success |
|
|
irquyvwht52o6
|
$0.032 | 4m12s | Success |
|
|
s8t30gczb1xw1
|
$0.034 | 4m11s | Success |
|
|
0g92qpw1sk5vv
|
$0.005 | 1m7s | Failure task failed: jq is not statically linked |
|
|
3mb0pufknb7sj
|
$0.006 | 49s | Failure task failed: jq is not statically linked |
|
|
nyjjqhocueej7
|
$0.008 | 1m12s | Failure task failed: jq is not statically linked |
|
|
6ail416l8118v
|
$0.058 | 1m46s | Success |
|
|
9sqq9xz4m17eh
|
$0.085 | 2m40s | Failure task failed: jq is not statically linked |
|
|
qicsv094u1y58
|
$0.040 | 1m26s | Success |
|
|
8ctzmd5y7gntr
|
$0.160 | 4m44s | Success |
|
|
pkxutxbq6iatn
|
$0.247 | 5m49s | Success |
|
|
ripagfb04ifcf
|
$0.000 | 5s | Failure task failed: jq binary does not exist |
|
|
izbh668vbws1p
|
$0.268 | 3m45s | Failure task failed: jq binary does not exist |
|
|
k0as8rwlez788
|
$0.147 | 2m28s | Success |
|
|
n6160x2rlj02d
|
$0.116 | 2m8s | Failure task failed: jq binary does not exist |
|
|
5bi2x605mn1kl
|
$0.032 | 5m8s | Failure task failed: jq binary does not exist |
|
|
bkje7o771qwuq
|
$0.029 | 4m11s | Success |
|
|
hcspgyvvzjkmk
|
$0.043 | 8m6s | Failure task failed: jq binary does not exist |
|
|
1tgr8gg7ri7zn
|
$0.026 | 1m57s | Success |
|
|
l5mlut0lt37y7
|
$0.023 | 2m28s | Failure task failed: jq is not statically linked |
|
|
ljrrjxf36j07k
|
$0.011 | 2m25s | Success |
|
|
8f7yibeyb7gj5
|
$0.221 | 1m32s | Failure task failed: jq is not statically linked |
|
|
nwaob4c8ebjft
|
$0.979 | 2m47s | Failure task failed: jq is not statically linked |
|
|
xjuvqq1wnbiid
|
$0.158 | 1m8s | Success |
|
|
livn2jgg2syui
|
$0.181 | 1m30s | Success |
|
|
nikawok9pf8m2
|
$0.775 | 5m56s | Success |
|
|
w1he8bwsonj1g
|
$0.375 | 3m23s | Success |