Bug 287284 - emulators/virtualbox-ose: apparently incorrect patch
Summary: emulators/virtualbox-ose: apparently incorrect patch
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: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks: 279705
  Show dependency treegraph
 
Reported: 2025-06-03 23:54 UTC by George Mitchell
Modified: 2025-06-10 17:48 UTC (History)
1 user (show)

See Also:
vvd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Mitchell 2025-06-03 23:54:55 UTC
Commit 17271d3143c9325720511ee9a4508085b8f18e39 contains these two lines from the file files/patch-src_VBox_Runtime_r3_xml.cpp:

++#if LIBXML_VERSION >= 21206
++static void xmlStructuredErrorFunc(void *userData, const xmlError *error)  RT_NOTHROW_DEF

libxml2 version 2.14.3 (currently being integrated into the ports tree, see bug #279705) defines LIBXMP_VERSION as 21403 (i.e. greater than 21206), but contains no definition for RT_NOTHROW_DEF, thereby causing a compile error.  Removing RT_NOTHROW_DEF from the patch file allows compiling to succeed.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-04 00:56:02 UTC
RT_NOTHROW_DEF is defined in VirtualBox itself, but was only introduced in version 7.0.
The patch was copied from newer version along with RT_NOTHROW_DEF.
Good catch!
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-06-04 01:10:05 UTC
A commit in branch main references this bug:

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

commit 2314a49511237890c2f018fde71e81766c54c9ff
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-06-04 01:04:04 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-06-04 01:04:04 +0000

    emulators/virtualbox-ose{,-legacy}: Fix patch for build with libxml2 2.12.6+

    Remove RT_NOTHROW_DEF: it is defined in VirtualBox itself, but was only
    introduced in version 7.0.

    PR:     287284 279958
    Fixes:  17271d3143c9 (Fix build with libxml2 2.12.6+)

 emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp | 2 +-
 emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r3_xml.cpp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-04 01:10:36 UTC
Thanks!
Comment 4 George Mitchell 2025-06-04 18:01:55 UTC
Thanks for the quick resolution!  Do you happen to know if version 7.0 removes the dependency on llvm14?
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-04 18:22:14 UTC
(In reply to George Mitchell from comment #4)
You can check this self:
https://cgit.freebsd.org/ports/commit/emulators/virtualbox-ose-70/Makefile?id=f24fdd9f85160185dfe981a8bba587246e7db148
(-8
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-04 19:06:13 UTC
TBW, there is 7.1 in ports too.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-04 19:06:50 UTC
(In reply to Vladimir Druzenko from comment #6)
s/TBW/BTW/
:-)
Comment 8 George Mitchell 2025-06-04 19:37:52 UTC
If I get brave, I'll try version 7.1.