Bug 210723

Summary: net/mDNSResponder: Fails to build on 9.3-RELEASE
Product: Ports & Packages Reporter: Ryan Frederick <ryanrfrederick>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi, ryanrfrederick, w.schwarzenfeld
Priority: --- Keywords: easy, patch
Version: LatestFlags: pi: maintainer-feedback-
pi: merge-quarterly+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-mDNSShader__dnsextd_lexer_l
koobs: maintainer-approval+
svn-diff_net_mDNSResponder none

Description Ryan Frederick 2016-06-30 13:45:26 UTC
net/mDNSResponder version 625.41.2 fails during build on 9.3-RELEASE with the following exception:

cc -I../mDNSCore -I../mDNSShared -Iobjects/prod -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" -DHAVE_IPV6 -DTARGET_OS_FREEBSD -Os -DMDNS_DEBUGMSGS=0 -c -o objects/prod/dnsextd_parser.y.o objects/prod/dnsextd_parser.c
../mDNSShared/dnsextd_parser.y: In function 'ParseConfig':
../mDNSShared/dnsextd_parser.y:479: warning: implicit declaration of function 'yyparse'
cc -I../mDNSCore -I../mDNSShared -Iobjects/prod -fwrapv -W -Wall -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" -DHAVE_IPV6 -DTARGET_OS_FREEBSD -Os -DMDNS_DEBUGMSGS=0 -Wno-error -c -o objects/prod/dnsextd_lexer.l.o objects/prod/dnsextd_lexer.l.c
../mDNSShared/dnsextd_lexer.l: In function 'yylex':
../mDNSShared/dnsextd_lexer.l:77: error: 'yylineno' undeclared (first use in this function)
../mDNSShared/dnsextd_lexer.l:77: error: (Each undeclared identifier is reported only once
../mDNSShared/dnsextd_lexer.l:77: error: for each function it appears in.)
gmake: *** [Makefile:527: objects/prod/dnsextd_lexer.l.o] Error 1
*** [do-build] Error code 1
Comment 1 Walter Schwarzenfeld freebsd_triage 2016-07-01 00:52:45 UTC
This should work:

--- mDNSShared/dnsextd_lexer.l.orig     2016-07-01 02:42:05 UTC
+++ mDNSShared/dnsextd_lexer.l
@@ -21,8 +21,11 @@
 #include "dnsextd_parser.h"
 
 
+#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION <= 4
+int yylineno = 1;
+#endif
 
-extern YYSTYPE yylval;
+extern YYSTYPE yylval;
 
 #define YY_NO_INPUT 1
 int  yylex(void);
Comment 2 Walter Schwarzenfeld freebsd_triage 2016-07-01 02:13:45 UTC
Sorry, above patch does not work with poudriere.
Comment 3 Walter Schwarzenfeld freebsd_triage 2016-07-01 03:32:09 UTC
Created attachment 171992 [details]
patch-mDNSShader__dnsextd_lexer_l
Comment 4 Walter Schwarzenfeld freebsd_triage 2016-07-01 03:32:58 UTC
Need one more conditional. Compiles now with poudriere and port on 103amd64 und 93amd54.
Comment 5 Walter Schwarzenfeld freebsd_triage 2016-07-01 17:36:12 UTC
Also works on 93i386 and 103i386.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-18 10:11:50 UTC
Thank you for the patch Walter
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-18 10:12:28 UTC
Comment on attachment 171992 [details]
patch-mDNSShader__dnsextd_lexer_l

Maintainer timeout, implicit approval. Open to take
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-18 10:13:15 UTC
@Walter, if you could provide the patch as a unified diff against the port head (using make makepatch to create the files/patch-* file) that would be fantastic
Comment 9 Walter Schwarzenfeld freebsd_triage 2016-07-18 12:26:39 UTC
Created attachment 172647 [details]
svn-diff_net_mDNSResponder
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2016-07-18 17:16:21 UTC
testbuilds are OK
Comment 11 Kurt Jaeger freebsd_committer freebsd_triage 2016-07-18 17:16:32 UTC
Committed, thanks.
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-07-18 17:16:58 UTC
A commit references this bug:

Author: pi
Date: Mon Jul 18 17:16:24 UTC 2016
New revision: 418720
URL: https://svnweb.freebsd.org/changeset/ports/418720

Log:
  net/mDNSResponder: fix build on 9.3-RELEASE

  - older lex/flex needs yylineno

  PR:		210723
  MFH:		2016Q3
  Reported by:	Ryan Frederick <ryanrfrederick@gmail.com>
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:	sunpoet (maintainer timeout)

Changes:
  head/net/mDNSResponder/files/patch-dnsextd__lexer.l
Comment 13 commit-hook freebsd_committer freebsd_triage 2016-07-18 20:06:33 UTC
A commit references this bug:

Author: pi
Date: Mon Jul 18 20:05:42 UTC 2016
New revision: 418742
URL: https://svnweb.freebsd.org/changeset/ports/418742

Log:
  net/mDNSResponder: fix build on 9.3-RELEASE

  - older lex/flex needs yylineno

  PR:		210723
  MFH:		r418720
  Reported by:	Ryan Frederick <ryanrfrederick@gmail.com>
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:	portmgr (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net/mDNSResponder/files/patch-dnsextd__lexer.l
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2016-07-18 20:07:16 UTC
mfh done, thanks!