Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716122 - sys-block/open-iscsi-2.1.1 : iscsi_util.c: error: format %lu expects argument of type long unsigned int, but argument 3 has type r
Summary: sys-block/open-iscsi-2.1.1 : iscsi_util.c: error: format %lu expects argument...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-04 07:35 UTC by Toralf Förster
Modified: 2022-04-23 01:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.53 KB, text/plain)
2020-04-04 07:35 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,277.94 KB, text/plain)
2020-04-04 07:35 UTC, Toralf Förster
Details
environment (environment,110.96 KB, text/plain)
2020-04-04 07:35 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,24.84 KB, application/x-bzip)
2020-04-04 07:35 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,9.33 KB, application/x-bzip)
2020-04-04 07:35 UTC, Toralf Förster
Details
sys-block:open-iscsi-2.1.1:20200404-062400.log (sys-block:open-iscsi-2.1.1:20200404-062400.log,23.64 KB, text/plain)
2020-04-04 07:35 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,32.39 KB, application/x-bzip)
2020-04-04 07:35 UTC, Toralf Förster
Details
Bug that fixes a format string size problem (snprintf_fix.patch,412 bytes, patch)
2020-04-11 18:11 UTC, Adam Stylinski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-04-04 07:35:35 UTC
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)"
Comment 1 Toralf Förster gentoo-dev 2020-04-04 07:35:38 UTC
Created attachment 629746 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-04-04 07:35:41 UTC
Created attachment 629748 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-04-04 07:35:45 UTC
Created attachment 629750 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-04-04 07:35:48 UTC
Created attachment 629752 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-04-04 07:35:51 UTC
Created attachment 629754 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-04-04 07:35:54 UTC
Created attachment 629756 [details]
sys-block:open-iscsi-2.1.1:20200404-062400.log
Comment 7 Toralf Förster gentoo-dev 2020-04-04 07:35:58 UTC
Created attachment 629758 [details]
temp.tbz2
Comment 8 Adam Stylinski 2020-04-11 18:11:57 UTC
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.