[vbox-dev] Most extpacks are not packaged properly and VBOX_ONLY_EXTPACKS causes the build to fail.
volkertb at users.sourceforge.net
Mon Nov 12 00:37:13 UTC 2018
I ran into a few issues when trying to build the extension packs that come
with the VirtualBox codebase.
In an attempt to minimize the build time of the VirtualBox source code for
the sake of extension pack development, I tried setting
the VBOX_ONLY_EXTPACKS environment variable to 1.
This caused the build to fail with the following error message:
/vbox_src/src/VBox/Devices/PC/PXE/Makefile.kmk: No such file or directory
The line that the error message refers to is the following:
if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
Apparently, this check blindly assumes that the makefile for Intel PXE is
always available if either of those build flags is set. And since Intel PXE
is a PUEL feature, this causes the open source code to fail.
I assume that this line should be changed to the following:
if defined(VBOX_WITH_INTEL_PXE) || ( defined(VBOX_ONLY_EXTPACKS) &&
The parentheses around the entire part on the right side of the || operator
is technically redundant, since && takes precedence over it, but this
seems more readable and less error-prone to me.
Here is a single-line patch command using Perl, which I'm using in a
Dockerfile to work around this issue:
perl -i -pe 's/\Qif defined(VBOX_WITH_INTEL_PXE) ||
defined(VBOX_ONLY_EXTPACKS)\E/if defined(VBOX_WITH_INTEL_PXE) || (
defined(VBOX_ONLY_EXTPACKS) && defined(VBOX_WITH_EXTPACK_PUEL) )/g'
If my assumptions are incorrect and this is somehow intended behavior, I
would appreciate it if someone could steer me in the right direction.
After applying my suggested workaround, the build seems to go well.
It would be nice if the build could be sped up even further, since it's
still taking quite a few minutes to build. So far, I've specified every
supported "--ignore-x" argument behind the ./configure command, as well as
the "--build-headless" argument. In addition to that, I've
set VBOX_ONLY_EXTPACKS to 1 and applied the aforementioned workaround, but
judging from the output, I have the suspicion that the build script is
still building a lot of unnecessary stuff that is not required to build the
Any idea on how to speed this up faster?
It would appear that there is something wrong with the makefiles of the
extpacks BusMouse and Skeleton. The resulting .vbox-extpack files are very
small and only appear to contain the metadata files ExtPack.manifest,
ExtPack.signature and ExtPack.xml and nothing else. No binary code. I
didn't actually notice this until I tried to install those extpacks in
VirtualBox, which caused it to complain with the error "Failed to locate
the main module". (Also, the license window for these extpacks was empty,
presumably due to a missing ExtPack-SourceCodeLicense.txt file in the
packaged extpack files. The extpack VBoxDTrace does contain a
ExtPack-SourceCodeLicense.txt once packaged. Presumably this is
because VBoxDTrace has a CDDL-only license. However, that extpack also
lacks binary code. The only extpack in the codebase that seems to be
packaged properly is VNC. Perhaps I did something wrong here? Again, any
help here would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev