Mock Version: 5.0 Mock Version: 5.0 Mock Version: 5.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec'], chrootPath='/var/lib/mock//dist-an23.3-riscv64-gcc14-build-473212-74119/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'FORCE_UNSAFE_CONFIGURE': '1'}shell=Falselogger=timeout=172800uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'FORCE_UNSAFE_CONFIGURE': '1'} and shell False Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1671667200 Wrote: /builddir/build/SRPMS/which-2.21-18.an23_rva23.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec'], chrootPath='/var/lib/mock//dist-an23.3-riscv64-gcc14-build-473212-74119/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'FORCE_UNSAFE_CONFIGURE': '1'}shell=Falselogger=timeout=172800uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'FORCE_UNSAFE_CONFIGURE': '1'} and shell False Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1671667200 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.p0FHzO + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf which-2.21 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/which-2.21.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd which-2.21 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/0001-which-2.21-coverity-fixes.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.j3QR3T + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd which-2.21 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + '[' '-flto=auto -ffat-lto-objectsx' '!=' x ']' ++ find . -type f -name configure -print + for file in $(find . -type f -name configure -print) + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\) = /__attribute__ ((used)) char (*f) () = /g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \(\*f\) \(\);/__attribute__ ((used)) char (*f) ();/g' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed -r --in-place=.backup 's/^char \$2 \(\);/__attribute__ ((used)) char \$2 ();/g' ./configure + diff -u ./configure.backup ./configure --- ./configure.backup 2015-03-20 12:30:07.000000000 -0400 +++ ./configure 2025-09-29 08:43:50.380410705 -0400 @@ -1817,7 +1817,7 @@ #ifdef __cplusplus extern "C" #endif -char $2 (); +__attribute__ ((used)) char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ + /usr/bin/sed --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\nint y = 0;\nint z;\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + /usr/bin/sed --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '\''s/^T .* \\(.*\\)$/extern int \\1();/p'\'' -e '\''s/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\''"#' ./configure + diff -u ./configure.backup ./configure + mv ./configure.backup ./configure + '[' 1 = 1 ']' +++ dirname ./configure ++ find . -name config.guess -o -name config.sub + '[' 1 = 1 ']' + '[' x '!=' 'x-Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld' ']' ++ find . -name ltmain.sh ++ dirname ./configure + /usr/lib/rpm/anolis/force-as-needed-for-shared-lib-in-libtool . Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html) + /usr/lib/rpm/anolis/fix-libtool-ltmain-from-overlinking ++ dirname ./configure + /usr/lib/rpm/anolis/fix-libtool-from-moving-options-after-libs . + /usr/lib/rpm/anolis/fix-dlsearch-path-in-libtool . lib64 + ./configure --build=riscv64-Anolis-linux --host=riscv64-Anolis-linux --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for riscv64-Anolis-linux-gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... no 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 whether it is safe to define __EXTENSIONS__... yes checking for xmalloc in libiberty.a... no checking for ANSI C header files... (cached) no checking for unistd.h... (cached) yes checking for string.h... (cached) yes checking libiberty.h usability... no checking libiberty.h presence... no checking for libiberty.h... no checking whether stat file-mode macros are broken... no checking for an ANSI C-conforming const... yes checking for size_t... yes checking for uid_t in sys/types.h... yes checking type of array argument to getgroups... gid_t checking for strchr... yes checking for memcpy... yes checking for getopt_long... yes checking for getcwd... yes checking for getwd... yes checking for sysconf... yes checking for getgroups... yes checking for eaccess... yes checking for ar... ar checking for riscv64-Anolis-linux-ranlib... no checking for ranlib... ranlib checking for stdlib.h... (cached) yes checking for memory.h... (cached) yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking for strings.h... (cached) yes checking for getpwent... yes checking for getpwnam... yes checking for getpwuid... yes checking whether programs are able to redeclare getpw functions... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating maintMakefile config.status: creating tilde/Makefile config.status: creating config.h config.status: executing depfiles commands + /usr/bin/make -O -j64 V=1 VERBOSE=1 /usr/bin/make all-recursive Making all in tilde make[2]: Entering directory '/builddir/build/BUILD/which-2.21/tilde' gcc -DHAVE_CONFIG_H -I. -I.. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o shell.o shell.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21/tilde' make[2]: Entering directory '/builddir/build/BUILD/which-2.21/tilde' gcc -DHAVE_CONFIG_H -I. -I.. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o tilde.o tilde.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21/tilde' make[2]: Entering directory '/builddir/build/BUILD/which-2.21/tilde' rm -f libtilde.a ar cru libtilde.a tilde.o shell.o ranlib libtilde.a make[2]: Leaving directory '/builddir/build/BUILD/which-2.21/tilde' Making all in . make[2]: Entering directory '/builddir/build/BUILD/which-2.21' gcc -DHAVE_CONFIG_H -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o getopt1.o getopt1.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21' make[2]: Entering directory '/builddir/build/BUILD/which-2.21' gcc -DHAVE_CONFIG_H -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o getopt.o getopt.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21' make[2]: Entering directory '/builddir/build/BUILD/which-2.21' gcc -DHAVE_CONFIG_H -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o bash.o bash.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21' bash.c: In function 'uidget': bash.c:76:30: error: implicit declaration of function 'free' [-Wimplicit-function-declaration] 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:89:7: note: in expansion of macro 'FREE' 89 | FREE (current_user.user_name); | ^~~~ bash.c:27:1: note: include '' or provide a declaration of 'free' 26 | #include "bash.h" +++ |+#include 27 | bash.c:76:30: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:89:7: note: in expansion of macro 'FREE' 89 | FREE (current_user.user_name); | ^~~~ bash.c:76:30: note: include '' or provide a declaration of 'free' 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:89:7: note: in expansion of macro 'FREE' 89 | FREE (current_user.user_name); | ^~~~ bash.c:76:30: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:90:7: note: in expansion of macro 'FREE' 90 | FREE (current_user.shell); | ^~~~ bash.c:76:30: note: include '' or provide a declaration of 'free' 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:90:7: note: in expansion of macro 'FREE' 90 | FREE (current_user.shell); | ^~~~ bash.c:76:30: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:91:7: note: in expansion of macro 'FREE' 91 | FREE (current_user.home_dir); | ^~~~ bash.c:76:30: note: include '' or provide a declaration of 'free' 76 | #define FREE(s) do { if (s) free (s); } while (0) | ^~~~ bash.c:91:7: note: in expansion of macro 'FREE' 91 | FREE (current_user.home_dir); | ^~~~ bash.c: In function 'substring': bash.c:347:3: error: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration] 347 | memcpy (result, string + start, len); | ^~~~~~ bash.c:27:1: note: include '' or provide a declaration of 'memcpy' 26 | #include "bash.h" +++ |+#include 27 | bash.c:347:3: warning: incompatible implicit declaration of built-in function 'memcpy' [-Wbuiltin-declaration-mismatch] 347 | memcpy (result, string + start, len); | ^~~~~~ bash.c:347:3: note: include '' or provide a declaration of 'memcpy' bash.c: In function 'extract_colon_unit': bash.c:365:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 365 | len = strlen (string); | ^~~~~~ bash.c:365:9: note: include '' or provide a declaration of 'strlen' bash.c:365:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] bash.c:365:9: note: include '' or provide a declaration of 'strlen' bash.c: In function 'get_next_path_element': bash.c:415:7: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 415 | free (path); | ^~~~ bash.c:415:7: note: include '' or provide a declaration of 'free' In file included from bash.c:26: bash.h:12:31: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.h:12:31: note: include '' or provide a declaration of 'strcpy' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.h:12:31: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.h:12:31: note: include '' or provide a declaration of 'strcpy' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.h:12:50: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.h:12:50: note: include '' or provide a declaration of 'strlen' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:416:14: note: in expansion of macro 'savestring' 416 | path = savestring ("."); | ^~~~~~~~~~ bash.c: In function 'make_full_pathname': bash.c:431:14: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 431 | path_len = strlen (path); | ^~~~~~ bash.c:431:14: note: include '' or provide a declaration of 'strlen' bash.c:433:3: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 433 | strcpy (full_path, path); | ^~~~~~ bash.c:433:3: note: include '' or provide a declaration of 'strcpy' bash.c: In function 'get_current_user_info': bash.h:12:31: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:455:36: note: in expansion of macro 'savestring' 455 | current_user.user_name = savestring (entry->pw_name); | ^~~~~~~~~~ bash.h:12:31: note: include '' or provide a declaration of 'strcpy' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:455:36: note: in expansion of macro 'savestring' 455 | current_user.user_name = savestring (entry->pw_name); | ^~~~~~~~~~ bash.h:12:50: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:455:36: note: in expansion of macro 'savestring' 455 | current_user.user_name = savestring (entry->pw_name); | ^~~~~~~~~~ bash.h:12:50: note: include '' or provide a declaration of 'strlen' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:455:36: note: in expansion of macro 'savestring' 455 | current_user.user_name = savestring (entry->pw_name); | ^~~~~~~~~~ bash.h:12:31: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:464:36: note: in expansion of macro 'savestring' 464 | current_user.user_name = savestring (current_user.user_name); | ^~~~~~~~~~ bash.h:12:31: note: include '' or provide a declaration of 'strcpy' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:464:36: note: in expansion of macro 'savestring' 464 | current_user.user_name = savestring (current_user.user_name); | ^~~~~~~~~~ bash.h:12:50: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:464:36: note: in expansion of macro 'savestring' 464 | current_user.user_name = savestring (current_user.user_name); | ^~~~~~~~~~ bash.h:12:50: note: include '' or provide a declaration of 'strlen' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ bash.c:464:36: note: in expansion of macro 'savestring' 464 | current_user.user_name = savestring (current_user.user_name); | ^~~~~~~~~~ bash.c: In function 'sh_get_env_value': bash.c:475:10: error: implicit declaration of function 'getenv' [-Wimplicit-function-declaration] 475 | return getenv(v); | ^~~~~~ bash.c:475:10: note: 'getenv' is defined in header ''; this is probably fixable by adding '#include ' bash.c:475:10: error: returning 'int' from a function with return type 'char *' makes pointer from integer without a cast [-Wint-conversion] 475 | return getenv(v); | ^~~~~~~~~ make[2]: *** [Makefile:524: bash.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Entering directory '/builddir/build/BUILD/which-2.21' gcc -DHAVE_CONFIG_H -I. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -march=rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb_zfa_zawrs -mabi=lp64d -c -o which.o which.c make[2]: Leaving directory '/builddir/build/BUILD/which-2.21' which.c: In function 'find_command_in_path': which.c:82:14: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 82 | name_len = strlen(name); | ^~~~~~ which.c:25:1: note: include '' or provide a declaration of 'strlen' 24 | #include "bash.h" +++ |+#include 25 | which.c:82:14: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 82 | name_len = strlen(name); | ^~~~~~ which.c:82:14: note: include '' or provide a declaration of 'strlen' which.c:92:7: error: implicit declaration of function 'free' [-Wimplicit-function-declaration] 92 | free(abs_path); | ^~~~ which.c:25:1: note: include '' or provide a declaration of 'free' 24 | #include "bash.h" +++ |+#include 25 | which.c:92:7: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 92 | free(abs_path); | ^~~~ which.c:92:7: note: include '' or provide a declaration of 'free' which.c:97:7: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] 97 | strcpy(abs_path, "./"); | ^~~~~~ which.c:97:7: note: include '' or provide a declaration of 'strcpy' which.c:97:7: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] which.c:97:7: note: include '' or provide a declaration of 'strcpy' which.c:98:7: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration] 98 | strcat(abs_path, name); | ^~~~~~ which.c:98:7: note: include '' or provide a declaration of 'strcat' which.c:98:7: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch] which.c:98:7: note: include '' or provide a declaration of 'strcat' which.c:103:7: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 103 | strcpy(abs_path, name); | ^~~~~~ which.c:103:7: note: include '' or provide a declaration of 'strcpy' In file included from which.c:24: bash.h:12:31: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ which.c:118:14: note: in expansion of macro 'savestring' 118 | path = savestring(path_list); | ^~~~~~~~~~ bash.h:12:31: note: include '' or provide a declaration of 'strcpy' 12 | #define savestring(x) (char *)strcpy(xmalloc(1 + strlen (x)), (x)) | ^~~~~~ which.c:118:14: note: in expansion of macro 'savestring' 118 | path = savestring(path_list); | ^~~~~~~~~~ which.c:130:7: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 130 | free(path); | ^~~~ which.c:130:7: note: include '' or provide a declaration of 'free' which.c:142:7: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 142 | free(path); | ^~~~ which.c:142:7: note: include '' or provide a declaration of 'free' which.c:149:5: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 149 | free(path); | ^~~~ which.c:149:5: note: include '' or provide a declaration of 'free' which.c: In function 'get_current_working_directory': which.c:176:23: error: implicit declaration of function 'getenv' [-Wimplicit-function-declaration] 176 | const char *pwd = getenv("PWD"); | ^~~~~~ which.c:176:23: note: 'getenv' is defined in header ''; this is probably fixable by adding '#include ' which.c:176:23: error: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] which.c:177:16: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 177 | if (pwd && strlen(pwd) < sizeof(cwd)) | ^~~~~~ which.c:177:16: note: include '' or provide a declaration of 'strlen' which.c:178:7: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 178 | strcpy(cwd, pwd); | ^~~~~~ which.c:178:7: note: include '' or provide a declaration of 'strcpy' which.c:184:5: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 184 | exit(-1); | ^~~~ which.c:184:5: note: include '' or provide a declaration of 'exit' which.c:184:5: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] which.c:184:5: note: include '' or provide a declaration of 'exit' which.c:187:12: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 187 | cwdlen = strlen(cwd); | ^~~~~~ which.c:187:12: note: include '' or provide a declaration of 'strlen' which.c: In function 'path_clean_up': which.c:208:5: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 208 | strcpy(result, cwd); | ^~~~~~ which.c:208:5: note: include '' or provide a declaration of 'strcpy' which.c:230:11: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 230 | strcpy(result, path); | ^~~~~~ which.c:230:11: note: include '' or provide a declaration of 'strcpy' which.c: In function 'func_search': which.c:268:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] 268 | if (!strcmp(functions[i].name, cmd)) | ^~~~~~ which.c:268:10: note: include '' or provide a declaration of 'strcmp' which.c: In function 'path_search': which.c:305:54: error: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration] 305 | int in_home = (show_tilde || skip_tilde) && !strncmp(full_path, home, homelen); | ^~~~~~~ which.c:305:54: note: include '' or provide a declaration of 'strncmp' which.c:318:13: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 318 | free(result); | ^~~~ which.c:318:13: note: include '' or provide a declaration of 'free' which.c:328:9: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 328 | free(result); | ^~~~ which.c:328:9: note: include '' or provide a declaration of 'free' which.c: In function 'process_alias': which.c:347:28: warning: 'strncmp' argument 3 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 347 | if (!strncmp("alias", p, 5)) | ^ : note: built-in 'strncmp' declared here which.c:359:26: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 359 | if (!*argv || len != strlen(*argv) || strncmp(*argv, &p[-len], len)) | ^~~~~~ which.c:359:26: note: include '' or provide a declaration of 'strlen' which.c:359:68: warning: 'strncmp' argument 3 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 359 | if (!*argv || len != strlen(*argv) || strncmp(*argv, &p[-len], len)) | ^~~ : note: built-in 'strncmp' declared here which.c:387:7: error: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration] 387 | strncpy(cmd, &p[-len], len); | ^~~~~~~ which.c:387:7: note: include '' or provide a declaration of 'strncpy' which.c:387:7: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch] which.c:387:7: note: include '' or provide a declaration of 'strncpy' which.c:395:7: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch] 395 | free(cmd); | ^~~~ which.c:395:7: note: include '' or provide a declaration of 'free' which.c: In function 'main': which.c:432:27: error: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 432 | const char *path_list = getenv("PATH"); | ^~~~~~ which.c:513:13: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 513 | if (!(h = getenv("HOME"))) | ^ which.c:516:5: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch] 516 | strncpy(home, h, sizeof(home)); | ^~~~~~~ which.c:516:5: note: include '' or provide a declaration of 'strncpy' which.c:518:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 518 | homelen = strlen(home); | ^~~~~~ which.c:518:15: note: include '' or provide a declaration of 'strlen' which.c:521:7: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch] 521 | strcat(home, "/"); | ^~~~~~ which.c:521:7: note: include '' or provide a declaration of 'strcat' which.c:570:25: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 570 | char *p = buf + strlen(buf) - 1; | ^~~~~~ which.c:570:25: note: include '' or provide a declaration of 'strlen' which.c:576:67: warning: 'strncmp' argument 3 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 576 | function_start_has_declare = (strncmp("declare -", buf, 9) == 0); | ^ : note: built-in 'strncmp' declared here which.c:594:40: warning: 'strncmp' argument 3 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 594 | if (!strncmp("declare -", buf, 9)) | ^ : note: built-in 'strncmp' declared here which.c:601:34: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 601 | aliases[alias_count++] = strcpy((char *)xmalloc(strlen(buf) + 1), buf); | ^~~~~~ which.c:601:34: note: include '' or provide a declaration of 'strcpy' which.c:601:57: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 601 | aliases[alias_count++] = strcpy((char *)xmalloc(strlen(buf) + 1), buf); | ^~~~~~ which.c:601:57: note: include '' or provide a declaration of 'strlen' which.c:630:9: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch] 630 | strncpy(function->name, &p[-len], len); | ^~~~~~~ which.c:630:9: note: include '' or provide a declaration of 'strncpy' which.c:638:25: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch] 638 | size_t blen = strlen(buf); | ^~~~~~ which.c:638:25: note: include '' or provide a declaration of 'strlen' which.c:639:53: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 639 | function->lines[function->line_count++] = strcpy((char *)xmalloc(blen + 1), buf); | ^~~~~~ which.c:639:53: note: include '' or provide a declaration of 'strcpy' which.c: In function 'xmalloc': which.c:681:15: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 681 | void *ptr = malloc(size); | ^~~~~~ which.c:681:15: note: include '' or provide a declaration of 'malloc' which.c:681:15: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch] which.c:681:15: note: include '' or provide a declaration of 'malloc' which.c:685:5: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 685 | exit(-1); | ^~~~ which.c:685:5: note: include '' or provide a declaration of 'exit' which.c: In function 'xrealloc': which.c:694:9: error: implicit declaration of function 'realloc' [-Wimplicit-function-declaration] 694 | ptr = realloc(ptr, size); | ^~~~~~~ which.c:694:9: note: include '' or provide a declaration of 'realloc' which.c:694:9: warning: incompatible implicit declaration of built-in function 'realloc' [-Wbuiltin-declaration-mismatch] which.c:694:9: note: include '' or provide a declaration of 'realloc' which.c:698:5: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 698 | exit(-1); | ^~~~ which.c:698:5: note: include '' or provide a declaration of 'exit' make[2]: *** [Makefile:524: which.o] Error 1 RPM build errors: make[1]: *** [Makefile:743: all-recursive] Error 1 make: *** [Makefile:406: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.j3QR3T (%build) Bad exit status from /var/tmp/rpm-tmp.j3QR3T (%build) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/which.spec