Bug 274275 - devel/cmake-core: Add workaround for RUNTIME_DEPENDENCY_SET not being supported on FreeBSD
Summary: devel/cmake-core: Add workaround for RUNTIME_DEPENDENCY_SET not being support...
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: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-05 08:06 UTC by Yuri Victorovich
Modified: 2023-11-09 22:42 UTC (History)
2 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
patch (1.32 KB, patch)
2023-10-05 08:06 UTC, Yuri Victorovich
no flags Details | Diff
v2 (1.34 KB, patch)
2023-10-06 08:43 UTC, Jason E. Hale
no flags Details | Diff
v3 (2.85 KB, patch)
2023-10-08 21:14 UTC, Jason E. Hale
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2023-10-05 08:06:43 UTC
Created attachment 245444 [details]
patch
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2023-10-06 08:43:44 UTC
Created attachment 245459 [details]
v2

Could you please test with the attached patch? This uses the Linux implementation of the methods, which seem to largely be wrappers around objdump(1). A bit less dubious that simply saying, "yes, this is works on FreeBSD", but I have nothing to test with, so if you could specify which ports need this functionality, that would be helpful.

kde@ is currently in the middle of an exp-run for cmake 3.27.6 (bug #274225), so this will have to wait until that is complete.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2023-10-06 09:04:38 UTC
(In reply to Jason E. Hale from comment #1)

The port graphics/f3d version 2.2.1 needs this functionality.
PATCH_SITES/PATCHFILES need to be removed in version 2.2.1
Comment 3 Jason E. Hale freebsd_committer freebsd_triage 2023-10-06 09:41:08 UTC
(In reply to Yuri Victorovich from comment #2)

Perfect! f3d seems to build and run fine with my changes, but I see that it was failing to configure before them. I'll include the changes with the CMake update. Please be patient until the exp-run is finished and the CMake update has landed.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2023-10-06 10:20:21 UTC
(In reply to Jason E. Hale from comment #3)

This is great!

You should probably also upstream this patch.
Comment 5 Jason E. Hale freebsd_committer freebsd_triage 2023-10-08 21:14:38 UTC
Created attachment 245508 [details]
v3

Digging a little deeper, CMake is also employing some functionality of glibc's ldconfig(8) that FreeBSD's implementation doesn't provide. I've disabled that, relying solely on objdump(1), which is relatively universal, and the regression tests are now marginally passing versus miserably failing. One previously failing test now passes and one is still failing, but with manual inspection seems to be overall OK...just some minor string differences from the expected result. I don't think these changes are worthy of upstreaming ATM and consider this to be an experimental feature (documentation and whatnot would also have to be updated), but it's enough to get your port to build for the time being.
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2023-10-08 21:17:17 UTC
Note: these patches were made against the newly released 3.27.7, but should probably apply to older versions.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2023-11-08 04:07:00 UTC
(In reply to Jason E. Hale from comment #6)

Hi Jason,

Perhaps you can commit this patch?


Thanks,
Yuri
Comment 8 Jason E. Hale freebsd_committer freebsd_triage 2023-11-09 21:48:50 UTC
(In reply to Yuri Victorovich from comment #7)
I'll be landing CMake 3.27.7 shortly which will include this patch. Sorry it took so long, but there were new build failures that needed sorted and I put the CMake update on the back burner, focusing on getting Qt 6.6.0 ready.
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-11-09 22:41:34 UTC
A commit in branch main references this bug:

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

commit 5244b8425c414f0bca521df362eb62bb334640b3
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-11-09 22:32:11 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-11-09 22:40:34 +0000

    devel/cmake*: Update to 3.27.7 [1]

    Add support for keywords like RUNTIME_DEPENDENCY_SET and
    RUNTIME_DEPENDENCIES in the install() command and
    GET_RUNTIME_DEPENDENCIES in the file() command. [2]

    https://cmake.org/cmake/help/v3.27/release/3.27.html

    PR:             274225 [1], 274275 [2]
    Reported by:    yuri [2]
    Exp-run by:     antoine [1]

 Mk/Uses/cmake.mk                                   |   2 +-
 devel/cmake-core/Makefile                          |   8 +-
 devel/cmake-core/distinfo                          |   6 +-
 ...patch-Source_cmBinUtilsLinuxELFLinker.cxx (new) |  20 ++++
 .../patch-Source_cmQtAutoGenInitializer.cxx (new)  |  25 +++++
 ...tch-Source_cmRuntimeDependencyArchive.cxx (new) |  33 +++++++
 ...9495033da40f798db9ec064d9b16ea672fc.diff (gone) |  47 ---------
 devel/cmake-core/pkg-plist                         | 109 +++++++++++++++++++--
 devel/cmake-doc/Makefile                           |   1 -
 devel/cmake-doc/pkg-plist                          |  98 +++++++++++++++---
 devel/cmake-gui/Makefile                           |  23 +++--
 11 files changed, 289 insertions(+), 83 deletions(-)