Bug 271392 - misc/pinfo: build fails on 13.2
Summary: misc/pinfo: build fails on 13.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Juraj Lutter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-13 18:59 UTC by Alexey Vyskubov
Modified: 2023-05-13 20:22 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (otis)


Attachments
Patch for fixing the compilation problem (1.39 KB, patch)
2023-05-13 18:59 UTC, Alexey Vyskubov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Vyskubov 2023-05-13 18:59:35 UTC
Created attachment 242145 [details]
Patch for fixing the compilation problem

I did

gitup ports && cd /usr/ports/misc/pinfo && make rmconfig clean install


and then pressed Enter to accept default options. I am using the 'latest' branch for ports. The port failed to build:

...
--- pinfo-video.o ---
video.c:112:41: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
                                       ~~             ^~~~~~~~~~~~~~
                                       %lu
video.c:112:57: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
                                          ~~                          ^~~~~
                                          %lu
video.c:112:63: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
                                              ~~                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                              %lu
video.c:114:42: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, 100%%"), lines, lines);
                                       ~~              ^~~~~
                                       %lu
video.c:114:49: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
                printw(_("Viewing line %d/%d, 100%%"), lines, lines);
                                          ~~                  ^~~~~
                                          %lu
5 errors generated.
*** [pinfo-video.o] Error code 1

make[4]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13/src
1 error

make[4]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13/src

make[3]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13

make[2]: stopped in /usr/ports/misc/pinfo/work/pinfo-0.6.13
===> Compilation failed unexpectedly.
...

I attach the patch which fixes the compilation.
Comment 1 Alexey Vyskubov 2023-05-13 19:10:41 UTC
It looks like the bug is fixed upstream: https://github.com/baszoetekouw/pinfo/pull/27/commits/ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-05-13 20:09:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3e0e9d790e78ab9da05bce1dadd095f9b0c14e3a

commit 3e0e9d790e78ab9da05bce1dadd095f9b0c14e3a
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2023-05-13 20:03:00 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2023-05-13 20:08:39 +0000

    misc/pinfo: Fix build with newer ncurses

    - Fix build on FreeBSD 13.2

    PR:             271392

 misc/pinfo/Makefile | 6 +++++-
 misc/pinfo/distinfo | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-05-13 20:10:02 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=23cbc6433f3a513e32ca14ff60d55c4d9a361027

commit 23cbc6433f3a513e32ca14ff60d55c4d9a361027
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2023-05-13 20:03:00 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2023-05-13 20:09:30 +0000

    misc/pinfo: Fix build with newer ncurses

    - Fix build on FreeBSD 13.2

    PR:             271392
    (cherry picked from commit 3e0e9d790e78ab9da05bce1dadd095f9b0c14e3a)

 misc/pinfo/Makefile | 6 +++++-
 misc/pinfo/distinfo | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Comment 4 Juraj Lutter freebsd_committer freebsd_triage 2023-05-13 20:21:48 UTC
Committed, thanks.