Bug 197009 - net/libutp: utilities fail to build on amd64
Summary: net/libutp: utilities fail to build on amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Mikhail Teterin
URL:
Keywords: patch, regression
Depends on: 196351
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-22 21:40 UTC by Jan Beich
Modified: 2015-01-27 13:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (freebsd-2024)


Attachments
files/patch-size_t (1.47 KB, patch)
2015-01-22 21:40 UTC, Jan Beich
no flags Details | Diff
|poudriere testport| log for 8.4R amd64 (14.50 KB, text/plain)
2015-01-22 21:40 UTC, Jan Beich
no flags Details
|poudriere testport| log for 9.3R i386 (14.39 KB, text/plain)
2015-01-22 21:41 UTC, Jan Beich
no flags Details
|poudriere testport| log for 10.0R amd64 (15.96 KB, text/plain)
2015-01-22 21:43 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2015-01-22 21:40:03 UTC
Created attachment 152031 [details]
files/patch-size_t

Technically, a regression from ports r377674, not bug 196351.

utp_send.cpp:254:29: error: format specifies type 'unsigned int' but the argument
      has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
        printf("utp on_read %u\n", count);
                            ~~     ^~~~~
                            %lu
utp_send.cpp:394:59: error: format specifies type 'int' but the argument has type
      'size_t' (aka 'unsigned long') [-Werror,-Wformat]
  ...printf("\r[%u] sent: %d/%d  %.1f bytes/s  ", cur_time, total_sent, file_size...
                          ~~                                ^~~~~~~~~~
                          %lu
utp_send.cpp:394:71: error: format specifies type 'int' but the argument has type
      'size_t' (aka 'unsigned long') [-Werror,-Wformat]
  ...sent: %d/%d  %.1f bytes/s  ", cur_time, total_sent, file_size, rate);
              ~~                                         ^~~~~~~~~
              %lu
3 errors generated.
*** Error code 1

or

c++ -O2 -pipe -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -I.. -DPOSIX -c utp_send.cpp
cc1plus: warnings being treated as errors
utp_send.cpp: In function 'void utp_read(void*, const byte*, size_t)':
utp_send.cpp:254: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t'
utp_send.cpp: In function 'int main(int, char**)':
utp_send.cpp:394: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
utp_send.cpp:394: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
*** Error code 1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-22 21:40:03 UTC
Maintainer CC'd
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-01-22 21:40:45 UTC
Created attachment 152032 [details]
|poudriere testport| log for 8.4R amd64
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-01-22 21:41:22 UTC
Created attachment 152033 [details]
|poudriere testport| log for 9.3R i386
Comment 4 Jan Beich freebsd_committer freebsd_triage 2015-01-22 21:43:10 UTC
Created attachment 152034 [details]
|poudriere testport| log for 10.0R amd64
Comment 5 Mikhail T. 2015-01-22 21:44:47 UTC
Jan, thank you for the bug-report, I'll commit the fix in a minute -- there is no need for test-logs for something so trivial.
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-01-22 22:09:17 UTC
A commit references this bug:

Author: mi
Date: Thu Jan 22 22:08:59 UTC 2015
New revision: 377699
URL: https://svnweb.freebsd.org/changeset/ports/377699

Log:
  Add a patch to fix 64-bit specific warnings in the just-added utilities.

  PR:		197009
  Submitted by:	Jan Beich

Changes:
  head/net/libutp/files/patch-size_t
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-01-27 13:55:44 UTC
A commit references this bug:

Author: jbeich
Date: Tue Jan 27 13:55:30 UTC 2015
New revision: 378009
URL: https://svnweb.freebsd.org/changeset/ports/378009

Log:
  MFH: r377320 by riggs

    Convert to USE_GITHUB

    PR:		196616
    Submitted by:	jbeich@vfemail.net
    Approved by:	mi@FreeBSD.org (maintainer)

  MFH: r377674 by mi

    Add a patch fixing a long-standing security problem. Bump PORTREVISION.

    PR:		196351
    Differential Revision:	D1593
    Submitted by:	Jan Beich
    Security:	https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-6129

    While here, arrange for building a few of the small utilities bundled
    with library, and install them along with another potentially useful
    header-file.

    Sponsored by:	http://libpipe.com/

  MFH: r377699 by mi

    Add a patch to fix 64-bit specific warnings in the just-added utilities.

    PR:		197009
    Submitted by:	Jan Beich

  Approved by:	portmgr (mat, bapt)
  Approved by:	bapt (mentor)

Changes:
_U  branches/2015Q1/
  branches/2015Q1/net/libutp/Makefile
  branches/2015Q1/net/libutp/distinfo
  branches/2015Q1/net/libutp/files/BSDmakefile
  branches/2015Q1/net/libutp/files/BSDmakefile.utils
  branches/2015Q1/net/libutp/files/patch-CVE-2012-6129
  branches/2015Q1/net/libutp/files/patch-size_t
  branches/2015Q1/net/libutp/pkg-descr
  branches/2015Q1/net/libutp/pkg-plist