Bug 191426 - [PATCH] net-mgmt/sendip: Fix package build
Summary: [PATCH] net-mgmt/sendip: Fix package build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-26 22:09 UTC by Marco Steinbach
Modified: 2014-07-24 23:16 UTC (History)
2 users (show)

See Also:


Attachments
sendip-2.5_3.patch (2.14 KB, patch)
2014-06-26 22:09 UTC, Marco Steinbach
no flags Details | Diff
Unbreak for both, gcc and clang (3.07 KB, patch)
2014-07-05 18:49 UTC, Marco Steinbach
coco: maintainer-approval+
Details | Diff
Sendip-2.5_4.patch (1.11 KB, patch)
2014-07-24 22:44 UTC, Marco Steinbach
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Steinbach 2014-06-26 22:09:07 UTC
Created attachment 144177 [details]
sendip-2.5_3.patch

- Fix package build by unbreaking correctly (submitted wrong patchset with previous portrevision)
- Bump portrevision

Port maintainer (coco@executive-computing.de) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: SVN)
Comment 1 Marco Steinbach 2014-06-29 17:17:38 UTC
Submitter is maintainer.
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2014-07-05 16:04:21 UTC
For me, that patch BREAKS build, and builds fine without it.

cc -o ripng.so -O2 -pipe -mtune=native -march=native -O2 -pipe -Qunused-arguments -fstack-protector -fno-strict-aliasing -fPIC -fsigned-char -pipe -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wnested-externs -Winline -Werror -Wcast-align -DSENDIP_LIBS=\"/usr/local/lib/sendip\" -shared ripng.c csum.o compact.o
rip.c:64:38: error: while loop has empty body [-Werror,-Wempty-body]
                while(*(q++)!=':') /* do nothing */; *(--q)='\0';
                                                   ^
rip.c:64:38: note: put the semicolon on a separate line to silence this warning
rip.c:67:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
                                                          ^
rip.c:67:45: note: put the semicolon on a separate line to silence this warning
rip.c:70:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
                                                          ^
rip.c:70:45: note: put the semicolon on a separate line to silence this warning
rip.c:72:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
                                                          ^
rip.c:72:45: note: put the semicolon on a separate line to silence this warning
rip.c:74:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
                                                          ^
rip.c:74:45: note: put the semicolon on a separate line to silence this warning
rip.c:76:46: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!='\0') /* do nothing */; *(--q)='\0';
                                                           ^
rip.c:76:46: note: put the semicolon on a separate line to silence this warning
6 errors generated.
gmake[1]: *** [rip.so] Error 1
gmake[1]: *** Waiting for unfinished jobs....
ripng.c:80:38: error: while loop has empty body [-Werror,-Wempty-body]
                while(*(q++)!='/') /* do nothing */; *(--q)='\0';
                                                   ^
ripng.c:80:38: note: put the semicolon on a separate line to silence this warning
ripng.c:83:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0';
                                                          ^
ripng.c:83:45: note: put the semicolon on a separate line to silence this warning
ripng.c:86:45: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0';
                                                          ^
ripng.c:86:45: note: put the semicolon on a separate line to silence this warning
ripng.c:89:46: error: while loop has empty body [-Werror,-Wempty-body]
                p=++q; while(*(q++)!='\0') /* do nothing */; *(--q)='\0';
                                                           ^
ripng.c:89:46: note: put the semicolon on a separate line to silence this warning
ripng.c:105:18: error: implicit conversion from '__uint16_t' (aka 'unsigned short') to 'u_int8_t' (aka 'unsigned char') changes value from 4096 to 0 [-Werror,-Wconstant-conversion]
                ripopt->metric=htons((u_int16_t)16);
                              ~^~~~~~~~~~~~~~~~~~~~
/usr/include/netinet/in.h:118:18: note: expanded from macro 'htons'
#define htons(x)        __htons(x)
                        ^~~~~~~~~~
/usr/include/x86/endian.h:127:20: note: expanded from macro '__htons'
#define __htons(x)      __bswap16(x)
                        ^~~~~~~~~~~~
