Bug 277856 - 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: 2024-03-21 06:46 UTC by Yasuhiro Kimura
Modified: 2024-04-21 01:23 UTC (History)
2 users (show)

See Also:
yasu: maintainer-feedback-


Attachments
Patch file (993 bytes, patch)
2024-03-21 06:46 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (2.98 KB, patch)
2024-03-27 07:12 UTC, Yasuhiro Kimura
yasu: maintainer-approval? (office)
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 2024-03-21 06:46:50 UTC
Created attachment 249361 [details]
Patch file

The bug of clang in base system that results in build failure of devel/boost-libs is fixed with __FreeBSD_version >= 1500017. So adjust range to use llvm from ports.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-03-27 07:12:17 UTC
Created attachment 249504 [details]
Updated patch file

Adjust range to use llvm from ports

The reason to use llvm from ports is that there is bug in clang of base system that causes assertion failure while building devel/boost-libs. The bug is already fixed with main, stable/14 and stable/13 branches of src repository. So we need to use llvm from ports only with following conditions.

1. 1500000 <= OSVERSION < 1500017
2. 1400000 <= OSVERSION < 1400509
3. 1300000 <= OSVERSION < 1303502

And commit 3b8c51bd37b0 adjusts the range as above.

But there is a pitfall about it. The assertion failure happens only if base system is built with WITH_LLVM_ASSERTIONS enabled. By default the option is enabled with main branch but is disabled with stable/* and releng/* ones. So the failure happens with -CURRENT even if it is built with default options settings but doesn't with -STABLE and -RELEASE unless it is built with WITH_LLVM_ASSERTIONS enabled. IMHO majority of FreeBSD users use -RELEASE, and seldom -STABLE user enables WITH_LLVM_ASSERTIONS. As a result adjustment with commit 3b8c51bd37b0 forces -RELEASE and -STABLE users to build llvm port that
is unnecessary to build devel/boost-libs.

So adjust the range so llvm from ports is used by default only if base system is -CURRENT with the assertion failure unfixed. And as a last resort for -STABLE and -RELEASE users who enable WITH_LLVM_ASSERTIONS add LLVM_FROM_PORTS option to devel/boost-libs that forces to use llvm from ports.
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-04-21 01:02:46 UTC
Maintainer timeout. Take.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-04-21 01:18:29 UTC
A commit in branch main references this bug:

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

commit c4eb9478257e33a0e2c9de216fe4503127f3abef
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2024-04-21 01:14:18 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2024-04-21 01:14:18 +0000

    devel/boost-{all,libs}: Adjust range of OSVERSION to use LLVM from ports

    The reason to use LLVM from ports is that there is bug in Clang/LLVM
    of base system that causes assertion failure while building
    devel/boost-libs. The bug is already fixed with main, stable/14 and
    stable/13 branches of src repository. So we need to use LLVM from
    ports only with following ranges of OSVERSION.

    1. 1500000 <= OSVERSION < 1500017
    2. 1400000 <= OSVERSION < 1400509
    3. 1300000 <= OSVERSION < 1303502

    And commit 3b8c51bd37b0 adjusts the range as above.

    But there is a pitfall about it. The assertion failure happens only if
    base system is built with WITH_LLVM_ASSERTIONS variable set. By
    default it is set with main branch but not with stable/* and releng/*
    ones. So wheareas the failure happens with -CURRENT even if it is
    built with default variables settings, it doesn't happen with -STABLE
    and -RELEASE unless they are built with WITH_LLVM_ASSERTIONS set. IMHO
    majority of FreeBSD users use -RELEASE with official binary, and few
    -STABLE users set WITH_LLVM_ASSERTIONS. As a result adjustment with
    commit 3b8c51bd37b0 forces most -RELEASE and -STABLE users to build
    LLVM port unnecessarily.

    So adjust the range so LLVM from ports is used by default only if base
    system is -CURRENT with the assertion failure unfixed. And as a last
    resort for -STABLE and -RELEASE users who set WITH_LLVM_ASSERTIONS,
    add LLVM_FROM_PORTS option to devel/boost-libs that forces to use LLVM
    from ports.

    PR:             277856
    Approved by:    maintainer timeout

 devel/boost-all/compiled.mk |  5 +++--
 devel/boost-libs/Makefile   | 24 +++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)