Bug 216069 - dns/dnsdist: fails to build with clang 4.0
Summary: dns/dnsdist: fails to build with clang 4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Carlos J. Puga Medina
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-14 15:35 UTC by Jan Beich
Modified: 2017-01-19 02:57 UTC (History)
0 users

See Also:
cpm: maintainer-feedback+
cpm: merge-quarterly?


Attachments
patch (2.01 KB, patch)
2017-01-18 01:57 UTC, Carlos J. Puga Medina
cpm: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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