/usr/include/x86/endian.h:74:3: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
gmake[1]: *** [ripng.so] Error 1
gmake[1]: Leaving directory `/usr/BUILD-ports/head/net-mgmt/sendip/work/sendip-2.5'
Comment 3 Marco Steinbach 2014-07-05 17:27:01 UTC
On hindsight, I think bapt@ added the flags to my original patch to make llvm on 10.x happy, which now lead to the build breaking with gcc on 9.x again.

See e.g.: http://beefy2.isc.freebsd.org/bulk/91amd64-default/2014-07-04_15h28m47s/logs/sendip-2.5_2.log

Thank you for testing -- I'll create a new patch, which will try and take care of that.
Comment 4 Marco Steinbach 2014-07-05 18:49:14 UTC
Created attachment 144432 [details]
Unbreak for both, gcc and clang

Adam,

Could you try this patch with clang against ports head, please ?
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-07-05 23:55:52 UTC
A commit references this bug:

Author: adamw
Date: Sat Jul  5 23:55:32 UTC 2014
New revision: 360850
URL: http://svnweb.freebsd.org/changeset/ports/360850

Log:
  Fix build with gcc by adding some compiler flags.

  PR:		ports/191426
  Submitted by:	Marco Steinbach (maintainer)

Changes:
  head/net-mgmt/sendip/Makefile
  head/net-mgmt/sendip/files/patch-Makefile
Comment 6 Adam Weinberger freebsd_committer freebsd_triage 2014-07-05 23:57:05 UTC
Committed, thanks!
Comment 7 Marco Steinbach 2014-07-24 22:44:30 UTC
Created attachment 144950 [details]
Sendip-2.5_4.patch
Comment 8 Adam Weinberger freebsd_committer freebsd_triage 2014-07-24 22:46:30 UTC
Why?
Comment 9 Marco Steinbach 2014-07-24 22:47:53 UTC
The new file files/patch-ripng.h, that was contained in all previous patches seems to have gotten lost during the commits, and subsequently the build breaks again:

ripng.c: In function 'do_opt':
ripng.c:105: warning: large integer implicitly truncated to unsigned type
gmake: *** [ripng.so] Error 1
*** [do-build] Error code 1

The latest patch bumps PORTREVISION to 4, and again explicitly adds the currently missing file.
Comment 10 Adam Weinberger freebsd_committer freebsd_triage 2014-07-24 22:49:57 UTC
Check https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144950&action=diff&context=patch&collapsed=&headers=1&format=raw

There's no data in that file in any of the patches on this PR.
Comment 11 Marco Steinbach 2014-07-24 22:55:00 UTC
Here's the contents of Sendip-2.5_4.patch, which I just downloaded.

The diff does not show the new file, although it's in the patch file.

Index: Makefile
===================================================================
--- Makefile    (revision 362794)
+++ Makefile    (working copy)
@@ -3,7 +3,7 @@

 PORTNAME=      sendip
 PORTVERSION=   2.5
-PORTREVISION=  3
+PORTREVISION=  4
 CATEGORIES=    net-mgmt ipv6
 MASTER_SITES=  http://www.earth.li/projectpurple/files/

Index: files/patch-ripng.h
===================================================================
--- files/patch-ripng.h (revision 0)
+++ files/patch-ripng.h (working copy)
@@ -0,0 +1,11 @@
+--- ripng.h.orig       2014-07-25 00:06:01.000000000 +0200
++++ ripng.h    2014-07-25 00:06:18.000000000 +0200
+@@ -15,7 +15,7 @@
+       struct in6_addr prefix;
+       u_int16_t tag;
+       u_int8_t len;
+-      u_int8_t metric;
++      u_int16_t metric;
+ } ripng_entry;
+
+ /* Defines for which parts have been modified

Property changes on: files/patch-ripng.h
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Comment 12 commit-hook freebsd_committer freebsd_triage 2014-07-24 22:59:20 UTC
A commit references this bug:

Author: adamw
Date: Thu Jul 24 22:59:06 UTC 2014
New revision: 362858
URL: http://svnweb.freebsd.org/changeset/ports/362858

Log:
  Add a patch that got mysteriously eaten by bugzilla.

  PR:		191426
  Submitted by:	maintainer

Changes:
  head/net-mgmt/sendip/files/patch-ripng.h
Comment 13 Adam Weinberger freebsd_committer freebsd_triage 2014-07-24 23:00:40 UTC
How odd. I have no idea why Bugzilla eats patch files like that.

Either way, I've committed that missing patch file now. Given that it fixes a build failure, there's not much reason to bump PORTREVISION.
Comment 14 Marco Steinbach 2014-07-24 23:16:19 UTC
Thanks for taking care of that so quickly.  I just checked one of my other in-flight patches (Bug 190799), and Bugzillas diff also exposes quite some oddities compared to the patch itself.