Summary: | emulators/virtualbox-ose-additions, emulators/virtualbox-ose-additions-legacy: build errors on CURRENT: vboxvfs_vnops.c | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Graham Perrin <grahamperrin> | ||||
Component: | Individual Port(s) | Assignee: | Graham Perrin <grahamperrin> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | grahamperrin, lwhsu, ssb22, vbox | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: | https://reviews.freebsd.org/D37074 | ||||||
Attachments: |
|
Description
Graham Perrin
![]() ![]() /wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.36/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c:914:61: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] error = sfprov_symlink(dir->vboxfsmp->sf_handle, fullpath, ap->a_target, &stat); ^~~~~~~~~~~~ /wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.36/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h:378:64: note: passing argument to parameter 'target' here extern int sfprov_symlink(sfp_mount_t *, char *linkname, char *target, ^ /wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.36/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c:1375:1: error: expected '}' ^ /wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.36/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c:1374:1: note: to match this '{' { ^ A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e3a7ac32481885e3a99f631961ee4cc5d91c4fb2 commit e3a7ac32481885e3a99f631961ee4cc5d91c4fb2 Author: Li-Wen Hsu <lwhsu@FreeBSD.org> AuthorDate: 2022-12-28 18:55:24 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2022-12-28 18:55:24 +0000 emulators/virtualbox-ose-additions*: Fix patch and build (for non-legacy) PR: 268603 Fixes: c35a71080172 emulators/virtualbox-ose: fix builds on CURRENT .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c | 2 +- .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (In reply to commit-hook from comment #2) Excellent! Thank you, lwhsu@ ---- … [00:13:38] Built ports: emulators/virtualbox-ose-additions [main-default] [2022-12-28_19h17m08s] [committing:] Queued: 1 Built: 1 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 0 Time: 00:13:32 [00:13:38] Logs: /usr/local/poudriere/data/logs/bulk/main-default/2022-12-28_19h17m08s [00:13:38] Cleaning up main-default: removed main-default-n: removed [00:13:38] Unmounting file systems root@mowa219-gjp4-8570p-freebsd:~ # uname -KU 1400077 1400077 root@mowa219-gjp4-8570p-freebsd:~ # poudriere jail -i -j main Jail name: main Jail version: 14.0-CURRENT 1400077 Jail arch: amd64 Jail method: src=/usr/src Jail mount: /usr/local/poudriere/jails/main Jail fs: copperbowl/poudriere/jails/main Jail updated: 2022-12-27 17:49:04 Jail pkgbase: disabled root@mowa219-gjp4-8570p-freebsd:~ # FYI I found I had to do the following hack to make virtualbox-ose-additions-legacy compile on freebsd 14.0-RELEASE (my /usr/ports is on branch 2023Q4): cd /usr/ports/emulators/virtualbox-ose-additions-legacy make install || true for Type in int uint unsigned PK KA PC RT; do for F in $(grep -lr "register $Type" work); do sed -e "s/register $Type/$Type/g" < $F > n && mv n $F ; done; done for F in $(grep -lr "enum vtype" work); do sed -e "s/enum vtype/int/g" < $F > n && mv n $F ; done make install This is because the source still uses the "register" keyword which is disallowed in C++17 (it doesn't do anything anyway); I tried setting CXXFLAGS=-Dregister but that was ignored. Also there's an unused(?) enum in the filesystem that seems to have been written to an older C++ standard. Not sure if it's related to this bug or is a new bug. I suppose the correct way to work around it would be to add in a patch rather than a load of sed commands, but the above is what I did and it worked.... |