FreeBSD 12.1-RELEASE-p2 amd64 After ports r528258 (bug #244603), VirtualBox memory faults on startup: $ sh -x /usr/local/bin/VirtualBox + PATH=/usr/bin:/bin:/usr/sbin:/sbin + CONFIG=/usr/local/etc/vbox/vbox.cfg + test -r /usr/local/etc/vbox/vbox.cfg + test -z '' + test -d /usr/local/lib/virtualbox + test -f /usr/local/lib/virtualbox/VBoxRT.so + INSTALL_DIR=/usr/local/lib/virtualbox + KDE_FORK_SLAVES=1 + export KDE_FORK_SLAVES + basename /usr/local/bin/VirtualBox + APP=VirtualBox + exec /usr/local/lib/virtualbox/VirtualBox Memory fault This is with virtualbox-ose installed from the "latest" pkg repo: Mar 16 09:41:06 flake pkg[40529]: virtualbox-ose reinstalled: 5.2.34_1 -> 5.2.34_1
Created attachment 212543 [details] truss -f virtualbox At Kyle's request. Environment: grahamperrin@momh167-gjp4-8570p:~ % date ; uname -v Fri 20 Mar 2020 07:10:47 GMT FreeBSD 13.0-CURRENT #0 r359068: Wed Mar 18 21:14:12 GMT 2020 root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG grahamperrin@momh167-gjp4-8570p:~ % pkg query '%o %v %R' virtualbox-ose virtualbox-ose-kmod emulators/virtualbox-ose 5.2.34_1 FreeBSD emulators/virtualbox-ose-kmod 5.2.34 poudriere grahamperrin@momh167-gjp4-8570p:~ %
It's caused by the usual conflict between libstdc++ and libc++ which often cannot coexist in the same process. Building with GCC will link everything with its libstdc++ while all the Qt5 libs are linked with libc++ from base which breaks the Qt5 GUI. VBoxSDL (and probably others that do not load libc++ too) still work fine like before.
(In reply to Tobias Kortkamp from comment #2) I find it most curious that it works here locally and worked for madpilot@, but this explanation makes sense. I'll go hunt down why clang miscompiles it.
Forgive an ignorant question: will building and installing locally work around the issue (for me)?
Depending on how long it may take to isolate and fix the issue, it may be prudent to revert the change for now so that the pkg repo has a working version in the interim.
(In reply to Greg Rivers from comment #5) I intend to have a fix ready by the end of this weekend.
(In reply to Kyle Evans from comment #6) Nice. Thank you very much for your work and service to the community.
(In reply to Kyle Evans from comment #3) > I find it most curious that it works here locally and worked for madpilot@, but > this explanation makes sense. I share the curiosity. Maybe the difference is I'm running head? I'm also upgrading my PCs at home, shortly I'll be in head with clang 10(which I guess brings a new libc++), maybe this will cause it to break again for me too?
*** Bug 245054 has been marked as a duplicate of this bug. ***
I'm confused (sorry) … Re: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236616#c23 > … the head of the ports tree already has USE_GCC in it. So I created a new jail, built and installed emulators/virtualbox-ose but still, there's a segmentation fault.
(In reply to Kyle Evans from comment #6) So do you know how to fix it? Or should we switch virtualbox-ose back to using llvm70? We will soon have a new quarterly branch and VirtualBox should probably not be broken in it.
(In reply to Tobias Kortkamp from comment #11) This is pending a patch being added to llvm10 by Brooks, then we can switch virtualbox over to that. Understandably, he prefers to batch up patches to llvm ports since they tend to cause high ocean temps. °)
Thank you. In the meantime: * is there any way to locally build and install a usable version of the application? To not segfault at startup. (I keep a separate, outdated boot environment (r357746) with an installation that is free from the bug, but switching BE's is a little tedious; I do often require the application.)
Perhaps my suggestion in comment #5 has new relevance?
There should be a new pkg that is fixed -- bdrewery landed a correct fix for building with GCC a couple days ago.
I just upgraded all my packages and still get a seg fault: FreeBSD coral.acadix bacon ~ 1002: sh -x /usr/local/bin/VirtualBox + PATH=/usr/bin:/bin:/usr/sbin:/sbin + CONFIG=/usr/local/etc/vbox/vbox.cfg + test -r /usr/local/etc/vbox/vbox.cfg + test -z '' + test -d /usr/local/lib/virtualbox + test -f /usr/local/lib/virtualbox/VBoxRT.so + INSTALL_DIR=/usr/local/lib/virtualbox + KDE_FORK_SLAVES=1 + export KDE_FORK_SLAVES + basename /usr/local/bin/VirtualBox + APP=VirtualBox + exec /usr/local/lib/virtualbox/VirtualBox QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory Segmentation fault Running headless still works fine, though. I set up port forwarding through the virtual NAT and ssh in. ( Some guests show terrible network performance with bridged. )
(In reply to Jason W. Bacon from comment #16) > … still get a seg fault: … +1 VirtualBox segmentation fault, 5.2.34_2 on FreeBSD-CURRENT r359628 <https://lists.freebsd.org/pipermail/freebsd-current/2020-April/075735.html>
How hard would it be to patch out the features not supported by base clang? In my experience porting scientific software to CentOS, which uses very old GCC suites, it was usually not that difficult (for someone with a good understanding of C++). This could be a different matter AFAIK, though.
What exactly is the issue that USE_GCC is working around? It's not clear from PR 244603. I just commented out USE_GCC and the VirtualBox GUI seems to work fine on 12.1-RELEASE. It also does not depend on llvm70 as 244603 seems to suggest.
(In reply to Jason W. Bacon from comment #19) LLVM 8 and higher miscompile it due to either a bug in their tail-call optimization or VirtualBox doing something funky, and one can no longer create new VMs. I've isolated the LLVM revision that broke it, but I'm still working out which of the two scenarios is the actual problem.
(In reply to Kyle Evans from comment #20) Sorry- and using newer GCC works around the fact that LLVM7 can no longer compile against -CURRENT headers.
I see... I can reproduce that problem here. Thanks for clarifying.
(In reply to Graham Perrin from comment #13) With portdowngrade I downgraded the port. I'm on 11.3-RELEASE-p7, and keeping the rest of packages up to date, while trying the pkg binaries for virtualbox as they come out. Used "portdowngrade emulators/virtualbox-ose r526589" I built it and have been doing a "make reinstall" if things aren't working. svn info: Working Copy Root Path: /usr/ports/emulators/virtualbox-ose/virtualbox-ose URL: https://svn.freebsd.org/ports/head/emulators/virtualbox-ose Relative URL: ^/head/emulators/virtualbox-ose Repository Root: https://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 526589 Node Kind: directory Schedule: normal Last Changed Author: zeising Last Changed Rev: 526589 Last Changed Date: 2020-02-20 15:15:44 -0600 (Thu, 20 Feb 2020)
Add crashing to the bug list when compiling with clang 8.0.1 on 12.1-RELEASE. I can start existing VMs via the GUI, but at some point they spontaneously abort.
(In reply to Jason W. Bacon from comment #24) I'm running a test build with a patch applied to compile at -O1 instead of -O2 to see if that alleviates the problem, since that should disable tail-call optimization entirely.
I just discovered that the GUI of the current package works fine over an ssh connection. Might the seg fault have something to do with interactions with the DRM? At any rate, you can work around it with "ssh `hostname`" for now, or maybe forcing software rendering will help. Haven't tried it yet myself.
(In reply to Jason W. Bacon from comment #26) Hi, Please give this patch a shot: https://reviews.freebsd.org/D24336 -> you'll need devel/llvm10 built from r531039 (last ~2 days); for me, this at least fixes the VM creation issue with LLVM-built VirtualBox. In the meantime, I'm still comparing objdump results to try and figure out what impact the reversion of the patch in LLVM10 had to determine if VirtualBox is doing something hinky.
(In reply to Kyle Evans from comment #27) Still not working for me: Failed to register the virtual machine . Callee RC: NS_ERROR_ABORT (0x80004004) Failed to delete the storage unit of the hard disk . Callee RC: NS_ERROR_CALL_FAILED (0x800706BE) Thanks, JB
I upgraded FreeBSD-CURRENT with a working virtualbox-ose 5.2.34_1: * from r357746 * to r359750 – 5.2.34_1 still runs. I chose to lock the package. Now preparing to upgrade everything else – pkg upgrade – or should I lock any additional package before allowing the upgrade?
A commit references this bug: Author: kevans Date: Tue Apr 14 13:47:52 UTC 2020 New revision: 531689 URL: https://svnweb.freebsd.org/changeset/ports/531689 Log: emulators/virtualbox-ose: Switch build to USES= compiler:c++14-lang The runtime breakage that started occurring after the LLVM 7 -> 8 transition has been diagnosed with help from cem@, and the attached patch fixes it. The problem ended up being that tail-call optimization was being applied to this function (which should probably be written in assembly instead) and moving the tail-call to later on after some stack manipulations. The problem with this is that this particular function uses alloca() to carefully craft a stack that it's expecting to be used for the function it's calling at the end. The new patch fixes this using a technique that was committed later on in upstream changeset 75061 to address a similar failure with GCC sanitizers enabled. The FreeBSD-specific component of this patch is using the different stack setup if __clang__ is defined as well. The extra hunk in the Config patch has been added because the VirtualBox build system cannot cope with LLVM version numbers in the way it's expecting. Hardcode it to GCC 4.2 for FreeBSD, which is what the clang __GNU* macros describe, to fix build breakage that happens with newer LLVM as the build system decides our LLVM is an even older and more broken version of GCC with a broken regparm. PR: 236616, 244847 Approved by: koobs (mentor) MFH: 2020Q2 (blanket: major runtime build fix) Changes: head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/files/patch-Config.kmk head/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp
A commit references this bug: Author: kevans Date: Tue Apr 14 13:51:05 UTC 2020 New revision: 531690 URL: https://svnweb.freebsd.org/changeset/ports/531690 Log: MFH: r531689 emulators/virtualbox-ose: Switch build to USES= compiler:c++14-lang The runtime breakage that started occurring after the LLVM 7 -> 8 transition has been diagnosed with help from cem@, and the attached patch fixes it. The problem ended up being that tail-call optimization was being applied to this function (which should probably be written in assembly instead) and moving the tail-call to later on after some stack manipulations. The problem with this is that this particular function uses alloca() to carefully craft a stack that it's expecting to be used for the function it's calling at the end. The new patch fixes this using a technique that was committed later on in upstream changeset 75061 to address a similar failure with GCC sanitizers enabled. The FreeBSD-specific component of this patch is using the different stack setup if __clang__ is defined as well. The extra hunk in the Config patch has been added because the VirtualBox build system cannot cope with LLVM version numbers in the way it's expecting. Hardcode it to GCC 4.2 for FreeBSD, which is what the clang __GNU* macros describe, to fix build breakage that happens with newer LLVM as the build system decides our LLVM is an even older and more broken version of GCC with a broken regparm. PR: 236616, 244847 Approved by: koobs (mentor) Approved by: ports-secteam (blanket: major runtime fix caused by bad build) Changes: _U branches/2020Q2/ branches/2020Q2/emulators/virtualbox-ose/Makefile branches/2020Q2/emulators/virtualbox-ose/files/patch-Config.kmk branches/2020Q2/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp
Build has been switched back to llvm with a fix for the part that regressed between LLVM 7 and 8. Closing this because, as far as I'm aware, this should no longer be any kind of issue.
Just tested a build from source using the latest commit and it seems to work fine now. Nice work!
Works on amd64 but fails to build on i386. /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:388:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_add_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1146:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_add_u64, iemAImpl_add_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:406:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_adc_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1147:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_adc_u64, iemAImpl_adc_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:430:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_sub_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1148:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_sub_u64, iemAImpl_sub_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:448:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_sbb_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1149:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_sbb_u64, iemAImpl_sbb_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:472:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_or_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1150:19: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_or_u64, iemAImpl_or_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:480:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_xor_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1151:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_xor_u64, iemAImpl_xor_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:488:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_and_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1152:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_and_u64, iemAImpl_and_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:496:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_cmp_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1160:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_cmp_u64; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:503:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_test_u64,(uint64_t *puDst, uint64_t uSr... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1168:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_test_u64; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:526:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_add_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1146:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_add_u64, iemAImpl_add_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:532:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_adc_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1147:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_adc_u64, iemAImpl_adc_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:538:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_sub_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1148:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_sub_u64, iemAImpl_sub_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:544:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_sbb_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1149:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_sbb_u64, iemAImpl_sbb_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:550:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_or_u64_locked,(uint64_t *puDst, uint64_... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1150:37: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_or_u64, iemAImpl_or_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:556:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_xor_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1151:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_xor_u64, iemAImpl_xor_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:562:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_and_u64_locked,(uint64_t *puDst, uint64... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1152:36: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_and_u64, iemAImpl_and_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:596:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_bt_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1175:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_bt_u64, iemAImpl_bt_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:608:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_btc_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1178:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_btc_u64, iemAImpl_btc_u64_locked; ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:629:25: error: exception specification in declaration does not match previous declaration IEM_DECL_IMPL_DEF(void, iemAImpl_btr_u64,(uint64_t *puDst, uint64_t uSrc... ^ /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1181:18: note: previous declaration is here FNIEMAIMPLBINU64 iemAImpl_btr_u64, iemAImpl_btr_u64_locked; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. kmk: *** [/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/VMMAll/IEMAllAImplC.o] Error 1 The failing command: @c++ -c -O2 -g -pipe -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter -Wno-language-extension-token -Wno-gnu-folding-constant -Wno-gnu-anonymous-struct -Wno-string-plus-int -Wno-nested-anon-types -Wno-variadic-macros -Wno-long-long -Wno-variadic-macros -march=i586 -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -m32 -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/PATM -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/CommonGenIncs -I/usr/local/include -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/dtrace -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/include -I/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_REM -DVBOX_WITH_RAW_MODE -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DVBOX_WITH_DEBUGGER -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=64 -DIN_VMM_R3 -DIN_DIS -DIN_GMM_R3 -DIN_DBG -DVBOX_IN_VMM -DVBOX_WITH_2ND_IEM_STEP -DVBOX_WITH_3RD_IEM_STEP -DVBOX_WITH_MULTI_CORE -DVBOX_WITH_PCI_PASSTHROUGH -DVBOX_WITH_SAFE_STR -DVBOX_WITH_RAW_RING1 -DVBOX_WITH_USB -DVBOX_WITH_PDM_ASYNC_COMPLETION -DVBOX_WITH_NETSHAPER -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_MODE_NOT_R0 -Wp,-MD,/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/VMMAll/IEMAllAImplC.o.dep -Wp,-MT,/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/VMMAll/IEMAllAImplC.o -Wp,-MP -o /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/out/freebsd.x86/release/obj/VBoxVMM/VMMAll/IEMAllAImplC.o /export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp kmk: *** Waiting for unfinished jobs.... kmk: *** Exiting with status 2 *** Error code 2 Stop. make[1]: stopped in /usr/ports/emulators/virtualbox-ose *** Error code 1 Stop. make: stopped in /usr/ports/emulators/virtualbox-ose ===>>> make build failed for emulators/virtualbox-ose ===>>> Aborting update ===>>> Update for emulators/virtualbox-ose failed ===>>> Aborting update ===>>> The following actions were performed: Re-installation of virtualbox-ose-kmod-5.2.34 ===>>> You can restart from the point of failure with this command line: portmaster <flags> emulators/virtualbox-ose This command has been saved to ~/portmasterfail.txt Summary: -- emulators/virtualbox-ose-kmod emulators/virtualbox-ose build and install is sucessful on amd64 Exiting due to failure at i386, RC=1 slippy#
(In reply to Cy Schubert from comment #34) Hmm... that's a bit unexpected. Setting up an i386 environment to diagnose it.
Created attachment 213395 [details] svn(1) diff against the ports tree @cy: I think this will fix what ails you, but I'm still waiting on my i386 environment to burn through all of the dependencies to make sure that's not the only problem... I guess LLVM 8+ are more strict about mismatched attributes between declaration/definition than GCC or older LLVM.
That fixed it. Thanks. -- emulators/virtualbox-ose build and install is sucessful on amd64 -- emulators/virtualbox-ose build and install is sucessful on i386
(In reply to Cy Schubert from comment #37) Excellent... please commit at will with an MFH tag. =-)
A commit references this bug: Author: cy Date: Wed Apr 15 02:29:04 UTC 2020 New revision: 531736 URL: https://svnweb.freebsd.org/changeset/ports/531736 Log: Fix r531689 i386 build. PR: 236616, 244847 Submitted by: kevans MFH: 2020Q2 (blanket: major runtime build fix) MFH-with: r531689 Changes: head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/files/patch-src_VBox_VMM_include_IEMInternal.h
A commit references this bug: Author: kevans Date: Thu Apr 16 00:19:35 UTC 2020 New revision: 531801 URL: https://svnweb.freebsd.org/changeset/ports/531801 Log: MFH: r531736 Fix r531689 i386 build. PR: 236616, 244847 Submitted by: kevans MFH-with: r531689 Approved by: ports-secteam (blanket: i386 build fix) Changes: _U branches/2020Q2/ branches/2020Q2/emulators/virtualbox-ose/Makefile branches/2020Q2/emulators/virtualbox-ose/files/patch-src_VBox_VMM_include_IEMInternal.h
i386 build fix applied to both head and quarterly; thanks!