ResistancePlatform / resistance-miner

Resistance Miner
Other
13 stars 7 forks source link

Debian packaging modifies compile flags - blocker? #12

Closed adrelanos closed 5 years ago

adrelanos commented 5 years ago

This is how Debian packaging modifies compile time flags.

compilation original:

gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -O2 -fomit-frame-pointer -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c

compilation during Debian package build:

gcc -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/resistance-miner-2.5.0.res3=. -fstack-protector-strong -Wformat -Werror=format-security -c -o dump.o dump.c

I currently can't figure out how to prevent Debian packaging from doing this.

Is this a blocker for package release?

adrelanos commented 5 years ago

A hacky solution would be to remove resistance-miner Makefile to (easily in standard way) to overwrite compile flags.

Perhaps if only if make variable really_overwrite=true is set, allow overwriting make variables?

adrelanos commented 5 years ago

dpkg source code file scripts/Dpkg/Vendor/Debian.pm defines this.

Or when installed the responsible code is here: /usr/share/perl5/Dpkg/Vendor/Debian.pm

adrelanos commented 5 years ago

Made little progress using:

export DEB_BUILD_MAINT_OPTIONS = hardening=-all qa=-bug,-canary reproducible=-fixdebugpath,-timeless

Which results in the following compile parameters during Debian package build:

gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread   -g -O2 -specs=/usr/share/dpkg/no-pie-compile.specs -c -o minerd-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c

Not easy to tell Debian packaging "don't touch compile flags at all".

https://manpages.debian.org/buster/dpkg-dev/dpkg-buildflags.1.en.html

adrelanos commented 5 years ago

By looking at /usr/share/perl5/Dpkg/Vendor/Debian.pm I don't think -specs=/usr/share/dpkg/no-pie-compile.specs can be removed - unless we invent our own dpkg vendor pm file. (Similar to /usr/share/perl5/Dpkg/Vendor/Debian.pm.) Which I cannot do. And which requires significant perl programming skills.

It's also not clear to me what removes omit-frame-pointer.

adrelanos commented 5 years ago

Not a great solution maybe but I managed to readd -fomit-frame-pointer using:

export DEB_CFLAGS_MAINT_APPEND = -fomit-frame-pointer
solardiz commented 5 years ago

I'll consider and maybe experiment with overriding gcc flags using #pragma from within yespower-opt.c.

adrelanos commented 5 years ago

This is what I have now.

original: gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -O2 -fomit-frame-pointer -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c

Debian packaging: gcc -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -O2 -fomit-frame-pointer -c -o dump.o dump.c

Is this good enough or still a blocker for release?

solardiz commented 5 years ago

This is good enough, assuming it's also the flags used on yespower-opt.c.

adrelanos commented 5 years ago

Looks like. Excerpt:

gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o yespower/minerd-yespower-opt.o `test -f 'yespower/yespower-opt.c' || echo './'`yespower/yespower-opt.c

Full build log:

