Bug 282667 - devel/corrade: fix build with libc++ 19
Summary: devel/corrade: fix build with libc++ 19
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: 280562
  Show dependency treegraph
 
Reported: 2024-11-10 12:46 UTC by Dimitry Andric
Modified: 2024-11-10 17:19 UTC (History)
0 users

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


Attachments
devel/corrade: fix build with libc++ 19 (2.42 KB, patch)
2024-11-10 12:47 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 2024-11-10 12:46:43 UTC
This port fails to build with libc++ 19, resulting in errors similar to:

  In file included from /wrkdirs/usr/ports/devel/corrade/work/corrade-2020.06-1783-gd83e30e5/src/Corrade/Utility/Directory.cpp:30:
  /wrkdirs/usr/ports/devel/corrade/work/corrade-2020.06-1783-gd83e30e5/src/Corrade/Utility/Directory.h:108:86: error: no template named 'pair' in namespace 'std'
    108 | CORRADE_DEPRECATED("use Path::splitExtension() instead") CORRADE_UTILITY_EXPORT std::pair<std::string, std::string> splitExtension(const std::string& path);
        |                                                                                 ~~~~~^
  /wrkdirs/usr/ports/devel/corrade/work/corrade-2020.06-1783-gd83e30e5/src/Corrade/Utility/Directory.h:127:76: error: no template named 'vector' in namespace 'std'
    127 | CORRADE_DEPRECATED("use Path::list() instead") CORRADE_UTILITY_EXPORT std::vector<std::string> list(const std::string& path,
        |                                                                       ~~~~~^

It is because corrade tries a rather fragile approach for
forward-declaring standard types such as std::vector, via
StlForwardXXX.h headers.

Update the version check in StlForwardVector.h to make it include the
real <vector> header for libc++ 19 and later.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-10 12:47:31 UTC
Created attachment 255070 [details]
devel/corrade: fix build with libc++ 19
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-11-10 17:19:05 UTC
Dimitry, thanks for the patch.

I've submitted this patch as a pull request and backported it into the port.


Thanks,
Yuri
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-10 17:19:58 UTC
A commit in branch main references this bug:

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

commit 6dccbda6e92d05b990b396f85e8fe0f42e1d54ef
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-11-10 17:15:08 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-11-10 17:19:11 +0000

    devel/corrade: fix build with libc++ 19

    PR:             282667
    Submitted by:   Dimitry Andric <dim@FreeBSD.org>

 devel/corrade/Makefile | 3 +++
 devel/corrade/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)