Bug 276785 - devel/build2: fix build with clang 18 rc1
Summary: devel/build2: fix build with clang 18 rc1
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: 276104
  Show dependency treegraph
 
Reported: 2024-02-02 16:51 UTC by Dimitry Andric
Modified: 2024-02-03 13:27 UTC (History)
0 users

See Also:
fuz: maintainer-feedback+


Attachments
devel/build2: fix build with clang 18 rc1 (3.78 KB, patch)
2024-02-02 16:51 UTC, Dimitry Andric
fuz: maintainer-approval+
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-02-02 16:51:02 UTC
As of rc1, clang 18 has a version id formatted as "18.1.0rc". Similarly,
builds from the upstream main branch typically have a version id looking
like "19.0.0git". Due to the way it parses version strings, devel/build2
cannot handle this format, and fails with:

  LC_ALL=C c++ -v
  error: unable to extract Clang minor version from '18'
    info: use config.cxx.version to override

I submitted https://github.com/build2/build2/issues/360 upstream, and
they committed a fix: https://github.com/build2/build2/commit/0e1b73e3,
which should eventually end up in 0.17.0.

The fix applies without issues on 0.16.0, so add it as a patch.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-02-02 16:51:59 UTC
Created attachment 248140 [details]
devel/build2: fix build with clang 18 rc1
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2024-02-02 20:46:12 UTC
Comment on attachment 248140 [details]
devel/build2: fix build with clang 18 rc1

Thank you.

LGTM.
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2024-02-02 20:46:45 UTC
Feel free to commit.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-02-03 13:16:02 UTC
A commit in branch main references this bug:

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

commit b7f06adf2f2ec46b17ae6ee21d18d73c0959145e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-02-02 16:50:59 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-02-03 13:14:40 +0000

    devel/build2: fix build with clang 18 rc1

    As of rc1, clang 18 has a version id formatted as "18.1.0rc". Similarly,
    builds from the upstream main branch typically have a version id looking
    like "19.0.0git". Due to the way it parses version strings, devel/build2
    cannot handle this format, and fails with:

      LC_ALL=C c++ -v
      error: unable to extract Clang minor version from '18'
        info: use config.cxx.version to override

    I submitted https://github.com/build2/build2/issues/360 upstream, and
    they committed a fix: https://github.com/build2/build2/commit/0e1b73e3,
    which should eventually end up in 0.17.0.

    The fix applies without issues on 0.16.0, so add it as a patch.

    PR:             276785
    Approved by:    fuz (maintainer)
    MFH:            2024Q1

 .../patch-build2_libbuild2_cc_guess.cxx (new)      | 79 ++++++++++++++++++++++
 1 file changed, 79 insertions(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-02-03 13:24:03 UTC
A commit in branch 2024Q1 references this bug:

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

commit ca58c1ec77fdd229c0ad781eca9e4185f931138d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-02-02 16:50:59 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-02-03 13:22:37 +0000

    devel/build2: fix build with clang 18 rc1

    As of rc1, clang 18 has a version id formatted as "18.1.0rc". Similarly,
    builds from the upstream main branch typically have a version id looking
    like "19.0.0git". Due to the way it parses version strings, devel/build2
    cannot handle this format, and fails with:

      LC_ALL=C c++ -v
      error: unable to extract Clang minor version from '18'
        info: use config.cxx.version to override

    I submitted https://github.com/build2/build2/issues/360 upstream, and
    they committed a fix: https://github.com/build2/build2/commit/0e1b73e3,
    which should eventually end up in 0.17.0.

    The fix applies without issues on 0.16.0, so add it as a patch.

    PR:             276785
    Approved by:    fuz (maintainer)
    MFH:            2024Q1

    (cherry picked from commit b7f06adf2f2ec46b17ae6ee21d18d73c0959145e)

 .../patch-build2_libbuild2_cc_guess.cxx (new)      | 79 ++++++++++++++++++++++
 1 file changed, 79 insertions(+)