/usr/share/genmkfile/make-helper.bsh deb-pkg
/usr/share/genmkfile/make-helper-one.bsh: INFO: deb-cleanup
/usr/share/genmkfile/make-helper-one.bsh: INFO: no target 'make clean', ok.
/usr/share/genmkfile/make-helper-one.bsh: INFO: dist
/usr/share/genmkfile/make-helper-one.bsh: INFO: debdist
/usr/share/genmkfile/make-helper-one.bsh: INFO: debdsc
dpkg-source: info: using source format '3.0 (custom)'
dpkg-source: info: building resistance-miner in resistance-miner_2.5.0.res3-1.dsc
/usr/share/genmkfile/make-helper-one.bsh: INFO: deb-pkg-build
I: Copying COW directory
I: forking: rm -rf /var/cache/pbuilder/cow.cow_amd64/cow.22305
I: forking: cp -al /var/cache/pbuilder/base.cow_amd64 /var/cache/pbuilder/cow.cow_amd64/cow.22305
I: removed stale ilistfile /var/cache/pbuilder/cow.cow_amd64/cow.22305/.ilist
I: forking: chroot /var/cache/pbuilder/cow.cow_amd64/cow.22305 cowdancer-ilistcreate /.ilist 'find . -xdev -path ./home -prune -o \( \( -type l -o -type f \) -a -links +1 -print0 \) | xargs -0 stat --format '%d %i ''
I: Invoking pbuilder
I: forking: pbuilder build --host-arch amd64 --buildplace /var/cache/pbuilder/cow.cow_amd64/cow.22305 --buildresult /home/user/whonix_binary/genmkfile-packages-result --mirror http://HTTPS///deb.debian.org/debian --distribution buster --extrapackages ' debhelper  genmkfile pkg-config libcurl4-openssl-dev' --no-targz --internal-chrootexec 'chroot /var/cache/pbuilder/cow.cow_amd64/cow.22305 cow-shell' /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.dsc
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: pbuilder: network access will be disabled during build
I: Current time: Wed Aug  7 17:57:03 UTC 2019
I: pbuilder-time-stamp: 1565200623
I: copying local configuration
W: --override-config is not set; not updating apt.conf Read the manpage for details.
I: mounting /proc filesystem
I: mounting /sys filesystem
I: creating /{dev,run}/shm
I: mounting /dev/pts filesystem
I: redirecting /dev/ptmx to /dev/pts/ptmx
I: policy-rc.d already exists
I: Obtaining the cached apt archive contents
I: Copying source file
I: copying [/home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.dsc]
I: copying [/home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3.orig.tar.xz]
I: copying [/home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.debian.tar.xz]
I: Extracting source
dpkg-source: warning: extracting unsigned source package (resistance-miner_2.5.0.res3-1.dsc)
dpkg-source: info: extracting resistance-miner in resistance-miner-2.5.0.res3
dpkg-source: info: unpacking resistance-miner_2.5.0.res3.orig.tar.xz
dpkg-source: info: unpacking resistance-miner_2.5.0.res3-1.debian.tar.xz
I: using fakeroot in build.
I: Installing the build-deps
 -> Attempting to satisfy build-dependencies
 -> Creating pbuilder-satisfydepends-dummy package
Package: pbuilder-satisfydepends-dummy
Version: 0.invalid.0
Architecture: amd64
Maintainer: Debian Pbuilder Team <pbuilder-maint@lists.alioth.debian.org>
Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder
 This package was created automatically by pbuilder to satisfy the
 build-dependencies of the package being currently built.
Depends: debhelper (>= 12), genmkfile, pkg-config, libcurl4-openssl-dev
dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.
Selecting previously unselected package pbuilder-satisfydepends-dummy.
(Reading database ... 20411 files and directories currently installed.)
Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ...
Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ...
dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested:
 pbuilder-satisfydepends-dummy depends on pkg-config; however:
  Package pkg-config is not installed.
 pbuilder-satisfydepends-dummy depends on libcurl4-openssl-dev; however:
  Package libcurl4-openssl-dev is not installed.

Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ...
pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0)
pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0)
The following NEW packages will be installed:
  libcurl4{a} libcurl4-openssl-dev{a} libgssapi-krb5-2{a} libk5crypto3{a} libkeyutils1{a} libkrb5-3{a} libkrb5support0{a} libnghttp2-14{a} 
  libpsl5{a} librtmp1{a} libssh2-1{a} pkg-config{a} 
