Bug 279173 - security/botan3: fix and optimize builds
Summary: security/botan3: fix and optimize builds
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-19 22:57 UTC by Matthias Andree
Modified: 2024-05-29 20:21 UTC (History)
3 users (show)

See Also:
mandree: maintainer-feedback+


Attachments
fix build on arm64/aarch64 by using LLVM 14 or 15 (not the base 16, which crashes) (2.55 KB, patch)
2024-05-19 22:57 UTC, Matthias Andree
no flags Details | Diff
work around missing std::ranges::find on systems with older libc++ (using boost::range::find) (3.60 KB, patch)
2024-05-19 22:58 UTC, Matthias Andree
no flags Details | Diff
revised patch to add ccache, relax LLVM versions, and 'make test' support (2.45 KB, patch)
2024-05-29 00:34 UTC, Matthias Andree
fluffy: maintainer-approval+
Details | Diff
gzipped poudriere-devel build log of botan3 with patch from attachment 251052 (22.40 KB, application/gzip)
2024-05-29 06:12 UTC, Matthias Andree
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2024-05-19 22:57:38 UTC
Created attachment 250821 [details]
fix build on arm64/aarch64 by using LLVM 14 or 15 (not the base r16, which crashes)

I am attaching two patches to get security/botan3 working again. One limits the build to LLVM 14 or 15 while https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279136 is unfixed, and the other one uses boost::range::find instead of std::ranges::find on Systems before libc++16 according to OSVERSION.
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2024-05-19 22:58:23 UTC
Created attachment 250822 [details]
work around missing std::ranges::find on systems with older libc++ (using boost::range::find)
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2024-05-19 23:16:11 UTC
Note that Botan 3.4.0 has been out for a few weeks, but I lacked the nerve to deal with the versioning of the cmake and .so files and wanted to ship these two patches for maintainer review.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2024-05-22 07:08:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279136#c3 in context with what we know here results in "LLVM 14 or newer FROM PORTS should work" - 14 and 15 amd64 I've tested, 16 from port is fine (which my patch on this PR does not allow), Yuri@ claims 17 from ports is also fine.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2024-05-22 07:11:08 UTC
(manually added)
A commit in branches main and 2024Q2 should have referenced this bug, but does not:

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

commit d863e42c9258ad8673bfbaef2af27781cff3b42c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-05-22 01:59:38 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-05-22 01:59:38 +0000

    security/botan3: Unbreak on amd64 and arm64 by using llvm-17

    PR:             279136

 security/botan3/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-05-29 00:32:54 UTC
A commit in branch main references this bug:

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

commit 63fe92d7ab52f8657300837de6f774b26ed1f7d9
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-05-19 22:46:54 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-05-29 00:32:21 +0000

    security/botan3: libc++<16 lacks std::ranges::find, work around

    ...by using boost::range::find, we already depend on boost already.

    PR:             279173
    Approved by:    portmgr@ (just-fix-it blanket approval)

 security/botan3/Makefile                           |  9 +++--
 .../extrapatch-src_tests_unit__x509.cpp (new)      | 38 ++++++++++++++++++++++
 2 files changed, 44 insertions(+), 3 deletions(-)
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2024-05-29 00:34:27 UTC
Created attachment 251052 [details]
revised patch to add ccache, relax LLVM versions, and 'make test' support
Comment 7 Matthias Andree freebsd_committer freebsd_triage 2024-05-29 06:12:22 UTC
Created attachment 251055 [details]
gzipped poudriere-devel build log of botan3 with patch from attachment 251052 [details]
Comment 8 Dima Panov freebsd_committer freebsd_triage 2024-05-29 07:38:57 UTC
LGTM
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-05-29 20:20:13 UTC
A commit in branch main references this bug:

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

commit 7ff7e9bd4ef8a5b70ba3f6095b9291c83766c23e
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-05-19 21:45:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-05-29 07:05:30 +0000

    security/botan3: Optimize build, add TEST_TARGET

    - relax LLVM requirement, per PR #279136, any llvm from
      ports can compile botan3
    - pass --compiler-cache if CCACHE_BIN is nonempty to
      actually make use of ccache
    - replace boost-libs LIB_DEPENDS=libboost_filesystem.so by
      BUILD_DEPENDS=...asio.hpp to make purpose clearer and avoid
      the stage-qa warning that libboost_filesystem.so is unused.
    - add TEST_TARGET for "make test" and WITH_TESTING[_PORTS].
    - strip support for FreeBSD before 1300000, end of life.

    PR:             279173
    Approved by:    fluffy@ (maintainer)

 security/botan3/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Comment 10 Matthias Andree freebsd_committer freebsd_triage 2024-05-29 20:21:05 UTC
Thanks, Dima