nfstrace: FTBFS: header_window.cpp:77:82: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]

Bug #1965155 reported by Nick Rosbrook
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfstrace (Debian)
Fix Released
Unknown
nfstrace (Ubuntu)
Fix Released
Undecided
Nick Rosbrook

Bug Description

Imported from Debian bug http://bugs.debian.org/997231:

Source: nfstrace
Version: 0.4.3.2+git20200805+b220d04-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/analyzers/src/watch && /usr/bin/c++ -Dwatch_EXPORTS -I/<<PKGBUILDDIR>>/src -I/usr/include/tirpc -I/<<PKGBUILDDIR>>/analyzers/src/watch -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -pedantic -Wall -Werror -Wextra -Wno-invalid-offsetof -Wno-error=address-of-packed-member -fPIC -fvisibility=hidden -fPIC -MD -MT analyzers/src/watch/CMakeFiles/watch.dir/nc_windows/header_window.cpp.o -MF CMakeFiles/watch.dir/nc_windows/header_window.cpp.o.d -o CMakeFiles/watch.dir/nc_windows/header_window.cpp.o -c /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp
> /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp: In member function ‘void HeaderWindow::update()’:
> /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp:77:82: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
> 77 | mvwprintw(_window, HEADER::ELAPSED_LINE, FIRST_CHAR_POS, "Elapsed time: \t %d days; %d:%d:%d times",
> | ~^
> | |
> | int
> | %ld
> 78 | shift_time / SECINDAY, shift_time % SECINDAY / SECINHOUR, shift_time % SECINHOUR / SECINMIN, shift_time % SECINMIN);
> | ~~~~~~~~~~~~~~~~~~~~~
> | |
> | time_t {aka long int}
> /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp:77:91: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
> 77 | mvwprintw(_window, HEADER::ELAPSED_LINE, FIRST_CHAR_POS, "Elapsed time: \t %d days; %d:%d:%d times",
> | ~^
> | |
> | int
> | %ld
> 78 | shift_time / SECINDAY, shift_time % SECINDAY / SECINHOUR, shift_time % SECINHOUR / SECINMIN, shift_time % SECINMIN);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | time_t {aka long int}
> /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp:77:94: error: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
> 77 | mvwprintw(_window, HEADER::ELAPSED_LINE, FIRST_CHAR_POS, "Elapsed time: \t %d days; %d:%d:%d times",
> | ~^
> | |
> | int
> | %ld
> 78 | shift_time / SECINDAY, shift_time % SECINDAY / SECINHOUR, shift_time % SECINHOUR / SECINMIN, shift_time % SECINMIN);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | time_t {aka long int}
> /<<PKGBUILDDIR>>/analyzers/src/watch/nc_windows/header_window.cpp:77:97: error: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
> 77 | mvwprintw(_window, HEADER::ELAPSED_LINE, FIRST_CHAR_POS, "Elapsed time: \t %d days; %d:%d:%d times",
> | ~^
> | |
> | int
> | %ld
> 78 | shift_time / SECINDAY, shift_time % SECINDAY / SECINHOUR, shift_time % SECINHOUR / SECINMIN, shift_time % SECINMIN);
> | ~~~~~~~~~~~~~~~~~~~~~
> | |
> | time_t {aka long int}
> cc1plus: all warnings being treated as errors
> make[3]: *** [analyzers/src/watch/CMakeFiles/watch.dir/build.make:79: analyzers/src/watch/CMakeFiles/watch.dir/nc_windows/header_window.cpp.o] Error 1

The full build log is available from:
http://qa-logs.debian.net/2021/10/23/nfstrace_0.4.3.2+git20200805+b220d04-2_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.

Nick Rosbrook (enr0n)
Changed in nfstrace (Ubuntu):
assignee: nobody → Nick Rosbrook (enr0n)
tags: added: update-e
tags: added: update-excuse
removed: update-e
Changed in nfstrace (Debian):
importance: Undecided → Unknown
Revision history for this message
Nick Rosbrook (enr0n) wrote :
Revision history for this message
Nick Rosbrook (enr0n) wrote :
Revision history for this message
Nick Rosbrook (enr0n) wrote :

This patch addresses the follow-on issues seen on armhf and ppc64el. Build tested in my PPA [1].

[1] https://launchpad.net/~enr0n/+archive/ubuntu/nfstrace/+packages

Changed in nfstrace (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfstrace - 0.4.3.2+git20200805+b220d04-2.2~build1

---------------
nfstrace (0.4.3.2+git20200805+b220d04-2.2~build1) jammy; urgency=medium

  * Upload to jammy

 -- Gianfranco Costamagna <email address hidden> Fri, 18 Mar 2022 18:51:28 +0100

Changed in nfstrace (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.