Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 623536 - =sys-apps/systemd-233-r1 fails to compile on ia64: in bus-control.c: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument has type ‘__u64 {aka long unsigned int}
Summary: =sys-apps/systemd-233-r1 fails to compile on ia64: in bus-control.c: error: f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: IA64 Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords: REGRESSION
Depends on: CVE-2017-9445
Blocks:
  Show dependency tree
 
Reported: 2017-07-02 14:47 UTC by Émeric Maschino
Modified: 2017-07-13 06:53 UTC (History)
2 users (show)

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


Attachments
bzip2-compressed build.log (build.log.bz2,32.12 KB, application/x-bzip)
2017-07-02 14:47 UTC, Émeric Maschino
Details
environment (environment,227.99 KB, text/plain)
2017-07-02 14:49 UTC, Émeric Maschino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2017-07-02 14:47:54 UTC
Created attachment 479886 [details]
bzip2-compressed build.log

Hi,

=sys-apps/systemd-233-r1 fails to emerge with warnings (treated as errors) in libsystemd/sd-bus/bus-control.c. From build.log, relevant errors are:

/var/tmp/portage/sys-apps/systemd-233-r1/work/systemd-233/src/libsystemd/sd-bus/bus-control.c: In function ‘kernel_get_list’:
/var/tmp/portage/sys-apps/systemd-233-r1/work/systemd-233/src/libsystemd/sd-bus/bus-control.c:267:42: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
                         if (asprintf(&n, ":1.%llu", name->id) < 0) {
                                          ^
/var/tmp/portage/sys-apps/systemd-233-r1/work/systemd-233/src/libsystemd/sd-bus/bus-control.c: In function ‘bus_get_name_creds_kdbus’:
/var/tmp/portage/sys-apps/systemd-233-r1/work/systemd-233/src/libsystemd/sd-bus/bus-control.c:714:47: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
                 if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) {
                                               ^

This is on ia64 architecture, so I bet other 64-bit architectures are/will be affected too.

A similar issue in journald-console.c was reported on x32 in bug #618040.

     Émeric
Comment 1 Émeric Maschino 2017-07-02 14:49:26 UTC
Created attachment 479888 [details]
environment
Comment 2 Émeric Maschino 2017-07-02 14:49:56 UTC
emerge --info output:

Portage 2.3.6 (python 3.4.5-final-0, default/linux/ia64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r4, 4.9.34-gentoo ia64)
=================================================================
System uname: Linux-4.9.34-gentoo-ia64-Madison-with-gentoo-2.3
KiB Mem:    24981088 total,  23169072 free
KiB Swap:     524272 total,    524272 free
Timestamp of repository gentoo: Fri, 30 Jun 2017 20:15:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.5.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.fr.gentoo.org/gentoo-portage
    priority: -1000

my_ebuilds
    location: /var/lib/layman/my_ebuilds
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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 alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ALSA_CARDS="fm801" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="radeon fbdev" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 Émeric Maschino 2017-07-02 14:50:47 UTC
emerge -pqv output:

[ebuild     U ] sys-apps/systemd-233-r1 [226-r2] USE="acl gcrypt* kmod lz4 pam policykit ssl (-apparmor) -audit -build -cryptsetup -curl -doc% -elfutils -gnuefi -http -idn -importd -lzma -nat -qrcode (-seccomp) (-selinux) -sysv-utils {-test} -vanilla -xkb (-kdbus%*)"
Comment 4 Émeric Maschino 2017-07-02 14:51:34 UTC
FYI, this is a regression from previously stable =sys-apps/systemd-226-r2

     Émeric
Comment 5 Mike Gilbert gentoo-dev 2017-07-02 15:21:56 UTC
Please report this upstream.
Comment 6 Mike Gilbert gentoo-dev 2017-07-02 15:42:05 UTC
I wonder how this version got marked stable if there is an obvious build failure.
Comment 7 Mike Gilbert gentoo-dev 2017-07-02 15:57:30 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc1c5167bcf33b3a500b072f5c40e8c2c7ab57c4

commit dc1c5167bcf33b3a500b072f5c40e8c2c7ab57c4
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Sun Jul 2 11:53:46 2017 -0400

    sys-apps/systemd: fix build failure on ia64/alpha
    
    Bug: https://bugs.gentoo.org/623536
    Bug: https://bugs.gentoo.org/612102
    Package-Manager: Portage-2.3.6_p9, Repoman-2.3.2_p77

 sys-apps/systemd/files/233-format-warnings.patch | 84 ++++++++++++++++++++++++
 sys-apps/systemd/systemd-233-r3.ebuild           |  1 +
 2 files changed, 85 insertions(+)
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-02 16:05:23 UTC
My guess would be older stable gcc-4.9 failed to do -Werror=format
and systemd passed the build just fine.

Now we have 5.4.0 as rest of arches and all the sad pops up.
Comment 9 Émeric Maschino 2017-07-13 06:53:33 UTC
(In reply to Mike Gilbert from comment #7)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=dc1c5167bcf33b3a500b072f5c40e8c2c7ab57c4
> 
> commit dc1c5167bcf33b3a500b072f5c40e8c2c7ab57c4
> Author: Mike Gilbert <floppym@gentoo.org>
> Date:   Sun Jul 2 11:53:46 2017 -0400
> 
>     sys-apps/systemd: fix build failure on ia64/alpha
>     
>     Bug: https://bugs.gentoo.org/623536
>     Bug: https://bugs.gentoo.org/612102
>     Package-Manager: Portage-2.3.6_p9, Repoman-2.3.2_p77
> 
>  sys-apps/systemd/files/233-format-warnings.patch | 84
> ++++++++++++++++++++++++
>  sys-apps/systemd/systemd-233-r3.ebuild           |  1 +
>  2 files changed, 85 insertions(+)

Would it then be possible to keyword =sys-apps/systemd-233-r3 alpha and ia64 stable?

Thanks,

     Émeric