Bug 263775 - devel/qcoro: fix build with libc++
Summary: devel/qcoro: fix build with libc++
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-kde (group)
Depends on:
Reported: 2022-05-04 15:26 UTC by Eric Camachat
Modified: 2022-05-05 10:09 UTC (History)
1 user (show)

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

fix build with libc++ (874 bytes, patch)
2022-05-04 15:26 UTC, Eric Camachat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Camachat 2022-05-04 15:26:50 UTC
Created attachment 233722 [details]
fix build with libc++

Fix build with apple-clang

libc++ doesn't implement any concepts yet, use variable templates

Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2022-05-04 19:13:23 UTC
This one is a little peculiar, because (a) we're not Apple Clang (b) the relevant concepts can be found in the clang headers on FreeBSD. Sure, this is an upstream commit, but our clang deals with concepts fine:

[adridg@beastie /tmp]$ c++ -std=c++20 t.cc
t.cc:14:3: error: no matching function for call to 'then'
t.cc:5:6: note: candidate template ignored: constraints not satisfied [with T = int]
auto then(T && c)
t.cc:4:16: note: because 'int' does not satisfy 'invocable'
requires (std::invocable<T>)

So the actual build failure should be examined more closely. Maybe 12.3 has an older clang?
Comment 2 Eric Camachat 2022-05-04 21:17:36 UTC
(In reply to Adriaan de Groot from comment #1)
I agreed you points. but this patch fixes my build on 13.0 amd64.
Also, It's a upstream fix, it will be in the source in next release.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-05 10:05:50 UTC
A commit in branch main references this bug:

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

commit e58af116e1038fcb3eb4db089458136a0bd5848d
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-05-05 10:01:32 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2022-05-05 10:01:32 +0000

    devel/qcoro: fix build on 13.0

    Fetch an upstream patch that fixes the build for "Apple Clang".
    While here, drop the "broken-on-12", at least so the cluster
    tries to build it on 12 and we can see (again) what's left to fix.

    PR:             263775
    Reported by:    Eric Camachat
    Obtained from:  Eric Camachat

 devel/qcoro/Makefile | 4 +++-
 devel/qcoro/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)