x86_64-gentoo-linux-musl-gcc -O2 -pipe -march=native -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_SYSTEMD -Wall -Wextra -Werror -Wstrict-prototypes -fno-common -I../include -I. -D_GNU_SOURCE -I../libopeniscsiusr -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -o iscsi_util.o iscsi_util.c iscsi_util.c: In function increase_max_files: iscsi_util.c:155:34: error: format %lu expects argument of type long unsigned int, but argument 3 has type rlim_t {aka long long unsigned int} [-Werror=format=] 155 | log_debug(1, Max file limits %lu %lu, rl.rlim_cur, rl.rlim_max); | ~~^ ~~~~~~~~~~~ | | | ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl_hardened-20200328-201618 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-9.3.0 * clang version 10.0.0 Target: x86_64-gentoo-linux-musl Thread model: posix InstalledDir: /usr/lib/llvm/10/bin /usr/lib/llvm/10 10.0.0 Available Python interpreters, in order of preference: [1] python3.8 [2] python3.7 [3] python3.6 [4] python2.7 (fallback) Available Ruby profiles: [1] ruby24 (with Rubygems) [2] ruby25 (with Rubygems) * Available Rust versions: [1] rust-1.42.0 * Available Java Virtual Machines: (none found) timestamp of HEAD at this tinderbox image: /var/db/repos/gentoo Sat Apr 4 05:39:04 UTC 2020 /var/db/repos/musl Sat Apr 4 03:02:24 UTC 2020 emerge -qpvO sys-block/open-iscsi [ebuild N ] sys-block/open-iscsi-2.1.1 USE="tcp -debug -infiniband -libressl -rdma (-systemd)"
Created attachment 629746 [details] emerge-info.txt
Created attachment 629748 [details] emerge-history.txt
Created attachment 629750 [details] environment
Created attachment 629752 [details] etc.portage.tbz2
Created attachment 629754 [details] logs.tbz2
Created attachment 629756 [details] sys-block:open-iscsi-2.1.1:20200404-062400.log
Created attachment 629758 [details] temp.tbz2
Created attachment 632296 [details, diff] Bug that fixes a format string size problem This fixed a different but related error that I believe FORTIFY_SOURCE caught with snprintf. The string being written to was calloc'd to support the colon, a NULL, the original address string, and an unsigned short (as supported by the sockets API). The format string instead uses a %d. I've attached this patch which fixes the compilation for me.
https://github.com/open-iscsi/open-iscsi/commit/fbe6c1c766a88edccb0d7f4168d2d87a3cdb4660