Bug 273335 - devel/boost-all: Adjust range to use llvm from ports
Summary: devel/boost-all: Adjust range to use llvm from ports
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: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-25 02:03 UTC by Yasuhiro Kimura
Modified: 2024-03-23 12:08 UTC (History)
1 user (show)

See Also:
sunpoet: maintainer-feedback+
yasu: merge-quarterly?


Attachments
Patch file (952 bytes, patch)
2023-08-25 02:03 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2023-08-25 02:03:53 UTC
Created attachment 244327 [details]
Patch file

In src repository stable/14 branch is created and main branch is bumped to 15. So adjust range to use llvm from ports.
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-08-25 19:26:34 UTC
AFAIK, stable/14 still needs the workaround (using llvm from ports). However, attachment 244327 [details] excludes stable/14. Therefore, the patch seems to be incorrect.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-08-26 00:44:44 UTC
(In reply to Po-Chuan Hsieh from comment #1)

As is reported in the comment of upstream issue report, this is very long standing bug of LLVM/Clang.

https://github.com/llvm/llvm-project/issues/39319#issuecomment-1444452238

So the bug itself is included in the base system of all supported FreeBSD version. But the problem only happens with main branch of src repository because assertion is enabled only with it.

Actually I tried build of devel/boost-libs with following conditions.

Host: 14.0-ALPHA3 amd64 stable/14-n265022-2af9390e54e
Poudriere: 3.3.7
Jail: same as host
Ports tree: ports e440162525f4 (main branch) + patch I submitted

And the build finishes successfully as following.

https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/140amd64-default/2023-08-26_09h17m55s/logs/boost-libs-1.82.0_1.log

After stable/14 branch is created __FreeBSD_version of the branch is bumped from 1400096 to 1400097.

https://cgit.freebsd.org/src/commit/sys/sys/param.h?h=stable/14&id=29a16ce065dbc28bc9e87c9bfadb08bb58b137e4

And the value of main branch is bumped from 1400096 to 1500000.

https://cgit.freebsd.org/src/commit/sys/sys/param.h?id=aee253d8a7aea40189f8ca74138d6bed10948b1e

So currently we need to use llvm from ports with following conditions.

* 1400000 <= __FreeBSD_version < 1400097 ( main before stable/14 is branched)
* __FreeBSD_version >= 1500000 ( main after stable/14 is branched)
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-08-26 07:21:55 UTC
(In reply to Yasuhiro Kimura from comment #2)

Ok, I misunderstood the build failure (assertion). Please add some comment as well. Thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-08-29 03:11:18 UTC
A commit in branch main references this bug:

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

commit 9b2e4b0219bd4814b47c22e5901f3b1cc091fded
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-08-25 01:28:10 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-08-29 03:07:06 +0000

    devel/boost-all: Adjust range to use llvm from ports

    When boost was updated to 1.81.0, the problem was reported as PR
    269067 that build of devel/boost-libs fails because of assertion
    failure of Clang in base system. According to the comment submitted to
    upstream issue tracker (*), the source of the problem is very long
    standing bug of LLVM/Clang. So the bug itself is included in all of
    supported branch of src repository. But the problem only happens with
    main because assertion is only enabled with it. To work it around
    compiled.mk was modified so llvm from ports is used instead of that of
    base system when __FreeBSD_version is 1400000 or later. This is what
    was done with commit 3efdfab9b59f.

    And recently stable/14 branch is created in src repository. After it
    is created __FreeBSD_version of the branch is bumped from 1400096 to
    1400097. And the value of main is bumped from 1400096 to 1500000. So
    adjust range to use llvm from ports as following.

    Case 1: 1400000 <= OSVERSION < 1400097 (main before stable/14 is branched)
    Case 2: OSVERSION >= 1500000 (main after stable/14 is branched)

    Reference:      https://github.com/llvm/llvm-project/issues/39319#issuecomment-1444452238 (*)
    PR:             273335
    Approved by:    sunpoet (office@, maintainer)
    MFH:            2023Q3

 devel/boost-all/compiled.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-08-29 03:18:24 UTC
A commit in branch 2023Q3 references this bug:

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

commit badc87250b6f2cfa3d5bee7da8f78a6b641b747b
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-08-25 01:28:10 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-08-29 03:16:39 +0000

    devel/boost-all: Adjust range to use llvm from ports

    When boost was updated to 1.81.0, the problem was reported as PR
    269067 that build of devel/boost-libs fails because of assertion
    failure of Clang in base system. According to the comment submitted to
    upstream issue tracker (*), the source of the problem is very long
    standing bug of LLVM/Clang. So the bug itself is included in all of
    supported branch of src repository. But the problem only happens with
    main because assertion is only enabled with it. To work it around
    compiled.mk was modified so llvm from ports is used instead of that of
    base system when __FreeBSD_version is 1400000 or later. This is what
    was done with commit 3efdfab9b59f.

    And recently stable/14 branch is created in src repository. After it
    is created __FreeBSD_version of the branch is bumped from 1400096 to
    1400097. And the value of main is bumped from 1400096 to 1500000. So
    adjust range to use llvm from ports as following.

    Case 1: 1400000 <= OSVERSION < 1400097 (main before stable/14 is branched)
    Case 2: OSVERSION >= 1500000 (main after stable/14 is branched)

    Reference:      https://github.com/llvm/llvm-project/issues/39319#issuecomment-1444452238 (*)
    PR:             273335
    Approved by:    sunpoet (office@, maintainer)
    MFH:            2023Q3

    (cherry picked from commit 9b2e4b0219bd4814b47c22e5901f3b1cc091fded)

 devel/boost-all/compiled.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-03-20 22:39:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bcd401b5a39c6186bb1fe450286299f2a481244c

commit bcd401b5a39c6186bb1fe450286299f2a481244c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-03-20 22:39:06 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-03-20 22:39:11 +0000

    Merge commit bbb8a0df7367 from llvm-project (by Shafik Yaghmour):

      [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

      ResolveConstructorOverload needs to check properly if we are going to use copy
      elision we can't use a conversion function.

      This fixes:

      https://github.com/llvm/llvm-project/issues/39319
      https://github.com/llvm/llvm-project/issues/60182
      https://github.com/llvm/llvm-project/issues/62157
      https://github.com/llvm/llvm-project/issues/64885
      https://github.com/llvm/llvm-project/issues/65568

      Differential Revision: https://reviews.llvm.org/D148474

    This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument
    of incompatible type!")' errors when building devel/boost-libs,
    specifically libs/url/src/segments_view.cpp.

    Bump __FreeBSD_version so this fix can easily be detected from
    devel/boost-all/compiled.mk.

    PR:             273335

 contrib/llvm-project/clang/lib/Sema/SemaInit.cpp   | 51 +++++++++++-----------
 .../clang/lib/Sema/SemaTemplateInstantiate.cpp     |  4 ++
 sys/sys/param.h                                    |  2 +-
 3 files changed, 30 insertions(+), 27 deletions(-)
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2024-03-20 23:31:01 UTC
Follow-up is bug 277850.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-03-23 12:08:11 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=69da6e0879831f1ccc5c60135ed43fcea10a933b

commit 69da6e0879831f1ccc5c60135ed43fcea10a933b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-03-20 22:39:06 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-03-23 12:01:38 +0000

    Merge commit bbb8a0df7367 from llvm-project (by Shafik Yaghmour):

      [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

      ResolveConstructorOverload needs to check properly if we are going to use copy
      elision we can't use a conversion function.

      This fixes:

      https://github.com/llvm/llvm-project/issues/39319
      https://github.com/llvm/llvm-project/issues/60182
      https://github.com/llvm/llvm-project/issues/62157
      https://github.com/llvm/llvm-project/issues/64885
      https://github.com/llvm/llvm-project/issues/65568

      Differential Revision: https://reviews.llvm.org/D148474

    This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument
    of incompatible type!")' errors when building devel/boost-libs,
    specifically libs/url/src/segments_view.cpp.

    Bump __FreeBSD_version so this fix can easily be detected from
    devel/boost-all/compiled.mk.

    PR:             273335
    (cherry picked from commit bcd401b5a39c6186bb1fe450286299f2a481244c)

 contrib/llvm-project/clang/lib/Sema/SemaInit.cpp   | 51 +++++++++++-----------
 .../clang/lib/Sema/SemaTemplateInstantiate.cpp     |  4 ++
 sys/sys/param.h                                    |  2 +-
 3 files changed, 30 insertions(+), 27 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-03-23 12:08:12 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=07839ae99c06fcbebd5da6ead49c160c32046542

commit 07839ae99c06fcbebd5da6ead49c160c32046542
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-03-20 22:39:06 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-03-23 12:02:23 +0000

    Merge commit bbb8a0df7367 from llvm-project (by Shafik Yaghmour):

      [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

      ResolveConstructorOverload needs to check properly if we are going to use copy
      elision we can't use a conversion function.

      This fixes:

      https://github.com/llvm/llvm-project/issues/39319
      https://github.com/llvm/llvm-project/issues/60182
      https://github.com/llvm/llvm-project/issues/62157
      https://github.com/llvm/llvm-project/issues/64885
      https://github.com/llvm/llvm-project/issues/65568

      Differential Revision: https://reviews.llvm.org/D148474

    This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument
    of incompatible type!")' errors when building devel/boost-libs,
    specifically libs/url/src/segments_view.cpp.

    Bump __FreeBSD_version so this fix can easily be detected from
    devel/boost-all/compiled.mk.

    PR:             273335
    (cherry picked from commit bcd401b5a39c6186bb1fe450286299f2a481244c)

 contrib/llvm-project/clang/lib/Sema/SemaInit.cpp   | 51 +++++++++++-----------
 .../clang/lib/Sema/SemaTemplateInstantiate.cpp     |  4 ++
 sys/sys/param.h                                    |  2 +-
 3 files changed, 30 insertions(+), 27 deletions(-)