Task
coreutils-old-version
GNU coreutils 5.0 (from 2003) is a collection of Linux utilities like ls, cp, mv, etc.
Project link: gnu.org/software/coreutils
Task: Compile and install all coreutils utilities to a specific location.
Difficulties: The source is very old (2003) and requires heavy patching.
Environment: Ubuntu 22.04 on amd64, without internet access.
Best attempt
| Model |
|
| Attempt |
ov75uekkycz7t
|
| # of commands | 5 |
| Total time | 3m7s |
| Cost | $0.007 |
Terminal transcript >
compile-bench> set -e; export DEBIAN_FRONTEND=noninteractive; cd /home/peter; rm -rf coreutils-src result build; mkdir -p build result; tar -xzf coreutils.tar.gz -C build; srcdir=$(find build -maxdepth 1 -type d -name 'coreutils*' | head -n1); if [ -z "$srcdir" ]; then echo 'source dir not found' >&2; exit 1; fi; cd "$srcdir"; echo "Configuring in $(pwd)"; ./configure --prefix=/home/peter/result --enable-no-install-program=; make -j$(nproc); make install-strip; # create individual symlinks to binaries in bin and usr/bin if any cd /home/peter/result; for f in bin/* sbin/* 2>/dev/null; do :; done; # create symlinks for executables found under /home/peter/result find /home/peter/result -type f -perm /u=x,g=x,o=x | while read -r bin; do name=$(basename "$bin"); ln -sf "$bin" /home/peter/result/$name; done; # verify echo 'Installed files:'; ls -1 /home/peter/result | sed -n '1,200p'; echo 'Done' make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: *** [Makefile:815: all] Error 2 make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[1]: *** [Makefile:244: all-recursive] Error 1 make[1]: Leaving directory '/home/peter/build/coreutils-5.0' make: *** [Makefile:199: all] Error 2 compile-bench> set -e; cd /home/peter/build/coreutils-5.0; # apply patch to rename eaccess to my_eaccess in test.c and headers if grep -q "eaccess (char const *file, int mode)" test.c; then sed -i 's/\beaccess\b/my_eaccess/g' test.c; fi; if grep -q "\beaccess\b" *.h 2>/dev/null; then sed -i 's/\beaccess\b/my_eaccess/g' *.h || true; fi; # also avoid tee conflict by renaming function tee in tee.c? but error was about tee macro; rename local tee function in test.c earlier showed tee conflict. Build again ./configure --prefix=/home/peter/result; make -j$(nproc) || make -j1; make install-strip || true; # if install failed, continue # create symlinks cd /home/peter/result; find . -type f -perm /u=x,g=x,o=x | while read -r bin; do name=$(basename "$bin"); ln -sf "$PWD/$bin" /home/peter/result/$name; done; echo 'Done' make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: *** [Makefile:815: all] Error 2 make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[1]: *** [Makefile:244: all-recursive] Error 1 make[1]: Leaving directory '/home/peter/build/coreutils-5.0' make: *** [Makefile:199: all] Error 2 compile-bench> set -e; cd /home/peter/build/coreutils-5.0; # add -lm to LIBS in src/Makefile if grep -q "^LIBS =" src/Makefile; then sed -i "s/^LIBS =/LIBS = -lm/" src/Makefile; else echo 'LIBS = -lm' >> src/Makefile; fi; make -j$(nproc) || make -j1; make install-strip; cd /home/peter/result; find . -type f -perm /u=x,g=x,o=x | while read -r bin; do name=$(basename "$bin"); ln -sf "$PWD/$bin" /home/peter/result/$name; done; echo 'Verify:'; ls -1 /home/peter/result | sed -n '1,200p' make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: *** [Makefile:815: all] Error 2 make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[1]: *** [Makefile:244: all-recursive] Error 1 make[1]: Leaving directory '/home/peter/build/coreutils-5.0' make: *** [Makefile:199: all] Error 2 compile-bench> set -e; cd /home/peter/build/coreutils-5.0/src; # rename static function tee to my_tee in tee.c and header declarations sed -i 's/\btee\s*(/my_tee(/g' tee.c; sed -i 's/\btee\b/my_tee/g' tee.c; # adjust any callers grep -R "\btee\b" -n .. || true; cd /home/peter/build/coreutils-5.0; make -j$(nproc) || make -j1; make install-strip; cd /home/peter/result; find . -type f -perm /u=x,g=x,o=x | while read -r bin; do name=$(basename "$bin"); ln -sf "$PWD/$bin" /home/peter/result/$name; done; echo 'Final verify:'; ls -1 /home/peter/result | sed -n '1,300p' make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: *** [Makefile:815: all] Error 2 make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[1]: *** [Makefile:244: all-recursive] Error 1 make[1]: Leaving directory '/home/peter/build/coreutils-5.0' make: *** [Makefile:199: all] Error 2 compile-bench> set -e; cd /home/peter/build/coreutils-5.0/src; sed -n '1,260p' test.c | sed -n '1,220p' > /tmp/test_head.txt || true; # rename eaccess to my_eaccess sed -i 's/\beaccess\b/my_eaccess/g' test.c; sed -n '1,260p' test.c | sed -n '1,220p' > /tmp/test_head2.txt || true; cd /home/peter/build/coreutils-5.0; make -j$(nproc) || make -j1; make install-strip; cd /home/peter/result; find . -type f -perm /u=x,g=x,o=x | while read -r bin; do name=$(basename "$bin"); ln -sf "$PWD/$bin" /home/peter/result/$name; done; echo 'Done. List:'; ls -1 /home/peter/result | sed -n '1,300p' users vdir wc who whoami yes
Model ranking
| # | Model | ||||
|---|---|---|---|---|---|
| 1 |
|
100%
|
12 (2.4x) | 5m47s (3.2x) | $0.243 (37.1x) |
| 2 |
|
100%
|
13 (2.6x) | 2m31s (1.4x) | $0.085 (13.0x) |
| 3 |
|
100%
|
25 (5.0x) | 7m25s (4.1x) | $0.047 (7.2x) |
| 4 |
|
100%
|
28 (5.6x) | 5m24s (3.0x) | $1.494 (227.8x) |
| 5 |
|
100%
|
35 (7.0x) | 6m50s (3.8x) | $0.228 (34.7x) |
| 6 |
|
100%
|
37 (7.4x) | 3m54s (2.1x) | $0.379 (57.9x) |
| 7 |
|
100%
|
40 (8.0x) | 4m39s (2.6x) | $0.408 (62.2x) |
| 8 |
|
100%
|
43 (8.6x) | 5m8s (2.8x) | $0.275 (42.0x) |
| 9 |
|
100%
|
57 (11.4x) | 4m17s (2.4x) | $0.521 (79.5x) |
| 10 |
|
100%
|
63 (12.6x) | 4m32s (2.5x) | $0.646 (98.6x) |
| 11 |
|
67%
|
8 (1.6x) | 1m49s (1.0x) | $0.059 (8.9x) |
| 12 |
|
67%
|
28 (5.6x) | 4m19s (2.4x) | $0.022 (3.4x) |
| 13 |
|
67%
|
28 (5.6x) | 4m42s (2.6x) | $0.105 (16.0x) |
| 14 |
|
67%
|
35 (7.0x) | 3m19s (1.8x) | $0.334 (51.0x) |
| 15 |
|
67%
|
37 (7.4x) | 7m16s (4.0x) | $0.040 (6.1x) |
| 16 |
|
67%
|
49 (9.8x) | 3m11s (1.7x) | $0.355 (54.1x) |
| 17 |
|
33%
|
5 (1.0x) | 3m7s (1.7x) | $0.007 (1.0x) |
| 18 |
|
33%
|
21 (4.2x) | 15m1s (8.3x) | $0.045 (6.9x) |
| 19 |
|
33%
|
75 (15.0x) | 6m44s (3.7x) | $0.566 (86.4x) |
| 20 |
|
0%
|
|||
| 21 |
|
0%
|
|||
| 22 |
|
0%
|
|||
| 23 |
|
0%
|
|||
| 24 |
|
0%
|
Attempts
| Model | Attempt ID | Cost | Duration | Status / Error |
|---|---|---|---|---|
|
|
4zgknwl6ebr1d
|
$2.583 | 19m4s | Success |
|
|
l4sqq9kgy7m3k
|
$0.900 | 3m51s | Success |
|
|
y4igco0imbqau
|
$1.494 | 5m24s | Success |
|
|
5s01toy181ots
|
$0.646 | 6m17s | Success |
|
|
89rw1fujnij0p
|
$0.793 | 4m32s | Success |
|
|
h7d1bi6l22b7x
|
$0.386 | 3m27s | Success |
|
|
htqn1ylnw2hnt
|
$0.592 | 7m46s | Success |
|
|
nlktx2ewr2ezf
|
$0.394 | 4m39s | Success |
|
|
w5gv8vqknq8ix
|
$0.408 | 4m37s | Success |
|
|
gc06c3aibqvg0
|
$0.499 | 4m48s | Success |
|
|
ifl1v0lpnshh1
|
$0.521 | 3m18s | Success |
|
|
m45lrir1yolhg
|
$0.653 | 4m17s | Success |
|
|
7o8tyki994695
|
$0.406 | 3m53s | Success |
|
|
mghtc374epad0
|
$0.379 | 4m18s | Success |
|
|
pngf8zm8zli3w
|
$0.321 | 3m54s | Success |
|
|
281l9svxi2cd5
|
$0.355 | 3m11s | Success |
|
|
igek8l605gxyb
|
$0.527 | 3m21s | Success |
|
|
zvvds288xdcm1
|
$0.369 | 3m11s | Failure task failed: install missing at /home/peter/result/install or not executable |
|
|
0jizc9vaajx8x
|
$0.105 | 4m48s | Success |
|
|
1qhc4ph49xvev
|
$0.148 | 4m42s | Success |
|
|
h7ozgpm05ntu0
|
$0.158 | 5m2s | Failure task failed: df missing at /home/peter/result/df or not executable |
|
|
22kvbqe7s9e7a
|
$0.235 | 14m31s | Failure exceeded max tool calls (90) |
|
|
52njs5c5fvgg0
|
$0.036 | 4m40s | Failure task failed: chroot missing at /home/peter/result/chroot or not executable |
|
|
un0m2bqbkbovf
|
$0.260 | 13m35s | Failure task failed: sha1sum binary does not exist |
|
|
02ofxvn1wnw8g
|
$0.034 | 2m25s | Failure task failed: df missing at /home/peter/result/df or not executable |
|
|
asuvr8gm3mxk1
|
$0.132 | 19m57s | Failure context timeout: context deadline exceeded |
|
|
w2c8hsvl88jiw
|
$0.089 | 19m52s | Failure context timeout: context deadline exceeded |
|
|
6zq8inevfx8ds
|
$0.777 | 9m30s | Failure exceeded max tool calls (90) |
|
|
8jfa9wn9zcqdd
|
$0.094 | 2m27s | Failure task failed: chroot missing at /home/peter/result/chroot or not executable |
|
|
rmo65epaw2rw6
|
$0.218 | 4m56s | Failure task failed: chroot missing at /home/peter/result/chroot or not executable |
|
|
5sf13h26pxlzn
|
$0.073 | 2m18s | Failure task failed: sha1sum binary does not exist |
|
|
86275dcc9re9k
|
$0.566 | 6m44s | Success |
|
|
s74lri9vfhhc1
|
$0.035 | 1m54s | Failure task failed: sha1sum binary does not exist |
|
|
335ro2eow4mpt
|
$0.333 | 2m31s | Failure task failed: install missing at /home/peter/result/install or not executable |
|
|
fkq26et7a9e1q
|
$1.244 | 4m39s | Failure task failed: sha1sum binary does not exist |
|
|
k8w4b7mlwvosf
|
$1.243 | 5m5s | Failure task failed: groups missing at /home/peter/result/groups or not executable |
|
|
0czs7cd61cgiv
|
$0.428 | 4m24s | Failure exceeded max tool calls (90) |
|
|
pk3sw083z1mhf
|
$0.045 | 15m1s | Success |
|
|
r0va6gg2yz6cw
|
$0.289 | 4m6s | Failure exceeded max tool calls (90) |
|
|
3ekrd46s9d867
|
$0.275 | 6m50s | Success |
|
|
ab4iuxfkr6i85
|
$0.295 | 5m8s | Success |
|
|
s2p70fvq14ldn
|
$0.162 | 3m51s | Success |
|
|
lpwkqycgej1dy
|
$0.177 | 6m50s | Success |
|
|
voe8esm42oiot
|
$0.228 | 5m39s | Success |
|
|
ybnt1nyjz0lra
|
$0.291 | 8m32s | Success |
|
|
6b3e0y879rrv6
|
$0.069 | 7m25s | Success |
|
|
hbo2sd0aay6v6
|
$0.038 | 6m2s | Success |
|
|
lwlyu0ig87c7w
|
$0.047 | 7m40s | Success |
|
|
d9t1djg24wnaq
|
$0.016 | 4m1s | Failure task failed: sha1sum binary does not exist |
|
|
ov75uekkycz7t
|
$0.007 | 3m7s | Success |
|
|
xa3nkglfqxzsi
|
$0.007 | 3m20s | Failure task failed: sha1sum binary does not exist |
|
|
o2o7i6nrwj916
|
$0.050 | 2m12s | Success |
|
|
sfasrxttuoiod
|
$0.085 | 2m31s | Success |
|
|
sqjv5c8wq9w2c
|
$0.085 | 2m35s | Success |
|
|
3g1a0t58qzydc
|
$0.007 | 1m36s | Failure task failed: sha1sum binary does not exist |
|
|
8l6slgfyu8u6j
|
$0.000 | 3s | Failure task failed: sha1sum binary does not exist |
|
|
tax4k529iosv8
|
$0.114 | 4m6s | Failure task failed: sha1sum binary does not exist |
|
|
5p3vlguat3wv5
|
$0.203 | 4m46s | Success |
|
|
f42wz7er54s06
|
$0.243 | 7m27s | Success |
|
|
ywe12bzjsdojn
|
$0.298 | 5m47s | Success |
|
|
p2sx3gryx4g45
|
$0.021 | 7m8s | Failure task failed: sha1sum binary does not exist |
|
|
q2bq72myqpt3d
|
$0.138 | 14m59s | Success |
|
|
v8x0g3tsjjxs8
|
$0.040 | 7m16s | Success |
|
|
chfj8fel013c8
|
$0.041 | 16m3s | Success |
|
|
h5x58jegtaw87
|
$0.013 | 2m26s | Failure task failed: install missing at /home/peter/result/install or not executable |
|
|
kq37r4dvh4r42
|
$0.022 | 4m19s | Success |
|
|
s0ua7nnulbi9r
|
$1.358 | 4m25s | Success |
|
|
t9k6qymlrf1tz
|
$0.757 | 4m47s | Failure task failed: chroot missing at /home/peter/result/chroot or not executable |
|
|
u1bt6at9900sh
|
$0.334 | 3m19s | Success |
|
|
mxv11g9o5jx2j
|
$3.012 | 6m38s | Failure exceeded max cost dollars (max=$3.00, current=3.01) |
|
|
qv7n0li11olhe
|
$0.059 | 1m49s | Success |
|
|
zrk9vom0swqf2
|
$0.780 | 4m41s | Success |