From nobody Fri Aug 09 17:35:56 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WgWKS4S8gz5SV1B; Fri, 09 Aug 2024 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WgWKS3XDZz45bW; Fri, 9 Aug 2024 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723224956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5dU0bjgDUUhR77Dku3vyF7nz52vhyQR8sg1Pde2cBQ=; b=hxDRy1LM2pjdJSFCJg1zrml7Pdx292G95jFyoqEQRpK4t5Gc++gNmfjmdwPGGMPW/S4/It J7O8X+7fXfVp8jUVM1MxqYaxQ6yb2HrCCi8R01XVz2DLEZ2Okg14iSQTvHTj3eZ/kDgM0o A//NniXkay4K5EFtfdVhogIkGpH+5/VbILykW/el7jlzltw6Oz02zwzh2c/hlpjMmEeKPE 2rDHoCXGnPZSR2v54gpwUMYgJqbqH58PWyttyhbx1n5OZ5AaUegx6dKUFU1vMgPKyKVb0O y5GPhY/N12i9hwg5sO6iSvhwYKtqynvwmcREelc9UvdLsZ1cag+zeG2PBnIhPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723224956; a=rsa-sha256; cv=none; b=aHn+aGV3sC0tWwbLY5QLH0A3GgzAKbs39wfGNOYPPlKS1REWxMDMa/JugbH9zkYY4q/bRj gRaZ8lGdlrv4mR4Nezq3IMjrqfn38yTVGwuK0ZxRUS4gdljmEPgsyCViUboynTgxqqiU1S Iyh4Aba1BkrsDXTQpq8rZ+tfDil8C0Ma6jNUNjOWuIbu87VoBCaIlice5ARbmtR6b1fRO7 teDWNcICwb9B+D9aMf/KdPPct+1lDe/dVNn4UIg1IYN+7SCKZpdTDSUFKiGjzALw2tl4oz +G+n8ckPuG4SQdK57ugID0Og+v5d6Qi6RoT/hRL+56smO5T8t3e4CduZedFIbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723224956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5dU0bjgDUUhR77Dku3vyF7nz52vhyQR8sg1Pde2cBQ=; b=E0Gu3LWykALfJI7RQWkn8EYzkNNX+E2qtRDXQ181pjsaVinJ+BUHjZgM07nFLAaphnAj1d H4Ikh7aOXQPWwsr577EEdpg7KaodBbv9V132WJcX5hWNZCEY5y9uaZvzIMvO1ShG4AHx2r fM8qd5CMwlXos5/cyHix0u2Mv31FeEMtGB16847OlTGwieWmtNPrLNFdS6LlVZ3A8zDqlN VJfKsUw4pl8ExaHbd2MBLLYYzz+ePPMoaT+/sNNSnNPhdIx+ONlmnm0meMWgkoEvHI/o20 zcUOQXrARzKNzz0de8O0MePftqONYmUAPSClwpj/AYvg1jDWxOD2eccRxh8sAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WgWKS2rfPzQXv; Fri, 9 Aug 2024 17:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 479HZuq6000869; Fri, 9 Aug 2024 17:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 479HZuuR000866; Fri, 9 Aug 2024 17:35:56 GMT (envelope-from git) Date: Fri, 9 Aug 2024 17:35:56 GMT Message-Id: <202408091735.479HZuuR000866@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: eddc2f815b3f - main - net/kea: fix build with libc++ 19 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eddc2f815b3fac6d363e93e7f9ec4dabc816b0c9 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=eddc2f815b3fac6d363e93e7f9ec4dabc816b0c9 commit eddc2f815b3fac6d363e93e7f9ec4dabc816b0c9 Author: Dimitry Andric AuthorDate: 2024-08-08 18:34:30 +0000 Commit: Dimitry Andric CommitDate: 2024-08-09 17:34:46 +0000 net/kea: fix build with libc++ 19 As noted in the libc++ 19 release notes [1], std::char_traits<> is now only provided for char, char8_t, char16_t, char32_t and wchar_t, and any instantiation for other types will fail. This causes net/kea to fail to compile with clang 19 and libc++ 19, resulting in errors similar to: In file included from edns.cc:9: In file included from ../../../src/lib/exceptions/exceptions.h:11: /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits' 820 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ ../../../src/lib/dns/name.h:727:16: note: in instantiation of template class 'std::basic_string' requested here 727 | NameString ndata_; | ^ /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ `NameString` is defined as `std::basic_string`, which is no longer possible. So redefine it as a `std::vector` instead. This requires a few adjustments in other places: adjusting the arguments for the `assign()` method, which for `std::vector` takes a begin and end iterator, instead of a begin iterator and a size, and replacing the `append()` method with an equivalent `insert()`. These changes have also been sent upstream [2]. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals [2] https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2410 PR: 280696 Approved by: apevnev@me.com (maintainer) MFH: 2024Q3 --- net/kea/files/patch-src_lib_dns_name.cc | 56 +++++++++++++++++++++++++++++++++ net/kea/files/patch-src_lib_dns_name.h | 11 +++++++ 2 files changed, 67 insertions(+) diff --git a/net/kea/files/patch-src_lib_dns_name.cc b/net/kea/files/patch-src_lib_dns_name.cc new file mode 100644 index 000000000000..745b4f6f66ca --- /dev/null +++ b/net/kea/files/patch-src_lib_dns_name.cc @@ -0,0 +1,56 @@ +--- src/lib/dns/name.cc.orig 2024-07-25 08:50:58 UTC ++++ src/lib/dns/name.cc +@@ -303,7 +303,7 @@ Name::Name(const std::string &namestring, bool downcas + // And get the output + labelcount_ = offsets.size(); + isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS); +- ndata_.assign(ndata.data(), ndata.size()); ++ ndata_.assign(ndata.data(), ndata.data() + ndata.size()); + length_ = ndata_.size(); + offsets_.assign(offsets.begin(), offsets.end()); + } +@@ -336,7 +336,7 @@ Name::Name(const char* namedata, size_t data_len, cons + // Get the output + labelcount_ = offsets.size(); + isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS); +- ndata_.assign(ndata.data(), ndata.size()); ++ ndata_.assign(ndata.data(), ndata.data() + ndata.size()); + length_ = ndata_.size(); + offsets_.assign(offsets.begin(), offsets.end()); + +@@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, cons + // Drop the last character of the data (the \0) and append a copy of + // the origin's data + ndata_.erase(ndata_.end() - 1); +- ndata_.append(origin->ndata_); ++ ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end()); + + // Do a similar thing with offsets. However, we need to move them + // so they point after the prefix we parsed before. +@@ -582,7 +582,7 @@ Name::concatenate(const Name& suffix) const { + + Name retname; + retname.ndata_.reserve(length); +- retname.ndata_.assign(ndata_, 0, length_ - 1); ++ retname.ndata_.assign(ndata_.data(), ndata_.data() + length_ - 1); + retname.ndata_.insert(retname.ndata_.end(), + suffix.ndata_.begin(), suffix.ndata_.end()); + isc_throw_assert(retname.ndata_.size() == length); +@@ -622,7 +622,7 @@ Name::reverse() const { + NameString::const_iterator n0 = ndata_.begin(); + retname.offsets_.push_back(0); + while (rit1 != offsets_.rend()) { +- retname.ndata_.append(n0 + *rit1, n0 + *rit0); ++ retname.ndata_.insert(retname.ndata_.end(), n0 + *rit1, n0 + *rit0); + retname.offsets_.push_back(retname.ndata_.size()); + ++rit0; + ++rit1; +@@ -662,7 +662,7 @@ Name::split(const unsigned int first, const unsigned i + // original name, and append the trailing dot explicitly. + // + retname.ndata_.reserve(retname.offsets_.back() + 1); +- retname.ndata_.assign(ndata_, offsets_[first], retname.offsets_.back()); ++ retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back()); + retname.ndata_.push_back(0); + + retname.length_ = retname.ndata_.size(); diff --git a/net/kea/files/patch-src_lib_dns_name.h b/net/kea/files/patch-src_lib_dns_name.h new file mode 100644 index 000000000000..e83fde6a960d --- /dev/null +++ b/net/kea/files/patch-src_lib_dns_name.h @@ -0,0 +1,11 @@ +--- src/lib/dns/name.h.orig 2024-07-25 08:50:58 UTC ++++ src/lib/dns/name.h +@@ -228,7 +228,7 @@ class Name { (private) + //@{ + private: + /// \brief Name data string +- typedef std::basic_string NameString; ++ typedef std::vector NameString; + /// \brief Name offsets type + typedef std::vector NameOffsets; +