Bug 283051 - lang/spidermonkey91: fix build with clang and libc++ 19
Summary: lang/spidermonkey91: fix build with clang and 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: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-11-30 15:29 UTC by Dimitry Andric
Modified: 2024-12-13 23:36 UTC (History)
1 user (show)

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


Attachments
lang/spidermonkey91: fix build with clang and libc++ 19 (3.95 KB, patch)
2024-11-30 15:30 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-30 15:29:13 UTC
Clang 19 now diagnoses incorrect member accesses, which causes
lang/spidermonkey91 to fail with an error similar to:

  /wrkdirs/usr/ports/lang/spidermonkey91/work/firefox-91.13.0/js/src/threading/ExclusiveData.h:113:29: error: reference to non-static member function must be called
    113 |       : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
        |                         ~~~~^~~~

Upstream fixed this for https://bugzilla.mozilla.org/1894423 in
changeset 223087fdc29f18678f6174e9807b8780e439acf6 [2], so pull this in
as a patch and apply it.

Also, as noted in the libc++ 19 release notes [1], std::char_traits<> is
now only provided for char, char8_t, char16_t, char32_t and wchar_t, and
any instantiation for other types will fail.

With lang/spidermonkey91 and clang/libc++ 19 this results in errors
similar to:

  /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:208:20: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
    208 |       iter_ = std::char_traits<CharT>::find(
        |                    ^
  /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:769:21: note: in instantiation of member function 'SepKeywordIterator<unsigned char>::next' requested here
    769 |     beginKey = iter.next();
        |                     ^
  /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:808:16: note: in instantiation of function template specialization 'FindUnicodeExtensionType<unsigned char>' requested here
    808 |              ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
        |                ^

Upstream fixed this for https://bugzilla.mozilla.org/1849070 in
changeset 68ff4d3f7338248b4d67cf03aade5a73f8d396b2 [3], so pull this in
as a patch and apply it.

See also bug 280730, for lang/spidermonkey102.

[1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
[2] https://hg.mozilla.org/mozilla-central/rev/223087fdc29f18678f6174e9807b8780e439acf6
[3] https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-30 15:30:09 UTC
Created attachment 255547 [details]
lang/spidermonkey91: fix build with clang and libc++ 19
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-12-13 23:34:35 UTC
A commit in branch main references this bug:

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

commit ed3a65c936adead5ef586d5121aebed85585a75e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-30 15:29:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-12-13 23:33:08 +0000

    lang/spidermonkey91: fix build with clang and libc++ 19

    Clang 19 now diagnoses incorrect member accesses, which causes
    lang/spidermonkey91 to fail with an error similar to:

      /wrkdirs/usr/ports/lang/spidermonkey91/work/firefox-91.13.0/js/src/threading/ExclusiveData.h:113:29: error: reference to non-static member function must be called
        113 |       : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
            |                         ~~~~^~~~

    Upstream fixed this for https://bugzilla.mozilla.org/1894423 in
    changeset 223087fdc29f18678f6174e9807b8780e439acf6 [2], so pull this in
    as a patch and apply it.

    Also, as noted in the libc++ 19 release notes [1], std::char_traits<> is
    now only provided for char, char8_t, char16_t, char32_t and wchar_t, and
    any instantiation for other types will fail.

    With lang/spidermonkey91 and clang/libc++ 19 this results in errors
    similar to:

      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:208:20: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
        208 |       iter_ = std::char_traits<CharT>::find(
            |                    ^
      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:769:21: note: in instantiation of member function 'SepKeywordIterator<unsigned char>::next' requested here
        769 |     beginKey = iter.next();
            |                     ^
      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:808:16: note: in instantiation of function template specialization 'FindUnicodeExtensionType<unsigned char>' requested here
        808 |              ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
            |                ^

    Upstream fixed this for https://bugzilla.mozilla.org/1849070 in
    changeset 68ff4d3f7338248b4d67cf03aade5a73f8d396b2 [3], so pull this in
    as a patch and apply it.

    See also bug 280730, for lang/spidermonkey102.

    [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
    [2] https://hg.mozilla.org/mozilla-central/rev/223087fdc29f18678f6174e9807b8780e439acf6
    [3] https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2

    PR:             283051
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2024Q4

 lang/spidermonkey91/Makefile | 4 ++++
 lang/spidermonkey91/distinfo | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-13 23:35:37 UTC
A commit in branch 2024Q4 references this bug:

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

commit 4a1ee9f5158c0245c0ec9a229a56d79ba6c812a4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-30 15:29:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-12-13 23:34:28 +0000

    lang/spidermonkey91: fix build with clang and libc++ 19

    Clang 19 now diagnoses incorrect member accesses, which causes
    lang/spidermonkey91 to fail with an error similar to:

      /wrkdirs/usr/ports/lang/spidermonkey91/work/firefox-91.13.0/js/src/threading/ExclusiveData.h:113:29: error: reference to non-static member function must be called
        113 |       : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
            |                         ~~~~^~~~

    Upstream fixed this for https://bugzilla.mozilla.org/1894423 in
    changeset 223087fdc29f18678f6174e9807b8780e439acf6 [2], so pull this in
    as a patch and apply it.

    Also, as noted in the libc++ 19 release notes [1], std::char_traits<> is
    now only provided for char, char8_t, char16_t, char32_t and wchar_t, and
    any instantiation for other types will fail.

    With lang/spidermonkey91 and clang/libc++ 19 this results in errors
    similar to:

      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:208:20: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
        208 |       iter_ = std::char_traits<CharT>::find(
            |                    ^
      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:769:21: note: in instantiation of member function 'SepKeywordIterator<unsigned char>::next' requested here
        769 |     beginKey = iter.next();
            |                     ^
      /wrkdirs/usr/ports/lang/spidermonkey91/work/fireox-78.15.0/js/src/builtin/intl/Locale.cpp:808:16: note: in instantiation of function template specialization 'FindUnicodeExtensionType<unsigned char>' requested here
        808 |              ? FindUnicodeExtensionType(unicodeExtension->latin1Chars(nogc),
            |                ^

    Upstream fixed this for https://bugzilla.mozilla.org/1849070 in
    changeset 68ff4d3f7338248b4d67cf03aade5a73f8d396b2 [3], so pull this in
    as a patch and apply it.

    See also bug 280730, for lang/spidermonkey102.

    [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
    [2] https://hg.mozilla.org/mozilla-central/rev/223087fdc29f18678f6174e9807b8780e439acf6
    [3] https://hg.mozilla.org/mozilla-central/rev/68ff4d3f7338248b4d67cf03aade5a73f8d396b2

    PR:             283051
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2024Q4

    (cherry picked from commit ed3a65c936adead5ef586d5121aebed85585a75e)

 lang/spidermonkey91/Makefile | 4 ++++
 lang/spidermonkey91/distinfo | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)