weakforced icon indicating copy to clipboard operation
weakforced copied to clipboard

[BUG] uintX_t used implicitly in two objects

Open P-EB opened this issue 3 months ago • 6 comments

Describe the bug Hello,

In both ext/json11/json11.cpp and common/minicurl.hh, uintX_t are used without stdint.h being included.

In some build scenarii like the Debian package build I attempted, this leads to crash.

To Reproduce The directory with the debian build recipes are on salsa: https://salsa.debian.org/debian/weakforced

Here is a build log

config.status: executing libtool commands
make[1]: Leaving directory '/build/reproducible-path/weakforced-3.0.0'
   debian/rules override_dh_auto_build
make[1]: Entering directory '/build/reproducible-path/weakforced-3.0.0'
dh_auto_build
	make -j12
make[2]: Entering directory '/build/reproducible-path/weakforced-3.0.0'
make  all-recursive
make[3]: Entering directory '/build/reproducible-path/weakforced-3.0.0'
Making all in ext
make[4]: Entering directory '/build/reproducible-path/weakforced-3.0.0/ext'
Making all in json11
make[5]: Entering directory '/build/reproducible-path/weakforced-3.0.0/ext/json11'
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..   -Wdate-time -D_FORTIFY_SOURCE=2 -W -Wall   -D__STRICT_ANSI__ -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o libjson11_la-json11.lo `test -f 'json11.cpp' || echo './'`json11.cpp
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -W -Wall -D__STRICT_ANSI__ -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c json11.cpp  -fPIC -DPIC -o .libs/libjson11_la-json11.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -W -Wall -D__STRICT_ANSI__ -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c json11.cpp -o libjson11_la-json11.o >/dev/null 2>&1
/bin/bash ../../libtool  --tag=CXX   --mode=link g++ -std=gnu++17 -W -Wall   -D__STRICT_ANSI__ -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection  -Wl,-z,relro -Wl,-z,now -o libjson11.la  libjson11_la-json11.lo  
libtool: link: ar cr .libs/libjson11.a .libs/libjson11_la-json11.o 
libtool: link: ranlib .libs/libjson11.a
libtool: link: ( cd ".libs" && rm -f "libjson11.la" && ln -s "../libjson11.la" "libjson11.la" )
make[5]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/ext/json11'
Making all in ext
make[5]: Entering directory '/build/reproducible-path/weakforced-3.0.0/ext/ext'
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o count_min_sketch.lo count_min_sketch.cpp
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o murmur3.lo murmur3.cc
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o threadname.lo threadname.cc
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o uap-cpp/UaParser.lo uap-cpp/UaParser.cpp
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c murmur3.cc  -fPIC -DPIC -o .libs/murmur3.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c count_min_sketch.cpp  -fPIC -DPIC -o .libs/count_min_sketch.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c threadname.cc  -fPIC -DPIC -o .libs/threadname.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c uap-cpp/UaParser.cpp  -fPIC -DPIC -o uap-cpp/.libs/UaParser.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c murmur3.cc -o murmur3.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c threadname.cc -o threadname.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c count_min_sketch.cpp -o count_min_sketch.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c uap-cpp/UaParser.cpp -o uap-cpp/UaParser.o >/dev/null 2>&1
/bin/bash ../../libtool  --tag=CXX   --mode=link g++ -std=gnu++17  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection  -Wl,-z,relro -Wl,-z,now -o libext.la  count_min_sketch.lo murmur3.lo threadname.lo uap-cpp/UaParser.lo  
libtool: link: ar cr .libs/libext.a .libs/count_min_sketch.o .libs/murmur3.o .libs/threadname.o uap-cpp/.libs/UaParser.o 
libtool: link: ranlib .libs/libext.a
libtool: link: ( cd ".libs" && rm -f "libext.la" && ln -s "../libext.la" "libext.la" )
make[5]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/ext/ext'
make[5]: Entering directory '/build/reproducible-path/weakforced-3.0.0/ext'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/ext'
make[4]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/ext'
Making all in docs
make[4]: Entering directory '/build/reproducible-path/weakforced-3.0.0/docs'
asciidoctor -b manpage manpages/wforce.1.md -o wforce.1
asciidoctor -b manpage manpages/wforce.conf.5.md -o wforce.conf.5
asciidoctor -b manpage manpages/wforce_webhook.5.md -o wforce_webhook.5
asciidoctor -b manpage manpages/wf_dump_entries.1.md -o wf_dump_entries.1
asciidoctor -b manpage manpages/trackalert.1.md -o trackalert.1
asciidoctor -b manpage manpages/trackalert.conf.5.md -o trackalert.conf.5
make[4]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/docs'
Making all in common
make[4]: Entering directory '/build/reproducible-path/weakforced-3.0.0/common'
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o dns_lookup.lo dns_lookup.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o wforce-geoip.lo wforce-geoip.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o wforce-geoip2.lo wforce-geoip2.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o twmap-static.lo twmap-static.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o iputils.lo iputils.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o misc.lo misc.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o perf-stats.lo perf-stats.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o webhook.lo webhook.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o minicurl.lo minicurl.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o hmac.lo hmac.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o sodcrypto.lo sodcrypto.cc
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o device_parser.lo device_parser.cc
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c dns_lookup.cc  -fPIC -DPIC -o .libs/dns_lookup.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c device_parser.cc  -fPIC -DPIC -o .libs/device_parser.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c minicurl.cc  -fPIC -DPIC -o .libs/minicurl.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c hmac.cc  -fPIC -DPIC -o .libs/hmac.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c twmap-static.cc  -fPIC -DPIC -o .libs/twmap-static.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c webhook.cc  -fPIC -DPIC -o .libs/webhook.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-geoip.cc  -fPIC -DPIC -o .libs/wforce-geoip.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-geoip2.cc  -fPIC -DPIC -o .libs/wforce-geoip2.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c misc.cc  -fPIC -DPIC -o .libs/misc.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c perf-stats.cc  -fPIC -DPIC -o .libs/perf-stats.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c iputils.cc  -fPIC -DPIC -o .libs/iputils.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c sodcrypto.cc  -fPIC -DPIC -o .libs/sodcrypto.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c hmac.cc -o hmac.o >/dev/null 2>&1
In file included from minicurl.cc:23:
minicurl.hh:60:27: error: 'uint64_t' has not been declared
   60 |   virtual void setTimeout(uint64_t timeout_secs);
      |                           ^~~~~~~~
