Bug 271850 - net/libzmq4: fix build with libc++ 16
Summary: net/libzmq4: fix build with libc++ 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-06-05 20:37 UTC by Dimitry Andric
Modified: 2023-06-06 17:51 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
net/libzmq4: fix build with libc++ 16 (2.35 KB, patch)
2023-06-05 20:38 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-06-05 20:37:22 UTC
Like recent versions of GNU libstdc++, libc++ 16 now has a static
assertion to ensure that custom allocators have the correct rebind
member, and this assertion fires when building libzmq4:

  In file included from src/curve_client.cpp:35:
  In file included from ./src/msg.hpp:40:
  In file included from ./src/metadata.hpp:33:
  In file included from /usr/include/c++/v1/map:2356:
  In file included from /usr/include/c++/v1/functional:515:
  In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:26:
  /usr/include/c++/v1/vector:372:5: error: static assertion failed due to requirement 'is_same<zmq::secure_allocator_t<unsigned char>, std::allocator<unsigned char>>::value': [allocator.requirements] states that rebinding an allocator to the same type should result in the original allocator
      static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Upstream fixed this in
<https://github.com/zeromq/libzmq/commit/438d5d88>, so apply that patch.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-05 20:38:51 UTC
Created attachment 242624 [details]
net/libzmq4: fix build with libc++ 16
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-06-06 17:49:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6b379f1b6bbf8967800fa9e2b164e2a9b58f6778

commit 6b379f1b6bbf8967800fa9e2b164e2a9b58f6778
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-06 14:45:29 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-06 17:47:37 +0000

    net/libzmq4: Fix build with libc++ 16

    Like recent versions of GNU libstdc++, libc++ 16 now has a static
    assertion to ensure that custom allocators have the correct rebind
    member, and this assertion fires error when building.

    Upstream fixed this in
    <https://github.com/zeromq/libzmq/commit/438d5d88>, so apply that patch.

    PR:             271850

 net/libzmq4/Makefile | 3 +++
 net/libzmq4/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-06-06 17:51:34 UTC
Committed with changes in commit log.