After upgrading my machine from version 14 to 15, I encountered issues with VirtualBox. When I install the pre-compiled binary package, it works without any problems, but I can't use the bridge mode on the host machine. I suspect that this might be due to a kernel issue or a version mismatch between the binary and the kernel.
Therefore, I attempted to compile virtualbox-ose-70 from the source. However, I ran into some strange problems. I decided to make minimal changes to the Makefile in hopes of fixing the issues, but it didn't work, and the results remain the same.
I will attach the changes I made and the results for further reference.
Therefore, I attempted to compile virtualbox-ose-70 from the source. However, I ran into some strange problems. I decided to make minimal changes to the Makefile in hopes of fixing the issues, but it didn't work, and the results remain the same.
I will attach the changes I made and the results for further reference.
Code:
Makefile
39 │ HAS_CONFIGURE= yes
40 │ CONFIGURE_ARGS= --disable-java --passive-mesa --disable-docs
41 │ #CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}"
42 │ #CONFIGURE_ARGS+= --with-gcc="clang" --with-g++="clang++" -fuse-ld=lld
43 │ #LDFLAGS+= -fuse-ld=lld
44 │ CONFIGURE_ARGS+= --with-gcc="clang" --with-g++="clang++"
45 │ CXXFLAGS+= -fuse-ld=lld
46 │ LDFLAGS+= -fuse-ld=lld
make LDFLAGS="-fuse-ld=lld"
Code:
===> Building for virtualbox-ose-70-7.0.26_1
cd /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26 && /bin/sh -c '. /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/env.sh && /usr/bin/env QT_SELECT=qt5 QMAKEMODULES="/usr/ports/emulators/virtualbox-ose-70/w
ork/VirtualBox-7.0.26/mkspecs/modules:/usr/local/lib/qt5/mkspecs/modules" OPENSSLBASE=/usr/local OPENSSLDIR=/usr/local/openssl OPENSSLINC=/usr/local/include OPENSSLLIB=/usr/local/lib OPENSSLRPATH=/usr/local/lib SDL_CONFIG=/usr/local/bin
/sdl-config XDG_DATA_HOME=/usr/ports/emulators/virtualbox-ose-70/work XDG_CONFIG_HOME=/usr/ports/emulators/virtualbox-ose-70/work XDG_CACHE_HOME=/usr/ports/emulators/virtualbox-ose-70/work/.cache HOME=/usr/ports/emulators/virtualbox-
ose-70/work PATH=/usr/ports/emulators/virtualbox-ose-70/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/usr/ports/emulators/virtualbox-ose-70/work/.pkgconfig:/usr/local/libdata/pkgconf
ig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES ADDR2LINE="/usr/local/bin/addr2line" AR="/usr/local/bin/ar" AS="/usr/local/bin/as" CPPFILT="/usr/local/bin/c++filt" GP
ROF="/usr/local/bin/gprof" LD="/usr/local/bin/ld" NM="/usr/local/bin/nm" OBJCOPY="/usr/local/bin/objcopy" OBJDUMP="/usr/local/bin/objdump" RANLIB="/usr/local/bin/ranlib" READELF="/usr/local/bin/readelf" SIZE="/usr/local/bin/size" STRING
S="/usr/local/bin/strings" PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="-DLIBICONV_PLUG" LDFLAGS="-fuse-ld=lld" LIBS="" CXX="c
++" CXXFLAGS="-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -fuse-ld=lld -DLIBICONV_PLUG " BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555"
BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" VBOX_LIBPATH_X11=/usr/local VBOX_FREEBSD_SRC=/usr/src/sys /usr/local/bin/kmk BUILD_TYPE=debug -j1'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/bin/src/vbox
drv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/bin/src/vb
oxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/dist/bin/src
/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/dist/bin/s
rc/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/bin/src/vbox
drv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/bin/src/vb
oxdrv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/dist/bin/src
/vboxdrv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target '/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/dist/bin/s
rc/vboxdrv/include/iprt/net.h'
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Linking VMMR0
/usr/bin/ld.bfd: BFD 2.17.50 [FreeBSD] 2007-07-03 internal error, aborting at /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/reloc.c line 445 in unsigned int bfd_get_reloc_size(reloc_howto_type *)
/usr/bin/ld.bfd: Please report this bug.
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
kmk: *** [/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/kBuild/footer-pass2-compiling-targets.kmk:776: /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0.r0] Error 1
The failing command:
@clang++ -shared -g -nostdlib -Bsymbolic -g -fuse-ld=bfd -o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0.r0 -Wl,-soname=VMMR0.r0 /usr/ports/emulato
rs/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/dtrace/VBoxVMM-dtrace-object-format.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/CPUMR0.o /usr/port
s/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/CPUMR0A.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/DBGFR0.o /usr/ports/emulators/v
irtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/DBGFR0Bp.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/DBGFR0Tracer.o /usr/ports/emulators/virtual
box-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/GIMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/GIMR0Hv.o /usr/ports/emulators/virtualbox-ose-70/wor
k/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/GMMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/GVMMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.
0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/EMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/HMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.a
md64/debug/obj/VMMR0/VMMR0/HMR0A.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/HMR0UtilA.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/o
bj/VMMR0/VMMR0/HMVMXR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/HMSVMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMM
R0/IEMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/IOMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/IOMR0IoPort.o
/usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/IOMR0Mmio.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PDMR0Device.o /usr/
ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PDMR0DevHlp.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PDMR0DevHlpTracing.o /u
sr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PDMR0Driver.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PDMR0Queue.o /usr/po
rts/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PGMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PGMR0Pool.o /usr/ports/emulator
s/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/PGMR0SharedPage.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/TMR0.o /usr/ports/emulators/virtu
albox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/VMMR0.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMRZ/CPUMRZ.o /usr/ports/emulators/virtualbox-ose-70/wo
rk/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMRZ/CPUMRZA.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMRZ/VMMRZ.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-
7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/APICAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/CPUMAllCpuId.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.2
6/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/CPUMAllRegs.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/CPUMAllMsrs.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/
out/freebsd.amd64/debug/obj/VMMR0/VMMAll/DBGFAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/DBGFAllBp.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/free
bsd.amd64/debug/obj/VMMR0/VMMAll/DBGFAllTracer.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/EMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.am
d64/debug/obj/VMMR0/VMMAll/GCMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/GIMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/ob
j/VMMR0/VMMAll/GIMAllHv.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/GIMAllKvm.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0
/VMMAll/HMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/HMSVMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/HMV
MXAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IEMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IEMAllInstruc
tionsInterpretOnly.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IEMAllAImpl.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VM
MAll/IEMAllAImplC.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IEMAllCImpl.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMM
All/IEMAllCImplSvmInstr.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IEMAllCImplVmxInstr.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug
/obj/VMMR0/VMMAll/IOMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/IOMAllMmioNew.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/
VMMR0/VMMAll/MMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/NEMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/
PDMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PDMAllCritSect.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PDMA
llCritSectRw.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PDMAllCritSectBoth.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/V
MMAll/PDMAllIommu.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PDMAllQueue.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMM
All/PDMAllTask.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PGMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PGMA
llHandler.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PGMAllPhys.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PGMAl
lPool.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/SELMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/TMAll.o /usr
/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/TMAllCpu.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/TMAllReal.o /usr/ports/
emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/TMAllVirtual.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/TRPMAll.o /usr/ports/emula
tors/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/VMAll.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/VMMAll.o /usr/ports/emulators/virtualb
ox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/VMMAllA.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMAll/PDMAllNetShaper.o /usr/ports/emulators/virtualbox
-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/obj/VMMR0/VMMR0/VMMR0JmpA-amd64.o /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/lib/ServicesR0.a /usr/ports/emulators/virtualbox-ose-70
/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/lib/RuntimeR0.a /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/freebsd.amd64/debug/lib/DisasmR0.a /usr/ports/emulators/virtualbox-ose-70/work/VirtualBox-7.0.26/out/f
reebsd.amd64/debug/lib/VBox-SoftFloatR0.a
*** Error code 2
Stop.
make[1]: stopped making "/usr/ports/emulators/virtualbox-ose-70/work/.stage_done.virtualbox-ose._usr_local" in /usr/ports/emulators/virtualbox-ose-70
*** Error code 1
Stop.
make: stopped making "all" in /usr/ports/emulators/virtualbox-ose-70