Compilation Error in Building Minimal Headless VirtualBox 7

Discussions related to using the OSE version of VirtualBox.
Post Reply
DP1
Posts: 2
Joined: 21. May 2023, 11:37

Compilation Error in Building Minimal Headless VirtualBox 7

Post by DP1 »

Hello

I'm currently working on building a minimal headless VirtualBox 7 package for Alpine Linux, where I have disabled all possible options. However, I encountered an error during the compilation process stating "No rule to make target."

Here's the configuration I used:

Code: Select all

./configure --nofatal \
        --disable-alsa \
        --disable-dbus \
        --disable-devmapper \
        --disable-docs \
        --disable-java \
        --disable-kmods \
        --disable-libtpms \
        --disable-libvpx \
        --disable-opengl \
        --disable-pulse \
        --disable-python \
        --disable-qt \
        --disable-sdl-ttf \
        --disable-udptunnel \
        --disable-vmmraw \
        --disable-xpcom \
        --with-linux=/usr/include \
        --build-headless
source ./env.sh
kmk
In addition, here is the content of the LocalConfig.kmk file:

Code: Select all

# don't build testcases to save time, they are not needed for the package
VBOX_WITH_TESTCASES     :=
VBOX_WITH_VALIDATIONKIT :=

KBUILD_MSG_STYLE        := brief

## paths, origin, hardening
VBOX_WITH_HARDENING        := 2
VBOX_WITH_ORIGIN           :=

## don't build with -Werror
VBOX_WITH_WARNINGS_AS_ERRORS :=

# use system xorg and gl headers
VBOX_USE_SYSTEM_XORG_HEADERS = 1
VBOX_USE_SYSTEM_GL_HEADERS = 1

# no legacy X org - use KMS
VBOX_NO_LEGACY_XORG_X11 = 1

## Disable anything X11 related
VBOX_WITH_PAM :=

TOOL_YASM_AS := yasm
However, I encountered the following error during compilation:

Code: Select all

[...]/src/VirtualBox-7.0.8/src/VBox/Runtime/Makefile.kmk:3119: $(commands ) does not work reliably with $< in all cases
kmk: *** No rule to make target '[...]/src/VirtualBox-7.0.8/out/linux.amd64/release/lib/VBoxCOM.a', needed by '[...]/src/VirtualBox-7.0.8/out/linux.amd64/release/obj/vboximg-mount/vboximg-mount'.  Stop.
I would appreciate any assistance in resolving this compilation error. Could someone please guide me on the next steps to take in order to address this issue?

Thank you in advance for your help!
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Compilation Error in Building Minimal Headless VirtualBox 7

Post by fth0 »

I haven't built VirtualBox from source yet, so take my advice with a grain of salt:

VBoxHeadless needs XPCOM to communicate with VBoxSVC, so I'll make an educated guess that you cannot use "--disable-xpcom".
DP1
Posts: 2
Joined: 21. May 2023, 11:37

Re: Compilation Error in Building Minimal Headless VirtualBox 7

Post by DP1 »

Thank you! I removed "--disable-xpcom" and successfully compiled a minimal headless variant of VirtualBox 7.0.8a after some manual tweaking.

Code: Select all

./VBoxManage -version
7.0.8r156879
Capture1.jpg
Capture1.jpg (126.11 KiB) Viewed 6580 times
But I'm still facing some challenges in achieving a clean automated build. One specific issue I encountered is with xpcom, which requires libIDL. Unfortunately, libIDL has been removed from Alpine Linux (as mentioned in virtualbox bugtracker ticket 21169). I'm looking for guidance on how to include libIDL in the build process, similar to the "--build-libxml2", "--build-libssl", and "--build-libtpms" options.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Compilation Error in Building Minimal Headless VirtualBox 7

Post by fth0 »

I don't know the VirtualBox build system good enough to guide you what to do, you'll have to wait for some real expert in this area then. Perhaps you could ask on IRC.
Post Reply