| Cost | $0.007 |
| Total elapsed time | 3m7s |
| LLM inference time | 33s |
| Command execution time | 2m34s |
| Commands executed | 5 |
All details >
| Attempt ID | ov75uekkycz7t |
Attempt group | run-16-09-22-05 |
| Revision | fb5c74bd2fee |
AWS Instance | m8i.2xlarge |
| Start time | 2025-09-16 21:57:06 UTC | End time | 2025-09-16 22:00:14 UTC |
| Setup start time | 2025-09-16 21:57:03 UTC | Setup duration | 4s |
| Task | coreutils-old-version | Environment | ubuntu-22.04-amd64-offline |
| Env container | ubuntu-22.04-amd64 | Env online | False |
| Model | OpenRouter slug | openai/gpt-5-mini |
|
| Temperature | 1.0 | Explicit prompt caching | False |
| User msg after tool call | False | ||
| Cost | $0.007 | Duration | 3m7s |
| Final context tokens | 10466 | Total output tokens | 1631 |
| Output reasoning tokens | 0 | Messages | 13 |
| Raw requests saved | 6 | Raw responses saved | 6 |
| Total timeout (s) | 1200.0 | Command timeout (s) | 600.0 |
| Max tool calls | 90 |
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.
You are given a coreutils v5.0 source code at /home/peter/coreutils.tar.gz. Please compile the coreutils package and install it to /home/peter/result. Create symlinks for all coreutils utilities so they are available under /home/peter/result/<utility>. For example: /home/peter/result/uptime should point to the compiled uptime binary.
Thought for 6s
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'
Configuring in /home/peter/build/coreutils-5.0
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for perl5.003 or newer... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for uname... yes
checking for chroot... yes
checking for gethostid... yes
checking for strerror in -lcposix... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking for gcc option to accept ANSI C... none needed
checking for function prototypes... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for inline... inline
checking for working long double with more range or precision than double... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking hurd.h usability... no
checking hurd.h presence... no
checking for hurd.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for memory.h... (cached) yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking mnttab.h usability... no
checking mnttab.h
[command output truncated]
-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from system.h:153,
from tee.c:26:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'}
429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len,
| ^~~
test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration
142 | eaccess (char const *file, int mode)
| ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/param.h:28,
from system.h:33,
from test.c:41:
/usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)'
296 | extern int eaccess (const char *__name, int __type)
| ^~~~~~~
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tty.o -MD -MP -MF ".deps/tty.Tpo" \
-c -o tty.o `test -f 'tty.c' || echo './'`tty.c; \
then mv ".deps/tty.Tpo" ".deps/tty.Po"; \
else rm -f ".deps/tty.Tpo"; exit 1; \
fi
test.c: In function 'eaccess':
make[3]: *** [Makefile:1263: tee.o] Error 1
make[3]: *** Waiting for unfinished jobs....
test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
160 | setreuid (euid, uid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
162 | setregid (egid, gid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
168 | setreuid (uid, euid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
170 | setregid (gid, egid);
| ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1263: test.o] Error 1
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
↓
123 lines
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' Configuring in /home/peter/build/coreutils-5.0 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for perl5.003 or newer... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking whether gcc needs -traditional... no checking for ranlib... ranlib checking whether ln -s works... yes checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for uname... yes checking for chroot... yes checking for gethostid... yes checking for strerror in -lcposix... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for _LARGE_FILES value needed for large files... no checking for gcc option to accept ANSI C... none needed checking for function prototypes... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for inline... inline checking for working long double with more range or precision than double... no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking hurd.h usability... no checking hurd.h presence... no checking for hurd.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for memory.h... (cached) yes checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking mnttab.h usability... no checking mnttab.h [command output truncated] -linux-gnu/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from system.h:153, from tee.c:26: /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'} 429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len, | ^~~ test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration 142 | eaccess (char const *file, int mode) | ^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/x86_64-linux-gnu/sys/param.h:28, from system.h:33, from test.c:41: /usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tty.o -MD -MP -MF ".deps/tty.Tpo" \ -c -o tty.o `test -f 'tty.c' || echo './'`tty.c; \ then mv ".deps/tty.Tpo" ".deps/tty.Po"; \ else rm -f ".deps/tty.Tpo"; exit 1; \ fi test.c: In function 'eaccess': make[3]: *** [Makefile:1263: tee.o] Error 1 make[3]: *** Waiting for unfinished jobs.... test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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↓ 123 lines
Thought for 5s
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'
grep: test.c: No such file or directory
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for perl5.003 or newer... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for AIX... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for uname... yes
checking for chroot... yes
checking for gethostid... yes
checking for strerror in -lcposix... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking for gcc option to accept ANSI C... none needed
checking for function prototypes... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for inline... inline
checking for working long double with more range or precision than double... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking hurd.h usability... no
checking hurd.h presence... no
checking for hurd.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for memory.h... (cached) yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking mnttab.h usability... no
checking mnttab.h presenc
[command output truncated]
us declaration of 'eaccess' with type 'int(const char *, int)'
296 | extern int eaccess (const char *__name, int __type)
| ^~~~~~~
make[3]: *** [Makefile:1263: tee.o] Error 1
test.c: In function 'eaccess':
test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
160 | setreuid (euid, uid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
162 | setregid (egid, gid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
168 | setreuid (uid, euid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
170 | setregid (gid, egid);
| ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1263: test.o] Error 1
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
make all-recursive
make[1]: Entering directory '/home/peter/build/coreutils-5.0'
Making all in lib
make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
Making all in src
make[2]: Entering directory '/home/peter/build/coreutils-5.0/src'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/src'
gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a
/usr/bin/ld: seq.o: in function `get_width_format':
/home/peter/build/coreutils-5.0/src/seq.c:253: undefined reference to `floor'
/usr/bin/ld: /home/peter/build/coreutils-5.0/src/seq.c:259: undefined reference to `floor'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1033: seq] Error 1
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
↓
127 lines
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' grep: test.c: No such file or directory checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for perl5.003 or newer... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking whether gcc needs -traditional... no checking for ranlib... ranlib checking whether ln -s works... yes checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for uname... yes checking for chroot... yes checking for gethostid... yes checking for strerror in -lcposix... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for _LARGE_FILES value needed for large files... no checking for gcc option to accept ANSI C... none needed checking for function prototypes... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for inline... inline checking for working long double with more range or precision than double... no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking hurd.h usability... no checking hurd.h presence... no checking for hurd.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for memory.h... (cached) yes checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking mnttab.h usability... no checking mnttab.h presenc [command output truncated] us declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ make[3]: *** [Makefile:1263: tee.o] Error 1 test.c: In function 'eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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 make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a /usr/bin/ld: seq.o: in function `get_width_format': /home/peter/build/coreutils-5.0/src/seq.c:253: undefined reference to `floor' /usr/bin/ld: /home/peter/build/coreutils-5.0/src/seq.c:259: undefined reference to `floor' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:1033: seq] Error 1 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↓ 127 lines
Thought for 4s
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 all-recursive
make[1]: Entering directory '/home/peter/build/coreutils-5.0'
Making all in lib
make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
Making all in src
make[2]: Entering directory '/home/peter/build/coreutils-5.0/src'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/src'
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \
-c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \
then mv ".deps/tee.Tpo" ".deps/tee.Po"; \
else rm -f ".deps/tee.Tpo"; exit 1; \
fi
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \
-c -o test.o `test -f 'test.c' || echo './'`test.c; \
then mv ".deps/test.Tpo" ".deps/test.Po"; \
else rm -f ".deps/test.Tpo"; exit 1; \
fi
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT yes.o -MD -MP -MF ".deps/yes.Tpo" \
-c -o yes.o `test -f 'yes.c' || echo './'`yes.c; \
then mv ".deps/yes.Tpo" ".deps/yes.Po"; \
else rm -f ".deps/yes.Tpo"; exit 1; \
fi
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT uname.o -MD -MP -MF ".deps/uname.Tpo" \
-c -o uname.o `test -f 'uname.c' || echo './'`uname.c; \
then mv ".deps/uname.Tpo" ".deps/uname.Po"; \
else rm -f ".deps/uname.Tpo"; exit 1; \
fi
gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a -lm
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT chroot.o -MD -MP -MF ".deps/chroot.Tpo" \
-c -o chroot.o `test -f 'chroot.c' || echo './'`chroot.c; \
then mv ".deps/chroot.Tpo" ".deps/chroot.Po"; \
else rm -f ".deps/chroot.Tpo"; exit 1; \
fi
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT hostid.o -MD -MP -MF ".deps/hostid.Tpo" \
-c -o hostid.o `test -f 'hostid.c' || echo './'`hostid.c; \
then mv ".deps/hostid.Tpo" ".deps/hostid.Po"; \
else rm -f ".deps/hostid.Tpo"; exit 1; \
fi
gcc -g -O2 -o whoami whoami.o ../lib/libfetish.a ../lib/libfetish.a -lm
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -
[command output truncated]
nused-result-Wunused-result]8;;]
162 | setregid (egid, gid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
168 | setreuid (uid, euid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
170 | setregid (gid, egid);
| ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1263: test.o] Error 1
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
make all-recursive
make[1]: Entering directory '/home/peter/build/coreutils-5.0'
Making all in lib
make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
Making all in src
make[2]: Entering directory '/home/peter/build/coreutils-5.0/src'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/src'
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \
-c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \
then mv ".deps/tee.Tpo" ".deps/tee.Po"; \
else rm -f ".deps/tee.Tpo"; exit 1; \
fi
tee.c:35:12: error: conflicting types for 'tee'; have 'int(int, const char **)'
35 | static int tee (int nfiles, const char **files);
| ^~~
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
from /usr/include/fcntl.h:35,
from system.h:153,
from tee.c:26:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'}
429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len,
| ^~~
make[3]: *** [Makefile:1263: tee.o] Error 1
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
↓
99 lines
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 all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \ -c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \ then mv ".deps/tee.Tpo" ".deps/tee.Po"; \ else rm -f ".deps/tee.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT yes.o -MD -MP -MF ".deps/yes.Tpo" \ -c -o yes.o `test -f 'yes.c' || echo './'`yes.c; \ then mv ".deps/yes.Tpo" ".deps/yes.Po"; \ else rm -f ".deps/yes.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT uname.o -MD -MP -MF ".deps/uname.Tpo" \ -c -o uname.o `test -f 'uname.c' || echo './'`uname.c; \ then mv ".deps/uname.Tpo" ".deps/uname.Po"; \ else rm -f ".deps/uname.Tpo"; exit 1; \ fi gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT chroot.o -MD -MP -MF ".deps/chroot.Tpo" \ -c -o chroot.o `test -f 'chroot.c' || echo './'`chroot.c; \ then mv ".deps/chroot.Tpo" ".deps/chroot.Po"; \ else rm -f ".deps/chroot.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT hostid.o -MD -MP -MF ".deps/hostid.Tpo" \ -c -o hostid.o `test -f 'hostid.c' || echo './'`hostid.c; \ then mv ".deps/hostid.Tpo" ".deps/hostid.Po"; \ else rm -f ".deps/hostid.Tpo"; exit 1; \ fi gcc -g -O2 -o whoami whoami.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. - [command output truncated] nused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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 make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \ -c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \ then mv ".deps/tee.Tpo" ".deps/tee.Po"; \ else rm -f ".deps/tee.Tpo"; exit 1; \ fi tee.c:35:12: error: conflicting types for 'tee'; have 'int(int, const char **)' 35 | static int tee (int nfiles, const char **files); | ^~~ In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from system.h:153, from tee.c:26: /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'} 429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len, | ^~~ make[3]: *** [Makefile:1263: tee.o] Error 1 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↓ 99 lines
Thought for 5s
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'
../AUTHORS:70:tee: Mike Parker, Richard M. Stallman, and David MacKenzie
../tests/misc/tty-eof:34: paste pr ptx sha1sum sort sum tac tee tail tsort
../old/sh-utils/ChangeLog:121: * src/su.c, src/tee.c, src/test.c, src/true.c, src/tty.c: Likewise.
../old/sh-utils/ChangeLog:438: * src/sleep.c, src/stty.c, src/su.c, src/tee.c, src/test.c, src/true.c,
../old/sh-utils/ChangeLog:573: * src/tee.c (full_write): Remove decl; not needed.
../old/sh-utils/ChangeLog:709: * src/printenv.c, src/sleep.c, src/tee.c, src/test.c, src/uptime.c,
../old/sh-utils/ChangeLog:1004: * src/tee.c (main): Remove incorrect `FIXME' comment.
../old/sh-utils/ChangeLog:1013: * src/tee.c (tee): Use SET_BINARY and SET_BINARY2.
../old/sh-utils/ChangeLog:1194: * src/tee.c: Likewise. Remove explicit close_stdout.
../old/sh-utils/ChangeLog:1823: * src/tee.c (tee): Convert from open/fds to using fopen/streams for
../old/sh-utils/ChangeLog:2027: * src/tee.c: Likewise.
../old/sh-utils/ChangeLog:2135: * src/tee.c: Likewise.
../old/sh-utils/ChangeLog:2257: * src/tee.c: Likewise.
../old/sh-utils/ChangeLog:2624: * src/tee.c: Likewise.
../old/sh-utils/ChangeLog:3701: * src/tee.c (main): Ignore SIGPIPE.
../old/sh-utils/ChangeLog:4367: pwd.c seq.c sleep.c stty.c su.c tee.c test.c tty.c uname.c
../old/sh-utils/ChangeLog:4388: sleep.c stty.c su.c tee.c test.c tty.c uname.c who-users.c whoami.c
../old/sh-utils/ChangeLog:4585: printf.c, pwd.c, seq.c, sleep.c, tee.c, test.c, tty.c, uname.c,
../old/sh-utils/NEWS:165:* tee no longer fails immediately upon receipt of SIGPIPE
../old/sh-utils/NEWS:222:* who and tee no longer fail gratuitously when continued after an
../old/sh-utils/ChangeLog.0:176: * tee.c (main, tee): More const dcls and casting.
../old/sh-utils/ChangeLog.0:205: * tee.c (main): Use _POSIX_SOURCE, not _POSIX_VERSION.
../old/sh-utils/ChangeLog.0:611: * tee.c (tee): A POSIX implementation of the read system call
../old/sh-utils/ChangeLog.0:614: (tee): Don't use xwrite. Use full_write instead and include the
../old/sh-utils/ChangeLog.0:796: stty.c, su.c, tee.c, test.c, tty.c, uname.c, who.c, whoami.c,
../old/sh-utils/ChangeLog.0:830: su.c, tee.c, test.c, true.sh, tty.c, uname.c, who.c, whoami.c,
../old/sh-utils/ChangeLog.0:869: tee.c, test.c, tty.c, uname.c, yes.c: Accept --help and --version
../old/sh-utils/ChangeLog.0:895: * tee.c (main): Put entire #ifdef inside if-braces to make structure
../old/sh-utils/ChangeLog.0:897: (main, tee): Compare close() != 0 rather than close () == -1.
../old/sh-utils/ChangeLog.0:990: * env.c, id.c, nice.c, pathchk.c, stty.c, su.c, tee.c, tty.c,
../old/sh-utils/ChangeLog.0:1127: * tee.c (tee): Only malloc and free the table of file descriptors
../old/sh-utils/ChangeLog.0:1178: * system.h, id.c, pathchk.c, tee.c: Change POSIX ifdefs to
../old/sh-utils/ChangeLog.0:1196: * env, id, nice, pathchk, stty, tee, tty, uname: Change usage
../old/sh-utils/ChangeLog.0:1205: * tee.c (main) [POSIX]: Use sigaction instead of signa
[command output truncated]
irectory '/home/peter/build/coreutils-5.0/lib'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
Making all in src
make[2]: Entering directory '/home/peter/build/coreutils-5.0/src'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/src'
gcc -g -O2 -o tee tee.o ../lib/libfetish.a ../lib/libfetish.a -lm
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \
-c -o test.o `test -f 'test.c' || echo './'`test.c; \
then mv ".deps/test.Tpo" ".deps/test.Po"; \
else rm -f ".deps/test.Tpo"; exit 1; \
fi
test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration
142 | eaccess (char const *file, int mode)
| ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/param.h:28,
from system.h:33,
from test.c:41:
/usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)'
296 | extern int eaccess (const char *__name, int __type)
| ^~~~~~~
test.c: In function 'eaccess':
test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
160 | setreuid (euid, uid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
162 | setregid (egid, gid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
168 | setreuid (uid, euid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
170 | setregid (gid, egid);
| ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1263: test.o] Error 1
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
↓
83 lines
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' ../AUTHORS:70:tee: Mike Parker, Richard M. Stallman, and David MacKenzie ../tests/misc/tty-eof:34: paste pr ptx sha1sum sort sum tac tee tail tsort ../old/sh-utils/ChangeLog:121: * src/su.c, src/tee.c, src/test.c, src/true.c, src/tty.c: Likewise. ../old/sh-utils/ChangeLog:438: * src/sleep.c, src/stty.c, src/su.c, src/tee.c, src/test.c, src/true.c, ../old/sh-utils/ChangeLog:573: * src/tee.c (full_write): Remove decl; not needed. ../old/sh-utils/ChangeLog:709: * src/printenv.c, src/sleep.c, src/tee.c, src/test.c, src/uptime.c, ../old/sh-utils/ChangeLog:1004: * src/tee.c (main): Remove incorrect `FIXME' comment. ../old/sh-utils/ChangeLog:1013: * src/tee.c (tee): Use SET_BINARY and SET_BINARY2. ../old/sh-utils/ChangeLog:1194: * src/tee.c: Likewise. Remove explicit close_stdout. ../old/sh-utils/ChangeLog:1823: * src/tee.c (tee): Convert from open/fds to using fopen/streams for ../old/sh-utils/ChangeLog:2027: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2135: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2257: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2624: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:3701: * src/tee.c (main): Ignore SIGPIPE. ../old/sh-utils/ChangeLog:4367: pwd.c seq.c sleep.c stty.c su.c tee.c test.c tty.c uname.c ../old/sh-utils/ChangeLog:4388: sleep.c stty.c su.c tee.c test.c tty.c uname.c who-users.c whoami.c ../old/sh-utils/ChangeLog:4585: printf.c, pwd.c, seq.c, sleep.c, tee.c, test.c, tty.c, uname.c, ../old/sh-utils/NEWS:165:* tee no longer fails immediately upon receipt of SIGPIPE ../old/sh-utils/NEWS:222:* who and tee no longer fail gratuitously when continued after an ../old/sh-utils/ChangeLog.0:176: * tee.c (main, tee): More const dcls and casting. ../old/sh-utils/ChangeLog.0:205: * tee.c (main): Use _POSIX_SOURCE, not _POSIX_VERSION. ../old/sh-utils/ChangeLog.0:611: * tee.c (tee): A POSIX implementation of the read system call ../old/sh-utils/ChangeLog.0:614: (tee): Don't use xwrite. Use full_write instead and include the ../old/sh-utils/ChangeLog.0:796: stty.c, su.c, tee.c, test.c, tty.c, uname.c, who.c, whoami.c, ../old/sh-utils/ChangeLog.0:830: su.c, tee.c, test.c, true.sh, tty.c, uname.c, who.c, whoami.c, ../old/sh-utils/ChangeLog.0:869: tee.c, test.c, tty.c, uname.c, yes.c: Accept --help and --version ../old/sh-utils/ChangeLog.0:895: * tee.c (main): Put entire #ifdef inside if-braces to make structure ../old/sh-utils/ChangeLog.0:897: (main, tee): Compare close() != 0 rather than close () == -1. ../old/sh-utils/ChangeLog.0:990: * env.c, id.c, nice.c, pathchk.c, stty.c, su.c, tee.c, tty.c, ../old/sh-utils/ChangeLog.0:1127: * tee.c (tee): Only malloc and free the table of file descriptors ../old/sh-utils/ChangeLog.0:1178: * system.h, id.c, pathchk.c, tee.c: Change POSIX ifdefs to ../old/sh-utils/ChangeLog.0:1196: * env, id, nice, pathchk, stty, tee, tty, uname: Change usage ../old/sh-utils/ChangeLog.0:1205: * tee.c (main) [POSIX]: Use sigaction instead of signa [command output truncated] irectory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' gcc -g -O2 -o tee tee.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration 142 | eaccess (char const *file, int mode) | ^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/x86_64-linux-gnu/sys/param.h:28, from system.h:33, from test.c:41: /usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ test.c: In function 'eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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↓ 83 lines
Thought for 5s
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'
make all-recursive
make[1]: Entering directory '/home/peter/build/coreutils-5.0'
Making all in lib
make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib'
Making all in src
make[2]: Entering directory '/home/peter/build/coreutils-5.0/src'
make all-am
make[3]: Entering directory '/home/peter/build/coreutils-5.0/src'
if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \
-c -o test.o `test -f 'test.c' || echo './'`test.c; \
then mv ".deps/test.Tpo" ".deps/test.Po"; \
else rm -f ".deps/test.Tpo"; exit 1; \
fi
gcc -g -O2 -o users users.o ../lib/libfetish.a ../lib/libfetish.a -lm
gcc -g -O2 -o who who.o ../lib/libfetish.a ../lib/libfetish.a -lm
gcc -g -O2 -o uptime uptime.o ../lib/libfetish.a ../lib/libfetish.a -lm
gcc -g -O2 -o stty stty.o ../lib/libfetish.a ../lib/libfetish.a -lm
gcc -g -O2 -o df df.o ../lib/libfetish.a ../lib/libfetish.a -lm
gcc -g -O2 -o su su.o ../lib/libfetish.a ../lib/libfetish.a -lcrypt -lm
test.c: In function 'my_eaccess':
test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
160 | setreuid (euid, uid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
162 | setregid (egid, gid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
168 | setreuid (uid, euid);
| ^~~~~~~~~~~~~~~~~~~~
test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;]
170 | setregid (gid, egid);
| ^~~~~~~~~~~~~~~~~~~~
gcc -g -O2 -o test test.o ../lib/libfetish.a ../lib/libfetish.a -lm
make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src'
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src'
Making all in doc
make[2]: Entering directory '/home/peter/build/coreutils-5.0/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/doc'
Making all in man
make[2]: Entering directory '/home/peter/build/coreutils-5.0/man'
Updating man page tee.1
Updating man page test.1
/home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found
/home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found
WARNING: `help2man' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
`Help2man' package in order for those modifications to take
effect. You can get `Help2man' from any GNU archive site.
WARNING: `help2man' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
`Help2man' package in order for those modifications to take
effect. You can get `Help2man' from any GNU archive site.
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/man'
Making all in m4
make[2]: Entering directory '/home/peter/build/coreutils-5.0/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/m4'
Making all in po
make[2]: Entering directory '/home/peter/build/coreutils-5.0/po'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/peter/build/coreutils-5.0/po'
Making all in tests
make[2]: Entering directory '/home/peter/build/coreutils-5.0/tests'
Making all in basename
[command output truncated]
false
fmt
fold
groups
head
hostid
hostname
id
info
install
join
kill
lib
link
ln
logname
ls
man
md5sum
mkdir
mkfifo
mknod
mv
nice
nl
nohup
od
paste
pathchk
pinky
pr
printenv
printf
ptx
pwd
readlink
rm
rmdir
seq
sha1sum
share
shred
sleep
sort
split
stat
stty
sum
sync
tac
tail
tee
test
touch
tr
true
tsort
tty
uname
unexpand
uniq
unlink
uptime
users
vdir
wc
who
whoami
yes
↓
141 lines
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' make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi gcc -g -O2 -o users users.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o who who.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o uptime uptime.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o stty stty.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o df df.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o su su.o ../lib/libfetish.a ../lib/libfetish.a -lcrypt -lm test.c: In function 'my_eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ gcc -g -O2 -o test test.o ../lib/libfetish.a ../lib/libfetish.a -lm make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' Making all in doc make[2]: Entering directory '/home/peter/build/coreutils-5.0/doc' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/doc' Making all in man make[2]: Entering directory '/home/peter/build/coreutils-5.0/man' Updating man page tee.1 Updating man page test.1 /home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found /home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found WARNING: `help2man' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the `Help2man' package in order for those modifications to take effect. You can get `Help2man' from any GNU archive site. WARNING: `help2man' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the `Help2man' package in order for those modifications to take effect. You can get `Help2man' from any GNU archive site. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/man' Making all in m4 make[2]: Entering directory '/home/peter/build/coreutils-5.0/m4' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/m4' Making all in po make[2]: Entering directory '/home/peter/build/coreutils-5.0/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/po' Making all in tests make[2]: Entering directory '/home/peter/build/coreutils-5.0/tests' Making all in basename [command output truncated] false fmt fold groups head hostid hostname id info install join kill lib link ln logname ls man md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir seq sha1sum share shred sleep sort split stat stty sum sync tac tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes↓ 141 lines
Thought for 7s
Done — I built coreutils-5.0 and installed it under /home/peter/result, and created direct symlinks so each utility is available as /home/peter/result/<utility>.
What I did (summary of steps I ran in the build environment):
- Extracted /home/peter/coreutils.tar.gz into a build directory.
- Ran ./configure --prefix=/home/peter/result.
- Fixed build issues encountered:
- Added -lm to link the math library to resolve undefined floor() references.
- Renamed the local static function tee in tee.c to avoid conflict with the glibc tee() symbol.
- Renamed the local eaccess function in test.c to avoid conflicting declaration with the libc eaccess.
- Built the package (make -j$(nproc)) and ran make install-strip.
- Created symlinks in /home/peter/result so each installed executable (found anywhere under the result tree) is also linked as /home/peter/result/<utility>.
Verification:
- The installed directory /home/peter/result exists and contains many utilities (partial listing): false fmt fold groups head hostid hostname id install join kill ln logname ls md5sum mkdir mv nice nl nohup od paste pathchk pr printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort split stat stty sum tac tail tee test touch tr true tsort tty uname unexpand uniq uptime users wc who whoami yes ... (and others)
- Example: /home/peter/result/uptime points to the installed uptime binary.
If you want, I can:
- Show full ls -l output for /home/peter/result or a particular utility.
- Remove the temporary build tree (/home/peter/build) to reclaim space.
- Rebuild without modifying source (if you prefer the original source intact) and instead apply a more minimal patch or configure flags.
- sha1sum binary exists
- basename exists and --version works
- cat exists and --version works
- chgrp exists and --version works
- chmod exists and --version works
- chown exists and --version works
- chroot exists and --version works
- cksum exists and --version works
- comm exists and --version works
- cp exists and --version works
- csplit exists and --version works
- cut exists and --version works
- date exists and --version works
- dd exists and --version works
- df exists and --version works
- dir exists and --version works
- dircolors exists and --version works
- dirname exists and --version works
- du exists and --version works
- echo exists and --version works
- env exists and --version works
- expand exists and --version works
- expr exists and --version works
- factor exists and --version works
- false exists (skipping --version check)
- fmt exists and --version works
- fold exists and --version works
- groups exists and --version works
- head exists and --version works
- hostid exists and --version works
- id exists and --version works
- install exists and --version works
- join exists and --version works
- kill exists (skipping --version check)
- link exists and --version works
- ln exists and --version works
- logname exists and --version works
- ls exists and --version works
- md5sum exists and --version works
- mkdir exists and --version works
- mkfifo exists and --version works
- mknod exists and --version works
- mv exists and --version works
- nice exists and --version works
- nl exists and --version works
- nohup exists and --version works
- od exists and --version works
- paste exists and --version works
- pathchk exists and --version works
- pinky exists and --version works
- pr exists and --version works
- printenv exists and --version works
- printf exists (skipping --version check)
- ptx exists and --version works
- pwd exists (skipping --version check)
- readlink exists and --version works
- rm exists and --version works
- rmdir exists and --version works
- seq exists and --version works
- sha1sum exists and --version works
- shred exists and --version works
- sleep exists and --version works
- sort exists and --version works
- split exists and --version works
- stat exists and --version works
- stty exists and --version works
- sum exists and --version works
- sync exists and --version works
- tac exists and --version works
- tail exists and --version works
- tee exists and --version works
- test exists and --version works
- touch exists and --version works
- tr exists and --version works
- true exists and --version works
- tsort exists and --version works
- tty exists and --version works
- uname exists and --version works
- unexpand exists and --version works
- uniq exists and --version works
- unlink exists and --version works
- uptime exists and --version works
- users exists and --version works
- vdir exists and --version works
- wc exists and --version works
- who exists and --version works
- whoami exists and --version works
- yes exists and --version works
- sha1sum version matches expected
- sha1sum produced expected hash
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
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' Configuring in /home/peter/build/coreutils-5.0 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for perl5.003 or newer... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking whether gcc needs -traditional... no checking for ranlib... ranlib checking whether ln -s works... yes checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for uname... yes checking for chroot... yes checking for gethostid... yes checking for strerror in -lcposix... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for _LARGE_FILES value needed for large files... no checking for gcc option to accept ANSI C... none needed checking for function prototypes... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for inline... inline checking for working long double with more range or precision than double... no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking hurd.h usability... no checking hurd.h presence... no checking for hurd.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for memory.h... (cached) yes checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking mnttab.h usability... no checking mnttab.h [command output truncated] -linux-gnu/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from system.h:153, from tee.c:26: /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'} 429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len, | ^~~ test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration 142 | eaccess (char const *file, int mode) | ^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/x86_64-linux-gnu/sys/param.h:28, from system.h:33, from test.c:41: /usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tty.o -MD -MP -MF ".deps/tty.Tpo" \ -c -o tty.o `test -f 'tty.c' || echo './'`tty.c; \ then mv ".deps/tty.Tpo" ".deps/tty.Po"; \ else rm -f ".deps/tty.Tpo"; exit 1; \ fi test.c: In function 'eaccess': make[3]: *** [Makefile:1263: tee.o] Error 1 make[3]: *** Waiting for unfinished jobs.... test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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' grep: test.c: No such file or directory checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for perl5.003 or newer... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking whether gcc needs -traditional... no checking for ranlib... ranlib checking whether ln -s works... yes checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for uname... yes checking for chroot... yes checking for gethostid... yes checking for strerror in -lcposix... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for _LARGE_FILES value needed for large files... no checking for gcc option to accept ANSI C... none needed checking for function prototypes... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking for inline... inline checking for working long double with more range or precision than double... no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking hurd.h usability... no checking hurd.h presence... no checking for hurd.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for memory.h... (cached) yes checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking mnttab.h usability... no checking mnttab.h presenc [command output truncated] us declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ make[3]: *** [Makefile:1263: tee.o] Error 1 test.c: In function 'eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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 make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a /usr/bin/ld: seq.o: in function `get_width_format': /home/peter/build/coreutils-5.0/src/seq.c:253: undefined reference to `floor' /usr/bin/ld: /home/peter/build/coreutils-5.0/src/seq.c:259: undefined reference to `floor' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:1033: seq] Error 1 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 all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \ -c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \ then mv ".deps/tee.Tpo" ".deps/tee.Po"; \ else rm -f ".deps/tee.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT yes.o -MD -MP -MF ".deps/yes.Tpo" \ -c -o yes.o `test -f 'yes.c' || echo './'`yes.c; \ then mv ".deps/yes.Tpo" ".deps/yes.Po"; \ else rm -f ".deps/yes.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT uname.o -MD -MP -MF ".deps/uname.Tpo" \ -c -o uname.o `test -f 'uname.c' || echo './'`uname.c; \ then mv ".deps/uname.Tpo" ".deps/uname.Po"; \ else rm -f ".deps/uname.Tpo"; exit 1; \ fi gcc -g -O2 -o seq seq.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT chroot.o -MD -MP -MF ".deps/chroot.Tpo" \ -c -o chroot.o `test -f 'chroot.c' || echo './'`chroot.c; \ then mv ".deps/chroot.Tpo" ".deps/chroot.Po"; \ else rm -f ".deps/chroot.Tpo"; exit 1; \ fi if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT hostid.o -MD -MP -MF ".deps/hostid.Tpo" \ -c -o hostid.o `test -f 'hostid.c' || echo './'`hostid.c; \ then mv ".deps/hostid.Tpo" ".deps/hostid.Po"; \ else rm -f ".deps/hostid.Tpo"; exit 1; \ fi gcc -g -O2 -o whoami whoami.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. - [command output truncated] nused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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 make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT tee.o -MD -MP -MF ".deps/tee.Tpo" \ -c -o tee.o `test -f 'tee.c' || echo './'`tee.c; \ then mv ".deps/tee.Tpo" ".deps/tee.Po"; \ else rm -f ".deps/tee.Tpo"; exit 1; \ fi tee.c:35:12: error: conflicting types for 'tee'; have 'int(int, const char **)' 35 | static int tee (int nfiles, const char **files); | ^~~ In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from system.h:153, from tee.c:26: /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:429:18: note: previous declaration of 'tee' with type '__ssize_t(int, int, size_t, unsigned int)' {aka 'long int(int, int, long unsigned int, unsigned int)'} 429 | extern __ssize_t tee (int __fdin, int __fdout, size_t __len, | ^~~ make[3]: *** [Makefile:1263: tee.o] Error 1 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' ../AUTHORS:70:tee: Mike Parker, Richard M. Stallman, and David MacKenzie ../tests/misc/tty-eof:34: paste pr ptx sha1sum sort sum tac tee tail tsort ../old/sh-utils/ChangeLog:121: * src/su.c, src/tee.c, src/test.c, src/true.c, src/tty.c: Likewise. ../old/sh-utils/ChangeLog:438: * src/sleep.c, src/stty.c, src/su.c, src/tee.c, src/test.c, src/true.c, ../old/sh-utils/ChangeLog:573: * src/tee.c (full_write): Remove decl; not needed. ../old/sh-utils/ChangeLog:709: * src/printenv.c, src/sleep.c, src/tee.c, src/test.c, src/uptime.c, ../old/sh-utils/ChangeLog:1004: * src/tee.c (main): Remove incorrect `FIXME' comment. ../old/sh-utils/ChangeLog:1013: * src/tee.c (tee): Use SET_BINARY and SET_BINARY2. ../old/sh-utils/ChangeLog:1194: * src/tee.c: Likewise. Remove explicit close_stdout. ../old/sh-utils/ChangeLog:1823: * src/tee.c (tee): Convert from open/fds to using fopen/streams for ../old/sh-utils/ChangeLog:2027: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2135: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2257: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:2624: * src/tee.c: Likewise. ../old/sh-utils/ChangeLog:3701: * src/tee.c (main): Ignore SIGPIPE. ../old/sh-utils/ChangeLog:4367: pwd.c seq.c sleep.c stty.c su.c tee.c test.c tty.c uname.c ../old/sh-utils/ChangeLog:4388: sleep.c stty.c su.c tee.c test.c tty.c uname.c who-users.c whoami.c ../old/sh-utils/ChangeLog:4585: printf.c, pwd.c, seq.c, sleep.c, tee.c, test.c, tty.c, uname.c, ../old/sh-utils/NEWS:165:* tee no longer fails immediately upon receipt of SIGPIPE ../old/sh-utils/NEWS:222:* who and tee no longer fail gratuitously when continued after an ../old/sh-utils/ChangeLog.0:176: * tee.c (main, tee): More const dcls and casting. ../old/sh-utils/ChangeLog.0:205: * tee.c (main): Use _POSIX_SOURCE, not _POSIX_VERSION. ../old/sh-utils/ChangeLog.0:611: * tee.c (tee): A POSIX implementation of the read system call ../old/sh-utils/ChangeLog.0:614: (tee): Don't use xwrite. Use full_write instead and include the ../old/sh-utils/ChangeLog.0:796: stty.c, su.c, tee.c, test.c, tty.c, uname.c, who.c, whoami.c, ../old/sh-utils/ChangeLog.0:830: su.c, tee.c, test.c, true.sh, tty.c, uname.c, who.c, whoami.c, ../old/sh-utils/ChangeLog.0:869: tee.c, test.c, tty.c, uname.c, yes.c: Accept --help and --version ../old/sh-utils/ChangeLog.0:895: * tee.c (main): Put entire #ifdef inside if-braces to make structure ../old/sh-utils/ChangeLog.0:897: (main, tee): Compare close() != 0 rather than close () == -1. ../old/sh-utils/ChangeLog.0:990: * env.c, id.c, nice.c, pathchk.c, stty.c, su.c, tee.c, tty.c, ../old/sh-utils/ChangeLog.0:1127: * tee.c (tee): Only malloc and free the table of file descriptors ../old/sh-utils/ChangeLog.0:1178: * system.h, id.c, pathchk.c, tee.c: Change POSIX ifdefs to ../old/sh-utils/ChangeLog.0:1196: * env, id, nice, pathchk, stty, tee, tty, uname: Change usage ../old/sh-utils/ChangeLog.0:1205: * tee.c (main) [POSIX]: Use sigaction instead of signa [command output truncated] irectory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' gcc -g -O2 -o tee tee.o ../lib/libfetish.a ../lib/libfetish.a -lm if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi test.c:142:1: error: static declaration of 'eaccess' follows non-static declaration 142 | eaccess (char const *file, int mode) | ^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/x86_64-linux-gnu/sys/param.h:28, from system.h:33, from test.c:41: /usr/include/unistd.h:296:12: note: previous declaration of 'eaccess' with type 'int(const char *, int)' 296 | extern int eaccess (const char *__name, int __type) | ^~~~~~~ test.c: In function 'eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:1263: test.o] Error 1 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' make all-recursive make[1]: Entering directory '/home/peter/build/coreutils-5.0' Making all in lib make[2]: Entering directory '/home/peter/build/coreutils-5.0/lib' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/lib' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/home/peter/build/coreutils-5.0/lib' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/lib' Making all in src make[2]: Entering directory '/home/peter/build/coreutils-5.0/src' make all-am make[3]: Entering directory '/home/peter/build/coreutils-5.0/src' if gcc -DLOCALEDIR=\"/home/peter/result/share/locale\" -DSHAREDIR=\"/home/peter/result/share\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I../lib -I../lib -g -O2 -MT test.o -MD -MP -MF ".deps/test.Tpo" \ -c -o test.o `test -f 'test.c' || echo './'`test.c; \ then mv ".deps/test.Tpo" ".deps/test.Po"; \ else rm -f ".deps/test.Tpo"; exit 1; \ fi gcc -g -O2 -o users users.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o who who.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o uptime uptime.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o stty stty.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o df df.o ../lib/libfetish.a ../lib/libfetish.a -lm gcc -g -O2 -o su su.o ../lib/libfetish.a ../lib/libfetish.a -lcrypt -lm test.c: In function 'my_eaccess': test.c:160:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 160 | setreuid (euid, uid); | ^~~~~~~~~~~~~~~~~~~~ test.c:162:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 162 | setregid (egid, gid); | ^~~~~~~~~~~~~~~~~~~~ test.c:168:5: warning: ignoring return value of 'setreuid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 168 | setreuid (uid, euid); | ^~~~~~~~~~~~~~~~~~~~ test.c:170:5: warning: ignoring return value of 'setregid' declared with attribute 'warn_unused_result' [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Wunused-result]8;;] 170 | setregid (gid, egid); | ^~~~~~~~~~~~~~~~~~~~ gcc -g -O2 -o test test.o ../lib/libfetish.a ../lib/libfetish.a -lm make[3]: Leaving directory '/home/peter/build/coreutils-5.0/src' make[2]: Leaving directory '/home/peter/build/coreutils-5.0/src' Making all in doc make[2]: Entering directory '/home/peter/build/coreutils-5.0/doc' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/doc' Making all in man make[2]: Entering directory '/home/peter/build/coreutils-5.0/man' Updating man page tee.1 Updating man page test.1 /home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found /home/peter/build/coreutils-5.0/config/missing: line 46: help2man: command not found WARNING: `help2man' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the `Help2man' package in order for those modifications to take effect. You can get `Help2man' from any GNU archive site. WARNING: `help2man' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the `Help2man' package in order for those modifications to take effect. You can get `Help2man' from any GNU archive site. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/man' Making all in m4 make[2]: Entering directory '/home/peter/build/coreutils-5.0/m4' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/m4' Making all in po make[2]: Entering directory '/home/peter/build/coreutils-5.0/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/peter/build/coreutils-5.0/po' Making all in tests make[2]: Entering directory '/home/peter/build/coreutils-5.0/tests' Making all in basename [command output truncated] false fmt fold groups head hostid hostname id info install join kill lib link ln logname ls man md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir seq sha1sum share shred sleep sort split stat stty sum sync tac tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes