Package: src:hashrat
Version: 1.10.2-1
Severity: serious
Tags: ftbfs patch

Dear maintainer:

I tried to build this package in buster but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-arch
dh build-arch
   dh_update_autotools_config -a
   dh_autoreconf -a
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_configure -- --enable-xattr
        ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=\${prefix}/include --mandir=\${prefix}/share/man 
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu 
--libexecdir=\${prefix}/lib/x86_64-linux-gnu --runstatedir=/run 
--disable-maintainer-mode --disable-dependency-tracking --enable-xattr
checking for 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

[... snipped ...]

             ^~~~~~~~
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c Tokenizer.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c PatternMatch.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c URL.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c DataParser.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c ConnectionChain.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c OpenSSL.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c Process.c
Process.c: In function 'WritePidFile':
Process.c:131:13: warning: ignoring return value of 'ftruncate', declared with 
attribute warn_unused_result [-Wunused-result]
             ftruncate(fd,0);
             ^~~~~~~~~~~~~~~
Process.c:133:13: warning: ignoring return value of 'write', declared with 
attribute warn_unused_result [-Wunused-result]
             write(fd,Tempstr,StrLen(Tempstr));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process.c: In function 'ProcessContainer':
Process.c:428:9: warning: ignoring return value of 'chdir', declared with 
attribute warn_unused_result [-Wunused-result]
         chdir(Tempstr);
         ^~~~~~~~~~~~~~
Process.c:447:13: warning: ignoring return value of 'link', declared with 
attribute warn_unused_result [-Wunused-result]
             link(Value,GetBasename(Value));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process.c:455:13: warning: ignoring return value of 'link', declared with 
attribute warn_unused_result [-Wunused-result]
             link(Value,Value);
             ^~~~~~~~~~~~~~~~~
Process.c: In function 'ProcessApplyConfig':
Process.c:588:45: warning: ignoring return value of 'chdir', declared with 
attribute warn_unused_result [-Wunused-result]
         else if (strcasecmp(Name,"Dir")==0) chdir(Value);
                                             ^~~~~~~~~~~~
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c Encodings.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c RawData.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c SecureMem.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -c 
CommandLineParser.c
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security  -fPIC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_LIBC=1 -DHAVE_PTSNAME_R=1 
-DHAVE_LIBC=1 -DHAVE_UMOUNT2=1 -DHAVE_LIBC=1 -DHAVE_UMOUNT=1 -DHAVE_LIBC=1 
-DHAVE_MKOSTEMP=1 -DHAVE_LIBC=1 -DHAVE_XATTR=1 -DHAVE_MADVISE 
-DHAVE_MADVISE_NOFORK -DHAVE_MADVISE_DONTDUMP -DHAVE_MLOCK -shared -o 
libUseful-3.2.so String.o List.o Socket.o UnixSocket.o Stream.o Errors.o 
Unicode.o Terminal.o FileSystem.o GeneralFunctions.o DataProcessing.o Pty.o 
Log.o Http.o Smtp.o inet.o Expect.o base64.o  crc32.o md5c.o sha1.o sha2.o 
whirlpool.o jh_ref.o Hash.o Ssh.o Compression.o OAuth.o LibSettings.o Vars.o 
Time.o Markup.o SpawnPrograms.o Tokenizer.o PatternMatch.o URL.o DataParser.o 
ConnectionChain.o OpenSSL.o Process.o Encodings.o RawDa
 ta.o SecureMem.o CommandLineParser.o -lc -lc -lc -lc -lc  
ar rcs libUseful-3.2.a String.o List.o Socket.o UnixSocket.o Stream.o Errors.o 
Unicode.o Terminal.o FileSystem.o GeneralFunctions.o DataProcessing.o Pty.o 
Log.o Http.o Smtp.o inet.o Expect.o base64.o  crc32.o md5c.o sha1.o sha2.o 
whirlpool.o jh_ref.o Hash.o Ssh.o Compression.o OAuth.o LibSettings.o Vars.o 
Time.o Markup.o SpawnPrograms.o Tokenizer.o PatternMatch.o URL.o DataParser.o 
ConnectionChain.o OpenSSL.o Process.o Encodings.o RawData.o SecureMem.o 
CommandLineParser.o
ln -s libUseful-3.2.so libUseful-3.so &>/dev/null
ln -s libUseful-3.2.a libUseful-3.a &>/dev/null
ln -s libUseful-3.2.so libUseful.so &>/dev/null
ln -s libUseful-3.2.a libUseful.a &>/dev/null
make[2]: Leaving directory '/<<PKGBUILDDIR>>/libUseful-3'
gcc -pie -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" 
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_XATTR=1 -ohashrat 
common.o command-line-args.o ssh.o http.o fingerprint.o include-exclude.o 
files.o filesigning.o xattr.o cgi.o check-hash.o find.o memcached.o main.c 
libUseful-3/libUseful.a 
gcc: error: libUseful-3/libUseful.a: No such file or directory
make[1]: *** [Makefile:17: hashrat] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: make -j1 returned exit code 2
make: *** [debian/rules:7: build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit 
status 2
--------------------------------------------------------------------------------

The static library "libUseful-3/libUseful.a" is used in the final linking stage,
but such library is created in the background with & so it may or may not exist
at that moment. In the above build log, libUseful.a did not exist yet
and hence the "No such file or directory" error.

Additionally, the Makefile has a "-" prefix before each "ln -s" invocation, 
which is
a violation of Debian Policy 4.6, "Error trapping in makefiles":

https://www.debian.org/doc/debian-policy/ch-source.html#error-trapping-in-makefiles

Proposed patch below.

Thanks.

--- a/libUseful-3/Makefile.in
+++ b/libUseful-3/Makefile.in
@@ -10,10 +10,10 @@ OBJ=String.o List.o Socket.o UnixSocket.o Stream.o Errors.o 
Unicode.o Terminal.o
 all: $(OBJ)
        $(CC) $(FLAGS) -shared -o libUseful-$(VERSION).so $(OBJ) $(LIBS) 
        ar rcs libUseful-$(VERSION).a $(OBJ)
-       -ln -s libUseful-$(VERSION).so libUseful-3.so &>/dev/null
-       -ln -s libUseful-$(VERSION).a libUseful-3.a &>/dev/null
-       -ln -s libUseful-$(VERSION).so libUseful.so &>/dev/null
-       -ln -s libUseful-$(VERSION).a libUseful.a &>/dev/null
+       ln -s libUseful-$(VERSION).so libUseful-3.so
+       ln -s libUseful-$(VERSION).a libUseful-3.a
+       ln -s libUseful-$(VERSION).so libUseful.so
+       ln -s libUseful-$(VERSION).a libUseful.a
 
 
 String.o: String.h String.c

Reply via email to