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)
Submitter is maintainer.
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'
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.
Created attachment 144432 [details] Unbreak for both, gcc and clang Adam, Could you try this patch with clang against ports head, please ?
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
Committed, thanks!
Created attachment 144950 [details] Sendip-2.5_4.patch
Why?
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.
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.
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
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
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.
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.