Bug 216071 - dns/powerdns and dns/powerdns-recursor: fail to build with clang 4.0
Summary: dns/powerdns and dns/powerdns-recursor: fail 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: freebsd-ports-bugs mailing list
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-14 15:50 UTC by Jan Beich
Modified: 2017-01-20 19:46 UTC (History)
3 users (show)

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


Attachments
patch-pdns (2.04 KB, patch)
2017-01-18 18:24 UTC, Carlos J. Puga Medina
tremere: maintainer-approval+
Details | Diff
patch-pdns-recursor (2.10 KB, patch)
2017-01-18 18:24 UTC, Carlos J. Puga Medina
tremere: 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 2017-01-14 15:50:39 UTC
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;
               ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/JaVQ http://sprunge.us/EcNM
likely due to: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Jan Beich freebsd_committer 2017-01-17 20:13:35 UTC
cpm@ (via bug 216069) reported it upstream: https://github.com/dropbox/json11/issues/91
Comment 2 Carlos J. Puga Medina freebsd_committer 2017-01-18 18:24:14 UTC
Created attachment 179042 [details]
patch-pdns
Comment 3 Carlos J. Puga Medina freebsd_committer 2017-01-18 18:24:50 UTC
Created attachment 179043 [details]
patch-pdns-recursor
Comment 4 Ralf van der Enden 2017-01-19 07:39:05 UTC
Looking good.

The only thing that isn't necessary IMO is bumping the PORTREVISION. Nothing broke on anything before FBSD-12 (10.x, 11), so just adding the patch should be sufficient. But that's just me nitpicking. ;)
Comment 5 Jan Beich freebsd_committer 2017-01-19 07:53:17 UTC
(In reply to Ralf van der Enden from comment #4)
What about tracking accidental regressions for FreeBSD < 12? PORTREVISION bumps are supposed to be always done if runtime is affected, so users are aware of the risks involved (however minor).

I haven't actually checked if this is indeed the case here.
Comment 6 Carlos J. Puga Medina freebsd_committer 2017-01-20 19:08:48 UTC
Both ports build fine on 10.3/ai, 11.0/ai and 12.0/ai.

Jan, I can commit it if you want, unless you prefer to do it ;)
Comment 7 Jan Beich freebsd_committer 2017-01-20 19:25:02 UTC
(In reply to Carlos J. Puga Medina from comment #6)
The patches look fine from my POV. Can you land? I'm a bit busy myself analyzing ports blocking others with clang 4.0.
Comment 8 commit-hook freebsd_committer 2017-01-20 19:39:34 UTC
A commit references this bug:

Author: cpm
Date: Fri Jan 20 19:38:57 UTC 2017
New revision: 431990
URL: https://svnweb.freebsd.org/changeset/ports/431990

Log:
  dns/powerdns and dns/powerdns-recursor: unbreak build with clang 4.0

  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;
                 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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:		216071
  Submitted by:	cpm
  Reported by:	jbeich
  Reviewed by:	jbeich
  Approved by:	Ralf van der Enden <tremere@cainites.net> (maintainer)
  Obtained from:	upstream
  MFH:		2017Q1 (blanket)

Changes:
  head/dns/powerdns/Makefile
  head/dns/powerdns/files/patch-ext_json11_json11.cpp
  head/dns/powerdns-recursor/Makefile
  head/dns/powerdns-recursor/files/patch-ext_json11_json11.cpp
Comment 9 commit-hook freebsd_committer 2017-01-20 19:45:41 UTC
A commit references this bug:

Author: cpm
Date: Fri Jan 20 19:44:50 UTC 2017
New revision: 431992
URL: https://svnweb.freebsd.org/changeset/ports/431992

Log:
  MFH: r431990

  dns/powerdns and dns/powerdns-recursor: unbreak build with clang 4.0

  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;
                 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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:		216071
  Submitted by:	cpm
  Reported by:	jbeich
  Reviewed by:	jbeich
  Approved by:	Ralf van der Enden <tremere@cainites.net> (maintainer)
  Obtained from:	upstream

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/dns/powerdns/Makefile
  branches/2017Q1/dns/powerdns/files/patch-ext_json11_json11.cpp
  branches/2017Q1/dns/powerdns-recursor/Makefile
  branches/2017Q1/dns/powerdns-recursor/files/patch-ext_json11_json11.cpp
Comment 10 Carlos J. Puga Medina freebsd_committer 2017-01-20 19:46:33 UTC
Committed, thanks!