Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 714726

Summary: sys-block/open-iscsi-2.1.1 In function ‘isns_disc_new_portals.constprop’
Product: Gentoo Linux Reporter: Andrea Postiglione <andrea.postiglione>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Andrea Postiglione 2020-03-25 16:04:21 UTC
discoveryd.c: In function ‘isns_disc_new_portals.constprop’:
discoveryd.c:374:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  374 |   log_error("Could not perform iSNS DevAttrQuery for node %s.",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  375 |      targetname);
      |      ~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 iscsistart.o iscsistart.c
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 statics.o statics.c
cc1: all warnings being treated as errors
make[1]: *** [<builtin>: discoveryd.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/sys-block/open-iscsi-2.1.1/work/open-iscsi-2.1.1/usr'
make: *** [Makefile:65: user] Error 2
Comment 1 Jonas Stein gentoo-dev 2020-03-25 20:34:56 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. That is why I ask you to 
* attach the logs and 
* paste the emerge info 
as described on 
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Please reopen this ticket (Status:UNCONFIRMED) afterwards.
Comment 2 Andrea Postiglione 2020-03-25 20:54:03 UTC
Portage 2.3.96 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.30-r6, 5.5.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.5.11-gentoo-x86_64-Intel-R-_Core-TM-_i5-7200U_CPU_@_2.50GHz-with-gentoo-2.7
KiB Mem:    32870760 total,  15865692 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 25 Mar 2020 14:45:01 +0000
Head commit of repository gentoo: 60e7f1f744801355bca964814a8ced23086b3de9
Head commit of repository 4nykey: 17a13dc3f6f6146222ca0702c9e5ff731ac41250

Head commit of repository jm-overlay: 23338d6abba46cf8671073f9adcbd874b80cd18a

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo
dev-util/cmake:           3.17.0::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync7.de.gentoo.org/gentoo-portage/
    priority: 10
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

4nykey
    location: /var/db/repos/4nykey
    sync-type: git
    sync-uri: https://github.com/4nykey/4nykey.git
    masters: gentoo
    priority: 50

jm-overlay
    location: /var/db/repos/jm-overlay
    sync-type: git
    sync-uri: https://github.com/Jannis234/jm-overlay.git
    masters: gentoo
    priority: 50

local
    location: /var/db/repos/local
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O3 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -mtune=native -O3 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O3 -pipe"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/"
LANG="it_IT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups dbus declarative dri dts dvd dvdr emboss encode exif flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard evdev mouse synaptics" KERNEL="linux" L10N="it" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 hppa i386" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-block/open-iscsi-2.1.0::gentoo was built with the following:
USE="tcp -debug -infiniband -libressl -rdma -systemd" ABI_X86="(64)"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
Comment 3 Andrea Postiglione 2020-03-28 13:51:41 UTC
i can't attach the build.log


mon -I../include -I. -D_GNU_SOURCE -I../libopeniscsiusr   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -c -o discoveryd.o discoveryd.c
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 mntcheck.o mntcheck.c
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 iscsiadm.o iscsiadm.c
discoveryd.c: In function ‘isns_disc_new_portals.constprop’:
discoveryd.c:374:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  374 |   log_error("Could not perform iSNS DevAttrQuery for node %s.",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  375 |      targetname);
      |      ~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 iscsistart.o iscsistart.c
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O3 -pipe  -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 statics.o statics.c
cc1: all warnings being treated as errors
make[1]: *** [<builtin>: discoveryd.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/sys-block/open-iscsi-2.1.1/work/open-iscsi-2.1.1/usr'
make: *** [Makefile:65: user] Error 2
 * ERROR: sys-block/open-iscsi-2.1.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-block/open-iscsi-2.1.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-block/open-iscsi-2.1.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-block/open-iscsi-2.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-block/open-iscsi-2.1.1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-block/open-iscsi-2.1.1/work/open-iscsi-2.1.1'
 * S: '/var/tmp/portage/sys-block/open-iscsi-2.1.1/work/open-iscsi-2.1.1'
Comment 4 Russell Knighton 2020-03-29 19:37:38 UTC
Recently hit the exact same issue - I found changing from -O3 to -O2 worked.
Comment 5 Adam Stylinski 2020-04-11 19:04:51 UTC
I just ran into this as well when switching from gcc 8.x to 9.x.  Does the compiler set aside a fixed stack size for constant strings like this?  As far as I can tell it's just using variadic macros to expand a format string directly into printf.  It makes some sense the compiler might try to do some sort of string pooling for const char*'s and compile time strings, but what might be the fix to make this actually work with -O3 that doesn't involve a bunch of temporary stack or heap buffers?