When testing dd-rescue on arm64, I noticed that the build tries to use git, but fails. The package still install ok and works as expected. gentoo-aarch64 /var/db/repos/gentoo/sys-fs/dd-rescue # ebuild dd-rescue-1.99.13-r1.ebuild merge * dd_rescue-1.99.13.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking dd_rescue-1.99.13.tar.bz2 to /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work >>> Source unpacked in /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work >>> Preparing source in /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work/dd_rescue-1.99.13 ... * Applying dd-rescue-1.99.13-musl.patch ... [ ok ] * Running eautoreconf in '/var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work/dd_rescue-1.99.13' ... * Running 'aclocal --system-acdir=/var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/temp/aclocal' ... [ ok ] * Running 'autoconf --force' ... [ ok ] * Running 'autoheader' ... [ ok ] * Running elibtoolize in: dd_rescue-1.99.13/ >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work/dd_rescue-1.99.13 ... * econf: updating dd_rescue-1.99.13/config.guess with /usr/share/gnuconfig/config.guess * econf: updating dd_rescue-1.99.13/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --docdir=/usr/share/doc/dd-rescue-1.99.13-r1 --htmldir=/usr/share/doc/dd-rescue-1.99.13-r1/html --libdir=/usr/lib64 checking for aarch64-unknown-linux-gnu-gcc... aarch64-unknown-linux-gnu-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether aarch64-unknown-linux-gnu-gcc accepts -g... yes checking for aarch64-unknown-linux-gnu-gcc option to enable C11 features... none neededchecking for an ANSI C-conforming const... yes checking for inline... inline checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for fallocate.h... no checking for dlfcn.h... yes checking for unistd.h... (cached) yes checking for sys/xattr.h... yes checking for attr/xattr.h... (cached) yes checking for sys/acl.h... yes checking for sys/ioctl.h... yes checking for sys/reg.h... no checking for endian.h... yes checking for linux/fs.h... yes checking for linux/fiemap.h... yes checking for stdint.h... (cached) yes checking for lzo/lzo1x.h... (cached) no checking for openssl/evp.h... (cached) no checking for linux/random.h... yes checking for sys/random.h... yes checking for malloc.h... yes checking for sched.h... yes checking for sys/statvfs.h... yes checking for sys/resource.h... yes checking for sys/endian.h... no checking for linux/swab.h... yes checking for ffs... yes checking for ffsl... yes checking for basename... yes checking for fallocate64... yes checking for splice... yes checking for getopt_long... yes checking for open64... yes checking for pread... yes checking for pread64... yes checking for lseek64... yes checking for stat64... yes checking for posix_fadvise... yes checking for posix_fadvise64... yes checking for __builtin_prefetch... no checking for htonl... yes checking for htobe64... no checking for feof_unlocked... yes checking for getline... yes checking for getentropy... yes checking for getrandom... yes checking for posix_memalign... yes checking for valloc... yes checking for sched_yield... yes checking for fstatvfs... yes checking for __builtin_cpu_supports... no checking for getrlimit... yes checking for aligned_alloc... yes checking for dlsym in -ldl... yes checking for linux_fallocate64 in -lfallocate... no checking for lzo1x_1_compress in -llzo2... (cached) no checking for EVP_aes_192_ctr in -lcrypto... (cached) no checking if aarch64-unknown-linux-gnu-gcc supports -mavx... no checking if aarch64-unknown-linux-gnu-gcc supports -mrdrnd... no checking if aarch64-unknown-linux-gnu-gcc supports -maes... no checking whether asm rep nop is supported... yes checking whether asm lfence is supported... yes checking whether aligned_alloc works... yes checking whether valloc has been declared... no checking whether unaligned int reads are handled... yes configure: creating ./config.status config.status: creating config.h >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/work/dd_rescue-1.99.13 ... make -j4 -l6 MACH=aarch64 OS=Linux HAVE_SSE42=0 HAVE_AVX2=0 'RPM_OPT_FLAGS=-O2 -pipe -march=armv8-a ' CFLAGS_OPT=$(CFLAGS) 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/usr/lib64/dd-rescue' CC=aarch64-unknown-linux-gnu-gcc #aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DGEN_DEP -march=armv8-a+crypto -MM ./*.c >.dep aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DGEN_DEP -D__AES__ -D__SSE4_1__ -D__SSSE3__ -D__SSE3__ -D__SSE2__ -D__SSE__ -D__MMX__ -DNO_WARN_X86_INTRINSICS -I . -MM ./*.c >.dep sed 's/\.o:/\.po:/' <.dep >.dep2 cat .dep2 >> .dep rm .dep2 /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIE -c random.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIE -c find_nonzero.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIE -c fstrim.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -march=armv8-a+crypto -fPIE -c find_nonzero_arm64.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o libddr_hash.po -c libddr_hash.c In file included from ddr_plugin.h:24, from libddr_hash.c:17: ddr_ctrl.h:10: warning: "_GNU_SOURCE" redefined 10 | #define _GNU_SOURCE | libddr_hash.c:11: note: this is the location of the previous definition 11 | # define _GNU_SOURCE 1 | aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -o md5.po -c md5.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -o sha256.po -c sha256.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -o sha512.po -c sha512.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -o sha1.po -c sha1.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o pbkdf2.po -c pbkdf2.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o checksum_file.po -c checksum_file.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o libddr_null.po -c libddr_null.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o libddr_crypt.po -c libddr_crypt.c In file included from ddr_plugin.h:24, from libddr_crypt.c:16: ddr_ctrl.h:10: warning: "_GNU_SOURCE" redefined 10 | #define _GNU_SOURCE | libddr_crypt.c:10: note: this is the location of the previous definition 10 | # define _GNU_SOURCE 1 | In file included from find_nonzero.h:13, from libddr_crypt.c:18: ffs.h:19: warning: "_GNU_SOURCE" redefined 19 | #define _GNU_SOURCE 1 | In file included from libddr_crypt.c:17: ddr_ctrl.h:10: note: this is the location of the previous definition 10 | #define _GNU_SOURCE | aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -O2 -fPIC -o aes.po -c aes.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -o aes_c.po -c aes_c.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIC -O3 -march=armv8-a+crypto -c aes_arm64.c -o aes_arm64.po /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o pbkdf_ossl.po -c pbkdf_ossl.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o secmem.po -c secmem.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" -fPIC -o random.po -c random.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -Wl,-O1 -Wl,--as-needed -Wl,-rpath,/usr/lib64/dd-rescue -shared -o libddr_hash.so libddr_hash.po md5.po sha256.po sha512.po sha1.po pbkdf2.po checksum_file.po aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -Wl,-O1 -Wl,--as-needed -Wl,-rpath,/usr/lib64/dd-rescue -shared -o libddr_null.so libddr_null.po aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -Wl,-O1 -Wl,--as-needed -Wl,-rpath,/usr/lib64/dd-rescue -shared -o libddr_crypt.so libddr_crypt.po aes.po aes_c.po aes_arm64.po pbkdf2.po sha256.po pbkdf_ossl.po md5.po checksum_file.po secmem.po random.po ln -sf libddr_hash.so libddr_MD5.so aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIE -c fmt_no.c aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIE -c frandom.c /bin/bash: line 1: git: command not found aarch64-unknown-linux-gnu-gcc -O2 -pipe -march=armv8-a -DHAVE_CONFIG_H -I . -DHAVE_AES_ARM64 -fPIE -pie -DVERSION=\"1.99.13\" -D__COMPILER__="\"aarch64-unknown-linux-gnu-gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826\"" -DID=\"DD_RESCUE_1_99_13\" dd_rescue.c -o dd_rescue random.o frandom.o fmt_no.o find_nonzero.o fstrim.o find_nonzero_arm64.o -Wl,-O1 -Wl,--as-needed -Wl,-rpath,/usr/lib64/dd-rescue -ldl -rdynamic In file included from dd_rescue.c:117: fmt_no.h:2: warning: "_GNU_SOURCE" redefined 2 | #define _GNU_SOURCE | dd_rescue.c:69: note: this is the location of the previous definition 69 | # define _GNU_SOURCE 1 | In file included from find_nonzero.h:13, from dd_rescue.c:118: ffs.h:19: warning: "_GNU_SOURCE" redefined 19 | #define _GNU_SOURCE 1 | fmt_no.h:2: note: this is the location of the previous definition 2 | #define _GNU_SOURCE | In file included from dd_rescue.c:120: fstrim.h:1: warning: "_GNU_SOURCE" redefined 1 | #define _GNU_SOURCE | ffs.h:19: note: this is the location of the previous definition 19 | #define _GNU_SOURCE 1 | >>> Source compiled. >>> Test phase [not enabled]: sys-fs/dd-rescue-1.99.13-r1 >>> Install sys-fs/dd-rescue-1.99.13-r1 into /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/image >>> Completed installing sys-fs/dd-rescue-1.99.13-r1 into /var/tmp/portage/sys-fs/dd-rescue-1.99.13-r1/image * Final size of build directory: 2568 KiB (2.5 MiB) * Final size of installed tree: 404 KiB * QA Notice: command not found: * * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found * /bin/bash: line 1: git: command not found strip: aarch64-unknown-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version /usr/bin/dd_rescue /usr/lib64/dd-rescue/libddr_crypt.so /usr/lib64/dd-rescue/libddr_null.so /usr/lib64/dd-rescue/libddr_hash.so * checking 7 files for package collisions >>> Merging sys-fs/dd-rescue-1.99.13-r1 to / --- /usr/ --- /usr/bin/ >>> /usr/bin/dd_rescue --- /usr/share/ --- /usr/share/doc/ --- /usr/share/doc/dd-rescue-1.99.13-r1/ === /usr/share/doc/dd-rescue-1.99.13-r1/README.dd_rescue.bz2 --- /usr/share/man/ --- /usr/share/man/man1/ === /usr/share/man/man1/dd_rescue.1.bz2 --- /usr/lib64/ --- /usr/lib64/dd-rescue/ === /usr/lib64/dd-rescue/libddr_null.so === /usr/lib64/dd-rescue/libddr_crypt.so >>> /usr/lib64/dd-rescue/libddr_MD5.so -> libddr_hash.so === /usr/lib64/dd-rescue/libddr_hash.so >>> Safely unmerging already-installed instance... No package files given... Grabbing a set. --- replaced obj /usr/share/man/man1/dd_rescue.1.bz2 --- replaced dir /usr/share/man/man1 --- replaced dir /usr/share/man --- replaced obj /usr/share/doc/dd-rescue-1.99.13-r1/README.dd_rescue.bz2 --- replaced dir /usr/share/doc/dd-rescue-1.99.13-r1 --- replaced dir /usr/share/doc --- replaced dir /usr/share --- replaced obj /usr/lib64/dd-rescue/libddr_null.so --- replaced obj /usr/lib64/dd-rescue/libddr_hash.so --- replaced obj /usr/lib64/dd-rescue/libddr_crypt.so --- replaced sym /usr/lib64/dd-rescue/libddr_MD5.so --- replaced dir /usr/lib64/dd-rescue --- replaced dir /usr/lib64 --- replaced obj /usr/bin/dd_rescue --- replaced dir /usr/bin --- replaced dir /usr >>> Original instance of package unmerged safely. >>> sys-fs/dd-rescue-1.99.13-r1 merged.
From the upstream Makefile: ``` ID = $(shell git describe --tags || cat REL-ID) DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DID=\"$(ID)\" # -DPLUGSEARCH="\"$(LIBDIR)\"" ``` This could be done a lot more elegantly... at the very least it should silence the error message when git is not installed. But yes, it is harmless.