Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656984 - net-fs/nfs-utils-2.3.2 on sparc - testlk.c:84:45: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__off64_t {aka long long int}’ [-Werror=format=]
Summary: net-fs/nfs-utils-2.3.2 on sparc - testlk.c:84:45: error: format ‘%ld’ expects...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-31 17:18 UTC by Ben Kohler
Modified: 2018-06-19 05:58 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,103.82 KB, text/plain)
2018-05-31 17:20 UTC, Ben Kohler
Details
testlk.patch (file_656984.txt,680 bytes, patch)
2018-06-01 10:01 UTC, Erik Fjeldstrom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2018-05-31 17:18:54 UTC
This new nfs-utils-2.3.2 release is failing to build on my sparc machine.
Comment 1 Ben Kohler gentoo-dev 2018-05-31 17:20:00 UTC
Created attachment 534298 [details]
build.log

Portage 2.3.40 (python 3.5.5-final-0, default/linux/sparc/17.0, gcc-6.4.0, glibc-2.27-r3, 4.16.12-gentoo sparc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.16.12-gentoo-sparc64-sun4v-with-gentoo-2.6
KiB Mem:    16495624 total,  13590816 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 30 May 2018 12:15:01 +0000
Head commit of repository gentoo: 3d0598f23fc67ea998f384c25b6083a9676da027
Head commit of repository iamben: e08d8873c24fd9e07c9df6172503320c375eb981

sh bash 4.4_p19
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.4_p19::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/cmake:           3.11.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.30-r2::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.1.2/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 32
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

iamben
    location: /var/repo/iamben-overlay
    sync-type: git
    sync-uri: https://github.com/benkohler/iamben-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="sparc ~sparc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=native -mtune=native -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=native -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j3 --autounmask=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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=""
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=""
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j32"
PKGDIR="/usr/portage/packages"
PORTAGE_BZIP2_COMMAND="lbzip2"
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="acl berkdb big-endian bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 modules ncurses nls nptl openmp pam pcre readline sparc ssl systemd tcpd unicode xattr zlib" 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 plan sheets stage words" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="dummy" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

net-fs/nfs-utils-2.3.1-r3::gentoo was built with the following:
USE="ipv6 libmount nfsidmap nfsv4 tcpd uuid -caps -kerberos -ldap -nfsdcld -nfsv41 (-selinux)"
Comment 2 Ben Kohler gentoo-dev 2018-05-31 17:35:39 UTC
A few other notes:

1. I am still able to build 2.3.1-r3 successfully

2. I have tried with more relaxed CFLAGS="-O2 -pipe -mcpu=ultrasparc", no help

3. I am allowing unkeyworded glibc-2.27 for bug 640966, hopefully that is not involved
Comment 3 Xavier Miller (RETIRED) gentoo-dev 2018-05-31 19:30:04 UTC
Same here on a arm chroot and i686 chroot, in a amd64 host
Comment 4 Sven Müller 2018-06-01 06:49:47 UTC
Same on ARM (32bit) native compiled (no chroot, no distcc). 

testlk.c: In function ‘main’:
testlk.c:84:45: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__off64_t {aka long long int}’ [-Werror=format=]
    printf("%s: conflicting lock by %d on (%ld;%ld)\n",
                                           ~~^
                                           %lld
     fname, fl.l_pid, fl.l_start, fl.l_len);
                      ~~~~~~~~~~
testlk.c:84:49: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘__off64_t {aka long long int}’ [-Werror=format=]
    printf("%s: conflicting lock by %d on (%ld;%ld)\n",
                                               ~~^
                                               %lld
     fname, fl.l_pid, fl.l_start, fl.l_len);
                                  ~~~~~~~~
testlk.c:30:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    usage(0);
    ^~~~~~~~
testlk.c:31:3: note: here
   case 'r':
   ^~~~
cc1: some warnings being treated as errors

emerge --info: 
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CC="armv7a-hardfloat-linux-gnueabi-gcc"
CFLAGS="-Ofast -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mtls-dialect=gnu -mfloat-abi=hard -pipe -fomit-frame-pointer -fstack-protector-strong"
CHOST="armv7a-hardfloat-linux-gnueabi"
Comment 5 Erik Fjeldstrom 2018-06-01 10:01:00 UTC
Created attachment 534382 [details, diff]
testlk.patch

This is a quick hack to fix ./tools/locktest/testlk.c so that the build does not break. Someone assumed that long==64-bit in a printf(), which is incorrect on a 32-bit platform; I changed it into a long long, which should work everywhere. The change is somewhat moot, however, as this a test program that AFAICT doesn't even get installed.
Comment 6 Xavier Miller (RETIRED) gentoo-dev 2018-06-11 10:47:27 UTC
attachment 534382 [details, diff] is working for me
Comment 7 SpanKY gentoo-dev 2018-06-19 05:55:31 UTC
rather than cast to long long, how about using intmax_t and %j

either way, this should be sent upstream
Comment 8 Larry the Git Cow gentoo-dev 2018-06-19 05:58:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fd435f4846f33b0e98d869f5e1881d77b5d3727

commit 0fd435f4846f33b0e98d869f5e1881d77b5d3727
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: 2018-06-19 05:56:55 +0000
Commit:     Mike Frysinger <vapier@gentoo.org>
CommitDate: 2018-06-19 05:58:23 +0000

    net-fs/nfs-utils: drop -Werror flags from build #656984
    
    Closes: https://bugs.gentoo.org/656984

 .../files/nfs-utils-2.3.2-no-werror.patch          | 53 ++++++++++++++++++++++
 net-fs/nfs-utils/nfs-utils-2.3.2.ebuild            |  1 +
 2 files changed, 54 insertions(+)