minicurl.hh:38:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   37 | #include <curl/curl.h>
  +++ |+#include <cstdint>
   38 | // turns out 'CURL' is currently typedef for void which means we can't easily forward declare it
minicurl.hh:119:19: error: 'uint64_t' has not been declared
  119 |   void setTimeout(uint64_t timeout_secs);
      |                   ^~~~~~~~
minicurl.hh:119:19: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
minicurl.cc:132:6: error: no declaration matches 'void MiniCurl::setTimeout(uint64_t)'
  132 | void MiniCurl::setTimeout(uint64_t timeout_secs)
      |      ^~~~~~~~
minicurl.hh:60:16: note: candidate is: 'virtual void MiniCurl::setTimeout(int)'
   60 |   virtual void setTimeout(uint64_t timeout_secs);
      |                ^~~~~~~~~~
minicurl.hh:42:7: note: 'class MiniCurl' defined here
   42 | class MiniCurl
      |       ^~~~~~~~
minicurl.cc:321:6: error: no declaration matches 'void MiniCurlMulti::setTimeout(uint64_t)'
  321 | void MiniCurlMulti::setTimeout(uint64_t timeout_secs)
      |      ^~~~~~~~~~~~~
minicurl.hh:119:8: note: candidate is: 'virtual void MiniCurlMulti::setTimeout(int)'
  119 |   void setTimeout(uint64_t timeout_secs);
      |        ^~~~~~~~~~
minicurl.hh:108:7: note: 'class MiniCurlMulti' defined here
  108 | class MiniCurlMulti : public MiniCurl
      |       ^~~~~~~~~~~~~
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I..  -I/usr/include/luajit-2.1  -I../ext   -I../ext/json11   -I/usr/include -I/usr/include/jsoncpp     -I/usr/include/  -I/usr/include/x86_64-linux-gnu  -pthread -DSYSCONFDIR='"/etc/wforce"'  -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o wforce-webserver.lo wforce-webserver.cc
make[4]: *** [Makefile:904: minicurl.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-webserver.cc  -fPIC -DPIC -o .libs/wforce-webserver.o
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c sodcrypto.cc -o sodcrypto.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c twmap-static.cc -o twmap-static.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c dns_lookup.cc -o dns_lookup.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-geoip.cc -o wforce-geoip.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-geoip2.cc -o wforce-geoip2.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c misc.cc -o misc.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c iputils.cc -o iputils.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c perf-stats.cc -o perf-stats.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c webhook.cc -o webhook.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c wforce-webserver.cc -o wforce-webserver.o >/dev/null 2>&1
libtool: compile:  g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/luajit-2.1 -I../ext -I../ext/json11 -I/usr/include -I/usr/include/jsoncpp -I/usr/include/ -I/usr/include/x86_64-linux-gnu -pthread -DSYSCONFDIR=\"/etc/wforce\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/reproducible-path/weakforced-3.0.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c device_parser.cc -o device_parser.o >/dev/null 2>&1
make[4]: Leaving directory '/build/reproducible-path/weakforced-3.0.0/common'
make[3]: *** [Makefile:525: all-recursive] Error 1
make[3]: Leaving directory '/build/reproducible-path/weakforced-3.0.0'
make[2]: *** [Makefile:457: all] Error 2
make[2]: Leaving directory '/build/reproducible-path/weakforced-3.0.0'
dh_auto_build: error: make -j12 returned exit code 2
make[1]: *** [debian/rules:31: override_dh_auto_build] Error 25
make[1]: Leaving directory '/build/reproducible-path/weakforced-3.0.0'
make: *** [debian/rules:19: binary] Error 2

I attached a patch that merely imports stdint.h in the proper header files.

weakforced.txt

P-EB avatar Sep 21 '25 20:09 P-EB

#463

neilcook avatar Sep 22 '25 14:09 neilcook

I guess you would need this fix in a patch release?

neilcook avatar Sep 23 '25 10:09 neilcook

@neilcook thanks, will look into it!

P-EB avatar Sep 25 '25 11:09 P-EB

Note that I went a bit further and checked every .hh and .cc file for usages of these types, and added <stdint.h>. I'd like to do another PR in the future that uses <cstdint> and explicitly namespace such usages, e.g. std::uint64_t.

neilcook avatar Sep 25 '25 12:09 neilcook

Thanks a lot. So far I integrated these in a patch so no rush for a patch release. But as soon as there's one, I'll happily drop my patches.

On another note, I modifier the debian packaging (initially I heavily based my work on yours) to make piuparts happy, if you wish, don't hesitate to tell me and I'll drop you the commits.

Bests. :)

P-EB avatar Oct 24 '25 23:10 P-EB

Thanks - It would be great to get any commits that make the debian packaging more stable.

neilcook avatar Oct 27 '25 08:10 neilcook