Bug 216069

Summary: dns/dnsdist: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Carlos J. Puga Medina <cpm>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch, patch-ready
Priority: --- Flags: cpm: maintainer-feedback+
cpm: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216071
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216160
Bug Depends on:    
Bug Blocks: 216008    
Attachments:
Description Flags
patch cpm: maintainer-approval+

Description Jan Beich freebsd_committer 2017-01-14 15:35:49 UTC
ext/json11/json11.cpp:153:24: error: invalid operands to binary expression
      ('nullptr_t' and 'nullptr_t')
        return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
               ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/json11/json11.cpp:209:5: note: in instantiation of member function
      'json11::Value<json11::Json::Type::NUL, nullptr_t>::less' requested here
    JsonNull() : Value(nullptr) {}
    ^

build log: http://sprunge.us/DWTf
likely due to: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Carlos J. Puga Medina freebsd_committer 2017-01-16 14:38:55 UTC
It was reported upstream:

https://github.com/PowerDNS/pdns/issues/4913

Thanks for reporting, Jan ;)
Comment 2 Carlos J. Puga Medina freebsd_committer 2017-01-18 01:57:16 UTC
Created attachment 179021 [details]
patch

Obtained from upstream: 
https://github.com/dropbox/json11/commit/bf6316cf4376a6047b8754ac006218eb6c446bb3
Comment 3 Jan Beich freebsd_committer 2017-01-18 12:17:25 UTC
Comment on attachment 179021 [details]
patch

Can you add a comment *in* the file about origin and apply the fix in bug 216071 as well? I confirm this is enough to unbreak build on /projects/clang400-import.
Comment 4 commit-hook freebsd_committer 2017-01-18 17:59:28 UTC
A commit references this bug:

Author: cpm
Date: Wed Jan 18 17:58:53 UTC 2017
New revision: 431820
URL: https://svnweb.freebsd.org/changeset/ports/431820

Log:
  dns/dnsdist: unbreak build with clang 4.0

  ext/json11/json11.cpp:153:24: error: invalid operands to binary expression
        ('nullptr_t' and 'nullptr_t')
          return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
                 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ext/json11/json11.cpp:209:5: note: in instantiation of member function
        'json11::Value<json11::Json::Type::NUL, nullptr_t>::less' requested here
      JsonNull() : Value(nullptr) {}
      ^

  PR:		216069
  Reported by:	jbeich
  Obtained from:	upstream
  MFH:		2017Q1

Changes:
  head/dns/dnsdist/Makefile
  head/dns/dnsdist/files/patch-ext_json11_json11.cpp
Comment 5 Carlos J. Puga Medina freebsd_committer 2017-01-18 18:01:10 UTC
(In reply to Jan Beich (mail not working) from comment #3)

Sure!
Comment 6 commit-hook freebsd_committer 2017-01-19 02:57:38 UTC
A commit references this bug:

Author: cpm
Date: Thu Jan 19 02:57:27 UTC 2017
New revision: 431835
URL: https://svnweb.freebsd.org/changeset/ports/431835

Log:
  MFH: r431820

  dns/dnsdist: unbreak build with clang 4.0

  ext/json11/json11.cpp:153:24: error: invalid operands to binary expression
        ('nullptr_t' and 'nullptr_t')
          return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
                 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ext/json11/json11.cpp:209:5: note: in instantiation of member function
        'json11::Value<json11::Json::Type::NUL, nullptr_t>::less' requested here
      JsonNull() : Value(nullptr) {}
      ^

  PR:		216069
  Reported by:	jbeich
  Obtained from:	upstream

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/dns/dnsdist/Makefile
  branches/2017Q1/dns/dnsdist/files/patch-ext_json11_json11.cpp