Bug 262077 - www/chromium 98.0.4758.102 build error "invalid capability name 'context'"
Summary: www/chromium 98.0.4758.102 build error "invalid capability name 'context'"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-chromium (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-20 22:22 UTC by George Mitchell
Modified: 2022-02-22 18:56 UTC (History)
4 users (show)

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


Attachments
Compressed build log (319.53 KB, application/x-xz)
2022-02-20 22:22 UTC, George Mitchell
no flags Details
patch-base_allocator_partition__allocator_starscan_state__bitmap.h (816 bytes, patch)
2022-02-22 06:14 UTC, Robert Nagy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Mitchell 2022-02-20 22:22:56 UTC
Created attachment 231971 [details]
Compressed build log

On FreeBSD 12.3-RELEASE-p1 r371497, building www/chromium 98.0.4758.102 yields the attached build log, ending with a bunch of these errors:

In file included from ../../base/profiler/stack_sampling_profiler.cc:5:
In file included from ../../base/profiler/stack_sampling_profiler.h:12:
In file included from ../../base/callback.h:15:
In file included from ../../base/bind.h:13:
In file included from ../../base/bind_internal.h:18:
In file included from ../../base/callback_internal.h:15:
In file included from ../../base/memory/ref_counted.h:18:
../../base/sequence_checker.h:103:48: warning: invalid capability name 'context'; capability name must be 'mutex' or 'role' [-Wthread-safety-attributes]
class THREAD_ANNOTATION_ATTRIBUTE__(capability("context"))

Compile options shown at the beginning of the log; unchanged from successful build of previous version.
Comment 1 Robert Nagy 2022-02-21 11:33:09 UTC
A fix is being tested for this issue.

The actual error is:

../../base/allocator/partition_allocator/starscan/state_bitmap.h:426:11: error: reference to non-static member function must be called
      if (Clear) {
          ^~~~~
3 warnings and 1 error generated.
Comment 2 George Mitchell 2022-02-21 14:52:30 UTC
Thanks for looking into this!  It's always a relief to find out I'm not the only one with the problem!  (And I have to remind myself that the last error is not always the real error.)
Comment 3 Robert Nagy 2022-02-22 06:14:59 UTC
Created attachment 232001 [details]
patch-base_allocator_partition__allocator_starscan_state__bitmap.h

The following patch fixes the build with older libc++.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-02-22 18:12:17 UTC
A commit in branch main references this bug:

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

commit 9b5c41643b8058ac5fc565dce3814c8e9f159db8
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2022-02-22 18:09:03 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2022-02-22 18:11:47 +0000

    www/chromium: fix build on 12.X (older libc++)

    PR:     262077
    Fixes:  a23dfd21 "www/chromium: update to 98.0.4758.102"

 ...rtition__allocator_starscan_state__bitmap.h (new) | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-02-22 18:20:20 UTC
A commit in branch 2022Q1 references this bug:

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

commit fdd6cc6195a1b5adeb6b38241b588a29b46e737d
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2022-02-22 18:09:03 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2022-02-22 18:12:27 +0000

    www/chromium: fix build on 12.X (older libc++)

    PR:     262077
    Fixes:  a23dfd21 "www/chromium: update to 98.0.4758.102"
    (cherry picked from commit 9b5c41643b8058ac5fc565dce3814c8e9f159db8)

 ...rtition__allocator_starscan_state__bitmap.h (new) | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Comment 6 George Mitchell 2022-02-22 18:56:39 UTC
Thanks for the fix!  Does this imply that "Clear" is a reserved word in some context??