Bug 268603 - emulators/virtualbox-ose-additions, emulators/virtualbox-ose-additions-legacy: build errors on CURRENT: vboxvfs_vnops.c
Summary: emulators/virtualbox-ose-additions, emulators/virtualbox-ose-additions-legacy...
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: Graham Perrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-27 20:04 UTC by Graham Perrin
Modified: 2023-11-26 23:57 UTC (History)
4 users (show)

See Also:


Attachments
Log (1.0 MiB, compressed) from a run of poudriere (45.35 KB, application/gzip)
2022-12-27 20:04 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2022-12-27 20:04:16 UTC
Created attachment 239068 [details]
Log (1.0 MiB, compressed) from a run of poudriere

No package for FreeBSD:14:amd64 at <https://www.freshports.org/emulators/virtualbox-ose-additions/#packages> or <https://www.freshports.org/emulators/virtualbox-ose-additions-legacy/#packages>. 

Recent fallout: 

<https://portsfallout.com/fallout?port=emulators%2Fvirtualbox-ose-additions%24&env=main-amd64-default>

<https://portsfallout.com/fallout?port=emulators%2Fvirtualbox-ose-additions-legacy%24&env=main-amd64-default>

Log attached, a similar failure resulting from: 

poudriere bulk -j main -v -J 1 emulators/virtualbox-ose-additions

– in a 1400077 jail. 


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:~ # uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #28 main-n259865-b079ca8593ed-dirty: Tue Dec 27 15:57:33 GMT 2022     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400077 1400077
root@mowa219-gjp4-8570p-freebsd:~ #
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-12-27 20:19:04 UTC
/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 '{'
{
^
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-12-28 18:58:28 UTC
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(-)
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-12-28 19:33:22 UTC
(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:~ #
Comment 4 Silas S. Brown 2023-11-26 23:57:27 UTC
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....