Created attachment 235585 [details] poudriere build log error: ran out of registers during register allocation 19 warnings and 1 error generated. kmk: *** [/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o] Error 1 The failing command: @c++ -m32 -c -O2 -fno-pie -nostdinc -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 -fno-exceptions -O2 -mtune=generic -fno-omit-frame-pointer -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -fno-builtin -Wno-unused-function -O2 -fomit-frame-pointer -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/include -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/VMMRC -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/PATM -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VBoxVMM/CommonGenIncs -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/include/iprt/nocrt -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/dtrace -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/include -I/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/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_RC -DIPRT_NO_CRT -DRT_WITH_NOCRT_ALIASES -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DIN_VMM_RC -DIN_RT_RC -DIN_DIS -DDIS_CORE_ONLY -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_MODE_NOT_R0 -DIN_SUP_RC -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 -Wp,-MD,/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o.dep -Wp,-MT,/wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o -Wp,-MP -o /wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o /wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/VMMAll/IEMAll.cpp
I just noticed the same issue on FreeBSD 12.4: error: ran out of registers during register allocation kBuild: Linking vboxwebsrv kBuild: Installing vboxwebsrv => /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/bin/vboxwebsrv 2 warnings generated. kBuild: Generating VMMR0 - /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMR0/dtrace/VBoxVMM-dtrace-object-format.o kBuild: Linking VMMR0 kBuild: Installing VMMR0 => /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/bin/VMMR0.r0 kBuild: Installing /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/stage/debug/bin/VMMR0.debug kBuild: Installing /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/bin/VMMR0.debug 19 warnings and 1 error generated. kmk: *** [/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o] Error 1 The failing command: @c++ -m32 -c -O2 -fno-pie -nostdinc -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 -fno-exceptions -O2 -mtune=generic -fno-omit-frame-pointer -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -fno-builtin -Wno-unused-function -O2 -fomit-frame-pointer -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/include -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/VMMRC -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/PATM -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VBoxVMM/CommonGenIncs -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/include/iprt/nocrt -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/dtrace -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/include -I/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/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_RC -DIPRT_NO_CRT -DRT_WITH_NOCRT_ALIASES -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DIN_VMM_RC -DIN_RT_RC -DIN_DIS -DDIS_CORE_ONLY -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_MODE_NOT_R0 -DIN_SUP_RC -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 -Wp,-MD,/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o.dep -Wp,-MT,/var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o -Wp,-MP -o /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/out/freebsd.amd64/release/obj/VMMRC/VMMAll/IEMAll.o /var/ports/basejail/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/VMMAll/IEMAll.cpp *** Error code 2
This is more complex problem - llvm 13 and 14 (in base) can't build emulators/virtualbox-ose-legacy. I did some explore (build in poudriere): version 12.4-RELEASE 13.1-RELEASE 13.2-RELEASE 14-CURRENT base llvm13: ran out of registers llvm13: ran out of registers llvm14: ran out of registers didn't tested llvm11 + + _LIBCPP_USING_IF_EXISTS didn't tested llvm12 + + _LIBCPP_USING_IF_EXISTS didn't tested llvm13 on all RELEASE versions: ran out of registers during register allocation didn't tested llvm14 on all RELEASE versions: ran out of registers during register allocation didn't tested llvm15 + + + didn't tested llvm16 on all RELEASE versions: ISO C++17 does not allow 'register' storage class specifier didn't tested So emulators/virtualbox-ose-legacy can't build on any RELEASE now… Can you test work of the port after build with llvm15? Patch for Makefile is simple: 1) Add llvm in USES: -USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 +USES= compiler:c++14-lang cpe gnome iconv llvm:15 pkgconfig ssl tar:bzip2 2) Add lines after .include <bsd.port.options.mk>: CC= clang${LLVM_VERSION} CXX= clang++${LLVM_VERSION} 3) Remove (or comment out) all this block: .if ${OPSYS} == FreeBSD .if ${OSVERSION} >= 1400059 BROKEN= Fails to compile with libc++ 14.0.3 .elif ${OSVERSION} >= 1301000 && ${OSVERSION} < 1400000 BROKEN= Fails to compile: error: ran out of registers during register allocation .endif .endif .if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} > 1400022 # clang > 11 included in FreeBSD 14 fails to compile this legacy version # of virtualbox-ose, force clang 11 on FreeBSD 14 where a newer clang is # included. BUILD_DEPENDS+= clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER} CC= clang${VBOX_LLVM_VER} CXX= clang++${VBOX_LLVM_VER} VBOX_LLVM_VER?= 11 .endif
I did several tests: 1) build with llvm15 from ports on 13.2 amd64 - run VM fine for more than 12 hours with CPU and disk load; 2) build with llvm15 from ports on 12.4, 13.1, 13.2 i386 without errors. Need last tests: 1) build with llvm15 from base and run on 14-CURRENT and 13-STABLE amd64 2) at least build on 14-CURRENT and 13-STABLE i386. Patch is at https://reviews.freebsd.org/D40408
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8febe8bdd5601e924af96ccef69b1f367269ff8a commit 8febe8bdd5601e924af96ccef69b1f367269ff8a Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2023-06-06 09:57:47 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2023-06-06 10:03:52 +0000 emulators/virtualbox-ose-legacy: build fails on FreeBSD 12.4, 13.1 and 13.2 (all supported releases) llvm 13 and 14 included in FreeBSD fails to compile, force llvm 15 on all versions of the FreeBSD except lastest 13 and 14 where the llvm 15 is included. Keep possibility to define different llvm via VBOX_LLVM_VER in make.conf. PR: 265539 Reported by: freebsd@charles.lecklider.org Tested by: grahamperrin Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D40408 emulators/virtualbox-ose-legacy/Makefile | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c852714ad50261e47784429342129a26b48bd402 commit c852714ad50261e47784429342129a26b48bd402 Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2023-06-06 09:57:47 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2023-06-06 10:08:34 +0000 emulators/virtualbox-ose-legacy: build fails on FreeBSD 12.4, 13.1 and 13.2 (all supported releases) llvm 13 and 14 included in FreeBSD fails to compile, force llvm 15 on all versions of the FreeBSD except lastest 13 and 14 where the llvm 15 is included. Keep possibility to define different llvm via VBOX_LLVM_VER in make.conf. PR: 265539 Reported by: freebsd@charles.lecklider.org Tested by: grahamperrin Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D40408 (cherry picked from commit 8febe8bdd5601e924af96ccef69b1f367269ff8a) emulators/virtualbox-ose-legacy/Makefile | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)