Bug 282515 - www/davix: fix build with clang 19
Summary: www/davix: fix build with clang 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: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-11-03 14:32 UTC by Dimitry Andric
Modified: 2024-11-03 21:05 UTC (History)
0 users

See Also:
yuri: maintainer-feedback+


Attachments
www/davix: fix build with clang 19 (1.92 KB, patch)
2024-11-03 14:33 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-03 14:32:19 UTC
Clang 19 has become more strict about assigning to const class members,
resulting in errors similar to:

  /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
    319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
        |                                                                           ~~~~~~ ^
  /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
    325 |     const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
        |     ~~~~~~~~~~~~~~~^~~~~~

Upstream rapidjson has fixed this in commit 3b2441b8 [1], which simply
removes the assignment operator.

[1] https://github.com/Tencent/rapidjson/commit/3b2441b8
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-03 14:33:49 UTC
Created attachment 254901 [details]
www/davix: fix build with clang 19
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-11-03 18:18:51 UTC
Approved, please commit it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-03 20:54:08 UTC
A commit in branch main references this bug:

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

commit c3ec17f889effeee0a46d666dbd4f82c8cc77fac
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-03 14:31:57 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-03 20:53:19 +0000

    www/davix: fix build with clang 19

    Clang 19 has become more strict about assigning to const class members,
    resulting in errors similar to:

      /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
        319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
            |                                                                           ~~~~~~ ^
      /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
        325 |     const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
            |     ~~~~~~~~~~~~~~~^~~~~~

    Upstream rapidjson has fixed this in commit 3b2441b8 [1], which simply
    removes the assignment operator.

    [1] https://github.com/Tencent/rapidjson/commit/3b2441b8

    PR:             282515
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

 www/davix/files/patch-src_libs_rapidjson_document.h (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-11-03 21:04:12 UTC
A commit in branch 2024Q4 references this bug:

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

commit d6468e7df57859d33e68e037301884d747731c94
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-03 14:31:57 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-03 21:03:21 +0000

    www/davix: fix build with clang 19

    Clang 19 has become more strict about assigning to const class members,
    resulting in errors similar to:

      /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
        319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
            |                                                                           ~~~~~~ ^
      /wrkdirs/usr/ports/www/davix/work/davix-R_0_8_7/src/libs/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
        325 |     const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
            |     ~~~~~~~~~~~~~~~^~~~~~

    Upstream rapidjson has fixed this in commit 3b2441b8 [1], which simply
    removes the assignment operator.

    [1] https://github.com/Tencent/rapidjson/commit/3b2441b8

    PR:             282515
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

    (cherry picked from commit c3ec17f889effeee0a46d666dbd4f82c8cc77fac)

 www/davix/files/patch-src_libs_rapidjson_document.h (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)