Bug 283287 - devel/sol2: Fix compilation for clang 19.1
Summary: devel/sol2: Fix compilation for clang 19.1
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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 283292
  Show dependency treegraph
 
Reported: 2024-12-12 20:51 UTC by Peter Laursen
Modified: 2024-12-18 20:35 UTC (History)
0 users

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


Attachments
Patch fixing downstream consumers if the source system use Clang 19.1 or above (1.74 KB, patch)
2024-12-12 20:51 UTC, Peter Laursen
no flags Details | Diff
Fix for the previous patch. (1.40 KB, patch)
2024-12-13 08:20 UTC, Peter Laursen
no flags Details | Diff
One letter fix for the file name of the Clang19 extra patch (540 bytes, patch)
2024-12-15 10:12 UTC, Peter Laursen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Laursen 2024-12-12 20:51:28 UTC
Created attachment 255815 [details]
Patch fixing downstream consumers if the source system use Clang 19.1 or above

Hi,
While trying to unbundle a previous version of sol2 from www/osrm-backend, I tried building with the version from ports using a system running FreeBSD 15-CURRENT.
The compiler is Clang 19.1 and when it tries to use the header-only library, it fails.

Attached is a patch that:
* Adds an extra patch if the clang compiler version is 19.1 or above
* Bumps PORTREVISION just to be on the safe side.

In case my patch is garbled, the patch applies cleanly to our current alpha version from Ports. The original upstream patch is available here:
https://github.com/ThePhD/sol2/commit/d805d027e0a0a7222e936926139f06e23828ce9f

All the best,

Peter.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-12-13 02:12:36 UTC
Hi Peter,

The attached patch is invalid.
It attempts to change devel/sol2/sol2.patch which doesn't exist.

Could you please create a patch using git?


Thanks,
Yuri
Comment 2 Peter Laursen 2024-12-13 08:20:24 UTC
Created attachment 255831 [details]
Fix for the previous patch.
Comment 3 Peter Laursen 2024-12-13 08:23:32 UTC
Hi Yuri,
Apologies; got my diff invocation wrong while uploading yesterday's patch.
The most recent attachment has been generated using git diff and has just been attached.
Note: Formatting is a bit tricky with the screen reader; so if whitespace issues are occurring, feel free to fix those.

All the best,

Peter.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2024-12-15 06:25:09 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-12-15 06:25:40 UTC
A commit in branch main references this bug:

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

commit 2abe162d63206ff8004471e9c6a4152960084dcc
Author:     Peter Laursen <freebsd@mosedal.net>
AuthorDate: 2024-12-15 06:21:44 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-12-15 06:25:08 +0000

    devel/sol2: Fix compilation for clang 19.1

    PR:             283287

 devel/sol2/Makefile                                          |  7 ++++++-
 ...xtra-patch-include_sol_optional__implementation.hpp (new) | 12 ++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
Comment 6 Peter Laursen 2024-12-15 10:12:51 UTC
Created attachment 255869 [details]
One letter fix for the file name of the Clang19 extra patch

One-letter fix to the file name of the extra patch for Clang 19
Comment 7 Peter Laursen 2024-12-15 10:15:40 UTC
Hi Yuri,
As is sadly obvious from the last attachment, there was a 'p' missing at the end of the extra patch file name.
I've attached a patch (but it doesn't obsolete the otherwise working patch).

Sorry for not spotting this prior to the original submission,

Peter.
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-12-18 20:35:28 UTC
A commit in branch main references this bug:

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

commit d57100b91f88f712efb78a1e27eb0e546941f61f
Author:     Peter Laursen <freebsd@mosedal.net>
AuthorDate: 2024-12-18 20:27:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-12-18 20:35:04 +0000

    devel/sol2: Fix patch name

    PR:             283287

 devel/sol2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)