The following packages are RECOMMENDED but will NOT be installed:
  krb5-locales publicsuffix 
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1883 kB of archives. After unpacking 5310 kB will be used.
Selecting previously unselected package libkeyutils1:amd64.
(Reading database ... 20411 files and directories currently installed.)
Preparing to unpack .../00-libkeyutils1_1.6-6_amd64.deb ...
Unpacking libkeyutils1:amd64 (1.6-6) ...
Selecting previously unselected package libkrb5support0:amd64.
Preparing to unpack .../01-libkrb5support0_1.17-3_amd64.deb ...
Unpacking libkrb5support0:amd64 (1.17-3) ...
Selecting previously unselected package libk5crypto3:amd64.
Preparing to unpack .../02-libk5crypto3_1.17-3_amd64.deb ...
Unpacking libk5crypto3:amd64 (1.17-3) ...
Selecting previously unselected package libkrb5-3:amd64.
Preparing to unpack .../03-libkrb5-3_1.17-3_amd64.deb ...
Unpacking libkrb5-3:amd64 (1.17-3) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Preparing to unpack .../04-libgssapi-krb5-2_1.17-3_amd64.deb ...
Unpacking libgssapi-krb5-2:amd64 (1.17-3) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../05-libnghttp2-14_1.36.0-2_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.36.0-2) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../06-libpsl5_0.20.2-2_amd64.deb ...
Unpacking libpsl5:amd64 (0.20.2-2) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../07-librtmp1_2.4+20151223.gitfa8646d.1-2_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../08-libssh2-1_1.8.0-2.1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.8.0-2.1) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../09-libcurl4_7.64.0-4_amd64.deb ...
Unpacking libcurl4:amd64 (7.64.0-4) ...
Selecting previously unselected package libcurl4-openssl-dev:amd64.
Preparing to unpack .../10-libcurl4-openssl-dev_7.64.0-4_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.64.0-4) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../11-pkg-config_0.29-6_amd64.deb ...
Unpacking pkg-config (0.29-6) ...
Setting up libkeyutils1:amd64 (1.6-6) ...
Setting up libpsl5:amd64 (0.20.2-2) ...
Setting up libnghttp2-14:amd64 (1.36.0-2) ...
Setting up libkrb5support0:amd64 (1.17-3) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Setting up pkg-config (0.29-6) ...
Setting up libk5crypto3:amd64 (1.17-3) ...
Setting up libssh2-1:amd64 (1.8.0-2.1) ...
Setting up libkrb5-3:amd64 (1.17-3) ...
Setting up libgssapi-krb5-2:amd64 (1.17-3) ...
Setting up libcurl4:amd64 (7.64.0-4) ...
Setting up libcurl4-openssl-dev:amd64 (7.64.0-4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...

Current status: 0 (-1) broken.
 -> Finished parsing the build-deps
Reading package lists...
Building dependency tree...
Reading state information...
libcurl4-openssl-dev is already the newest version (7.64.0-4).
libcurl4-openssl-dev set to manually installed.
debhelper is already the newest version (12.1.1).
fakeroot is already the newest version (1.23-1).
pkg-config is already the newest version (0.29-6).
pkg-config set to manually installed.
genmkfile is already the newest version (3:7.5-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I: Copying back the cached apt archive contents
I: Building the package
I: Running cd /build/resistance-miner-2.5.0.res3/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin" HOME="/nonexistent" dpkg-buildpackage -us -uc 
dpkg-buildpackage: info: source package resistance-miner
dpkg-buildpackage: info: source version 0:2.5.0.res3-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Patrick Schleizer <adrelanos@riseup.net>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 fakeroot debian/rules clean
dh clean
   dh_clean
        rm -f debian/debhelper-build-stamp
        rm -rf debian/.debhelper/
        rm -f -- debian/resistance-miner.substvars debian/files
        rm -fr -- debian/resistance-miner/ debian/tmp/
        find .  \( \( \
                \( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o -type f -a \
                \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
                 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
                 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
                 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
                \) -exec rm -f {} + \) -o \
                \( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building resistance-miner using existing ./resistance-miner_2.5.0.res3.orig.tar.xz
dpkg-source: info: building resistance-miner in resistance-miner_2.5.0.res3-1.debian.tar.xz
dpkg-source: info: building resistance-miner in resistance-miner_2.5.0.res3-1.dsc
 debian/rules build
dh build
   dh_update_autotools_config
   dh_autoreconf
        find ! -ipath "./debian/*" -a ! \( -path '*/.git/*' -o -path '*/.hg/*' -o -path '*/.bzr/*' -o -path '*/.svn/*' -o -path '*/CVS/*' \) -a  -type f -exec md5sum {} + -o -type l -printf "symlink  %p
" > debian/autoreconf.before
        grep -q ^XDT_ configure.ac
        autoreconf -f -i
configure.ac:15: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
        find ! -ipath "./debian/*" -a ! \( -path '*/.git/*' -o -path '*/.hg/*' -o -path '*/.bzr/*' -o -path '*/.svn/*' -o -path '*/CVS/*' \) -a  -type f -exec md5sum {} + -o -type l -printf "symlink  %p
" > debian/autoreconf.after
   dh_auto_configure
        ./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 --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
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
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 dependency style of gcc... none
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking dependency style of gcc... none
checking for ranlib... ranlib
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 sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
checking for gawk... (cached) mawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.64.0
checking for libcurl >= version 7.15.2... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: executing depfiles commands
   dh_auto_build
        make -j8
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
make  all-recursive
make[2]: Entering directory '/build/resistance-miner-2.5.0.res3'
Making all in compat
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
Making all in jansson
make[4]: Entering directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o dump.o dump.c
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o hashtable.o hashtable.c
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o load.o load.c
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o strbuffer.o strbuffer.c
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o utf.o utf.c
gcc -DHAVE_CONFIG_H -I. -I../..   -Wdate-time  -O2 -fomit-frame-pointer -c -o value.o value.c
rm -f libjansson.a
ar cru libjansson.a dump.o hashtable.o load.o strbuffer.o utf.o value.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libjansson.a
make[4]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[4]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3'
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-util.o `test -f 'util.c' || echo './'`util.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-sha2.o `test -f 'sha2.c' || echo './'`sha2.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-random.o `test -f 'random.c' || echo './'`random.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-cpuinfo.o `test -f 'cpuinfo.c' || echo './'`cpuinfo.c
cpu-miner.c: In function 'show_version_and_exit':
cpu-miner.c:1542:39: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
  printf(PACKAGE_STRING "\n built on " __DATE__ "\n features:"
                                       ^~~~~~~~
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o minerd-res-yespower.o `test -f 'res-yespower.c' || echo './'`res-yespower.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o yespower/minerd-sha256.o `test -f 'yespower/sha256.c' || echo './'`yespower/sha256.c
gcc -DHAVE_CONFIG_H -I.  -I./compat/jansson -pthread -Wdate-time  -O2 -fomit-frame-pointer -c -o yespower/minerd-yespower-opt.o `test -f 'yespower/yespower-opt.c' || echo './'`yespower/yespower-opt.c
yespower/yespower-opt.c:57:2: warning: #warning "Note: AVX and XOP are not enabled.  That's OK." [-Wcpp]
 #warning "Note: AVX and XOP are not enabled.  That's OK."
  ^~~~~~~
yespower/yespower-opt.c:530:2: warning: #warning "Note: using x86-64 inline assembly for pwxform.  That's great." [-Wcpp]
 #warning "Note: using x86-64 inline assembly for pwxform.  That's great."
  ^~~~~~~
gcc  -O2 -fomit-frame-pointer -pthread -specs=/usr/share/dpkg/no-pie-link.specs -o minerd minerd-cpu-miner.o minerd-util.o minerd-sha2.o minerd-random.o minerd-cpuinfo.o yespower/minerd-sha256.o yespower/minerd-yespower-opt.o minerd-res-yespower.o -lcurl compat/jansson/libjansson.a -lpthread  
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3'
make[2]: Leaving directory '/build/resistance-miner-2.5.0.res3'
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
   dh_auto_test
        make -j8 check VERBOSE=1
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
Making check in compat
make[2]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
Making check in jansson
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
make[3]: Nothing to be done for 'check-am'.
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[2]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[2]: Entering directory '/build/resistance-miner-2.5.0.res3'
make[2]: Leaving directory '/build/resistance-miner-2.5.0.res3'
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
   create-stamp debian/debhelper-build-stamp
 fakeroot debian/rules binary
dh binary
   dh_testroot
   dh_prep
        rm -f -- debian/resistance-miner.substvars
        rm -fr -- debian/.debhelper/generated/resistance-miner/ debian/resistance-miner/ debian/tmp/
   dh_auto_install
        install -d /build/resistance-miner-2.5.0.res3/debian/resistance-miner
        make -j8 install DESTDIR=/build/resistance-miner-2.5.0.res3/debian/resistance-miner AM_UPDATE_INFO_DIR=no
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
Making install in compat
make[2]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
Making install in jansson
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[4]: Entering directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat/jansson'
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
make[4]: Entering directory '/build/resistance-miner-2.5.0.res3/compat'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[2]: Leaving directory '/build/resistance-miner-2.5.0.res3/compat'
make[2]: Entering directory '/build/resistance-miner-2.5.0.res3'
make[3]: Entering directory '/build/resistance-miner-2.5.0.res3'
 /bin/mkdir -p '/build/resistance-miner-2.5.0.res3/debian/resistance-miner/usr/bin'
 /bin/mkdir -p '/build/resistance-miner-2.5.0.res3/debian/resistance-miner/usr/share/man/man1'
  /usr/bin/install -c minerd '/build/resistance-miner-2.5.0.res3/debian/resistance-miner/usr/bin'
 /usr/bin/install -c -m 644 minerd.1 '/build/resistance-miner-2.5.0.res3/debian/resistance-miner/usr/share/man/man1'
make[3]: Leaving directory '/build/resistance-miner-2.5.0.res3'
make[2]: Leaving directory '/build/resistance-miner-2.5.0.res3'
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
   dh_install
        cp --reflink=auto -a ./minerd debian/resistance-miner/usr/bin//
        install -d debian/.debhelper/generated/resistance-miner
   dh_installdocs
        install -d debian/resistance-miner/usr/share/doc/resistance-miner
        install -p -m0644 debian/copyright debian/resistance-miner/usr/share/doc/resistance-miner/copyright
   debian/rules override_dh_installchangelogs
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
dh_installchangelogs NEWS upstream
        install -p -m0644 debian/changelog debian/resistance-miner/usr/share/doc/resistance-miner/changelog.Debian
        install -p -m0644 NEWS debian/resistance-miner/usr/share/doc/resistance-miner/changelog
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
        rm -f debian/resistance-miner.debhelper.log
   debian/rules override_dh_installman
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
dh_installman /build/resistance-miner-2.5.0.res3/minerd.1
        install -p -m0644 /build/resistance-miner-2.5.0.res3/minerd.1 debian/resistance-miner/usr/share/man/man1/minerd.1
        man -l --recode UTF-8 ./debian/resistance-miner/usr/share/man/man1/minerd.1 > debian/resistance-miner/usr/share/man/man1/minerd.1.dh-new
        mv debian/resistance-miner/usr/share/man/man1/minerd.1.dh-new debian/resistance-miner/usr/share/man/man1/minerd.1
        chmod 0644 -- debian/resistance-miner/usr/share/man/man1/minerd.1
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
        cd debian/resistance-miner
        chmod a-x usr/share/doc/resistance-miner/changelog usr/share/doc/resistance-miner/changelog.Debian usr/share/man/man1/minerd.1
        gzip -9nf usr/share/doc/resistance-miner/changelog usr/share/doc/resistance-miner/changelog.Debian usr/share/man/man1/minerd.1
        cd '/build/resistance-miner-2.5.0.res3'
   dh_fixperms
        find debian/resistance-miner -true -print0 2>/dev/null | xargs -0r chown --no-dereference 0:0
        find debian/resistance-miner ! -type l -a -true -a -true -print0 2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s
        find debian/resistance-miner/usr/share/doc -type f -a -true -a ! -regex 'debian/resistance-miner/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null | xargs -0r chmod 0644
        find debian/resistance-miner/usr/share/doc -type d -a -true -a -true -print0 2>/dev/null | xargs -0r chmod 0755
        find debian/resistance-miner/usr/share/man -type f -a -true -a -true -print0 2>/dev/null | xargs -0r chmod 0644
        find debian/resistance-miner -type f \( -name '*.so.*' -o -name '*.so' -o -name '*.la' -o -name '*.a' -o -name '*.js' -o -name '*.css' -o -name '*.scss' -o -name '*.sass' -o -name '*.jpeg' -o -name '*.jpg' -o -name '*.png' -o -name '*.gif' -o -name '*.cmxs' -o -name '*.node' \) -a -true -a -true -print0 2>/dev/null | xargs -0r chmod 0644
        find debian/resistance-miner/usr/bin -type f -a -true -a -true -print0 2>/dev/null | xargs -0r chmod a+x
   dh_missing
        rm -f debian/resistance-miner.debhelper.log
   debian/rules override_dh_dwz
make[1]: Entering directory '/build/resistance-miner-2.5.0.res3'
true
make[1]: Leaving directory '/build/resistance-miner-2.5.0.res3'
   dh_strip
        install -d debian/.debhelper/resistance-miner/dbgsym-root/usr/lib/debug/.build-id/e7
        objcopy --only-keep-debug --compress-debug-sections debian/resistance-miner/usr/bin/minerd debian/.debhelper/resistance-miner/dbgsym-root/usr/lib/debug/.build-id/e7/d646f572d4daa1c9994115ef22524b5b0e48b0.debug
        chmod 0644 -- debian/.debhelper/resistance-miner/dbgsym-root/usr/lib/debug/.build-id/e7/d646f572d4daa1c9994115ef22524b5b0e48b0.debug
        chown 0:0 -- debian/.debhelper/resistance-miner/dbgsym-root/usr/lib/debug/.build-id/e7/d646f572d4daa1c9994115ef22524b5b0e48b0.debug
        strip --remove-section=.comment --remove-section=.note debian/resistance-miner/usr/bin/minerd
        objcopy --add-gnu-debuglink debian/.debhelper/resistance-miner/dbgsym-root/usr/lib/debug/.build-id/e7/d646f572d4daa1c9994115ef22524b5b0e48b0.debug debian/resistance-miner/usr/bin/minerd
        install -d debian/.debhelper/resistance-miner/dbgsym-root/usr/share/doc
        ln -s resistance-miner debian/.debhelper/resistance-miner/dbgsym-root/usr/share/doc/resistance-miner-dbgsym
   dh_makeshlibs
        rm -f debian/resistance-miner/DEBIAN/shlibs
   dh_shlibdeps
        install -d debian/resistance-miner/DEBIAN
        dpkg-shlibdeps -Tdebian/resistance-miner.substvars debian/resistance-miner/usr/bin/minerd
   dh_installdeb
   dh_gencontrol
        echo misc:Depends= >> debian/resistance-miner.substvars
        echo misc:Pre-Depends= >> debian/resistance-miner.substvars
        install -d debian/.debhelper/resistance-miner/dbgsym-root/DEBIAN
        dpkg-gencontrol -presistance-miner -ldebian/changelog -Tdebian/resistance-miner.substvars -Pdebian/.debhelper/resistance-miner/dbgsym-root -UPre-Depends -URecommends -USuggests -UEnhances -UProvides -UEssential -UConflicts -DPriority=optional -UHomepage -UImportant -DAuto-Built-Package=debug-symbols -DPackage=resistance-miner-dbgsym "-DDepends=resistance-miner (= \${binary:Version})" "-DDescription=debug symbols for resistance-miner" -DBuild-Ids=e7d646f572d4daa1c9994115ef22524b5b0e48b0 -DSection=debug -UMulti-Arch -UReplaces -UBreaks
        chmod 0644 -- debian/.debhelper/resistance-miner/dbgsym-root/DEBIAN/control
        chown 0:0 -- debian/.debhelper/resistance-miner/dbgsym-root/DEBIAN/control
        dpkg-gencontrol -presistance-miner -ldebian/changelog -Tdebian/resistance-miner.substvars -Pdebian/resistance-miner -UMulti-Arch
        chmod 0644 -- debian/resistance-miner/DEBIAN/control
        chown 0:0 -- debian/resistance-miner/DEBIAN/control
   dh_md5sums
        cd debian/resistance-miner >/dev/null && xargs -r0 md5sum | perl -pe 'if (s@^\\@@) { s/\\\\/\\/g; }' > DEBIAN/md5sums
        chmod 0644 -- debian/resistance-miner/DEBIAN/md5sums
        chown 0:0 -- debian/resistance-miner/DEBIAN/md5sums
        cd debian/.debhelper/resistance-miner/dbgsym-root >/dev/null && xargs -r0 md5sum | perl -pe 'if (s@^\\@@) { s/\\\\/\\/g; }' > DEBIAN/md5sums
        chmod 0644 -- debian/.debhelper/resistance-miner/dbgsym-root/DEBIAN/md5sums
        chown 0:0 -- debian/.debhelper/resistance-miner/dbgsym-root/DEBIAN/md5sums
   dh_builddeb
        dpkg-deb --build debian/resistance-miner ..
        dpkg-deb --build debian/.debhelper/resistance-miner/dbgsym-root ..
dpkg-deb: building package 'resistance-miner' in '../resistance-miner_2.5.0.res3-1_amd64.deb'.
dpkg-deb: building package 'resistance-miner-dbgsym' in '../resistance-miner-dbgsym_2.5.0.res3-1_amd64.deb'.
 dpkg-genbuildinfo
 dpkg-genchanges  >../resistance-miner_2.5.0.res3-1_amd64.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .
dpkg-buildpackage: info: full upload (original source is included)
I: copying local configuration
I: Copying back the cached apt archive contents
I: unmounting dev/ptmx filesystem
I: unmounting dev/pts filesystem
I: unmounting dev/shm filesystem
I: unmounting proc filesystem
I: unmounting sys filesystem
I: Current time: Wed Aug  7 17:57:17 UTC 2019
I: pbuilder-time-stamp: 1565200637
I: Cleaning COW directory
I: forking: rm -rf /var/cache/pbuilder/cow.cow_amd64/cow.22305
 signfile dsc /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.dsc Patrick Schleizer <adrelanos@riseup.net>

 fixup_buildinfo /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.dsc /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.buildinfo
 signfile buildinfo /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.buildinfo Patrick Schleizer <adrelanos@riseup.net>

 fixup_changes dsc /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1.dsc /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.changes
 fixup_changes buildinfo /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.buildinfo /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.changes
 signfile changes /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.changes Patrick Schleizer <adrelanos@riseup.net>

Successfully signed dsc, buildinfo, changes files
gpg: Signature made Wed Aug  7 17:57:17 2019 UTC
gpg:                using RSA key 6E979B28A6F37C43BE30AFA1CB8D50BB77BB3C48
gpg:                issuer "adrelanos@riseup.net"
gpg: Good signature from "Patrick Schleizer <adrelanos@riseup.net>" [full]
dpkg-source: info: extracting resistance-miner in /tmp/tmp.nyD1N2mRur
dpkg-source: info: unpacking resistance-miner_2.5.0.res3.orig.tar.xz
dpkg-source: info: unpacking resistance-miner_2.5.0.res3-1.debian.tar.xz
/usr/share/genmkfile/make-helper-one.bsh: INFO: You can find your deb file here: /home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.deb
/usr/share/genmkfile/make-helper-one.bsh: INFO: make_use_lintian=true - running lintian...
lintian  --suppress-tags testsuite-autopkgtest-missing --quiet --pedantic --info --display-info  --suppress-tags copyright-without-copyright-notice --suppress-tags hardening-no-fortify-functions --suppress-tags hardening-no-bindnow --suppress-tags hardening-no-pie --suppress-tags debug-file-with-no-debug-symbols "/home/user/whonix_binary/genmkfile-packages-result/resistance-miner_2.5.0.res3-1_amd64.changes"
/usr/share/genmkfile/make-helper-one.bsh: INFO: lintian ok.
solardiz commented 5 years ago

As discussed, this isn't a blocker anymore. We might find a better way to deal with the issue later.

solardiz commented 5 years ago

I'll consider and maybe experiment with overriding gcc flags using #pragma from within yespower-opt.c.

I looked into this. GCC does offer a pragma for adding to and overriding specific optimization flags, but it does not include one to reset everything else to its defaults (or rather the reset pragma it does offer would reset to what's specified on the command-line rather than to gcc's built-in defaults). Since we can't list the possible performance-related flags exhaustively, using that pragma for our purposes wouldn't fully achieve our goal.