Bug 293180 - science/mmdb2: fix build with libc++ 21
Summary: science/mmdb2: fix build with libc++ 21
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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-14 21:03 UTC by Dimitry Andric
Modified: 2026-03-13 08:42 UTC (History)
0 users

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


Attachments
science/mmdb2: fix build with libc++ 21 (1.40 KB, patch)
2026-02-14 21:04 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 2026-02-14 21:03:37 UTC
With lib++ 21 science/mmdb2 fails to build, with errors similar to:

    In file included from mmdb2/mmdb_machine_.cpp:41:
    mmdb2/mmdb_machine_.h:296:13: error: unknown type name 'size_t'; did you mean 'std::size_t'?
      296 |     typedef size_t fpstr_size_t;
          |             ^~~~~~
          |             std::size_t
    /usr/include/c++/v1/__cstddef/size_t.h:20:7: note: 'std::size_t' declared here
       20 | using size_t = decltype(sizeof(int));
          |       ^

This is because mmdb2 apparently relies on transitive includes getting
the declaration of size_t, but with libc++ 21 this no longer works. Add
an include of <stddef.h> to work around it.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-14 21:04:28 UTC
Created attachment 268056 [details]
science/mmdb2: fix build with libc++ 21
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:26:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=27612e339b813fd512365febb70d669cce20a53b

commit 27612e339b813fd512365febb70d669cce20a53b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 21:03:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:25:46 +0000

    science/mmdb2: fix build with libc++ 21

    With libc++ 21 science/mmdb2 fails to build, with errors similar to:

        In file included from mmdb2/mmdb_machine_.cpp:41:
        mmdb2/mmdb_machine_.h:296:13: error: unknown type name 'size_t'; did you mean 'std::size_t'?
          296 |     typedef size_t fpstr_size_t;
              |             ^~~~~~
              |             std::size_t
        /usr/include/c++/v1/__cstddef/size_t.h:20:7: note: 'std::size_t' declared here
           20 | using size_t = decltype(sizeof(int));
              |       ^

    This is because mmdb2 apparently relies on transitive includes getting
    the declaration of size_t, but with libc++ 21 this no longer works. Add
    an include of <stddef.h> to work around it.

    PR:             293180
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

 science/mmdb2/files/patch-mmdb2_mmdb__machine__.h (new) | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-03-13 08:26:33 UTC
A commit in branch 2026Q1 references this bug:

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

commit a1876f54a5a7dc46e0a7e89540ef1a35166afd30
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 21:03:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-03-13 08:26:19 +0000

    science/mmdb2: fix build with libc++ 21

    With libc++ 21 science/mmdb2 fails to build, with errors similar to:

        In file included from mmdb2/mmdb_machine_.cpp:41:
        mmdb2/mmdb_machine_.h:296:13: error: unknown type name 'size_t'; did you mean 'std::size_t'?
          296 |     typedef size_t fpstr_size_t;
              |             ^~~~~~
              |             std::size_t
        /usr/include/c++/v1/__cstddef/size_t.h:20:7: note: 'std::size_t' declared here
           20 | using size_t = decltype(sizeof(int));
              |       ^

    This is because mmdb2 apparently relies on transitive includes getting
    the declaration of size_t, but with libc++ 21 this no longer works. Add
    an include of <stddef.h> to work around it.

    PR:             293180
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

    (cherry picked from commit 27612e339b813fd512365febb70d669cce20a53b)

 science/mmdb2/files/patch-mmdb2_mmdb__machine__.h (new) | 10 ++++++++++
 1 file changed, 10 insertions(+)