Created attachment 635758 [details]
Build log (gzip-ed)
When trying to build app-emulation/virtualbox-6.1.6 with the "headless" USE flag – and currently after providing user patch from bug 719032 – the compilations fails with the following error:
In file included from /var/tmp/portage/app-emulation/virtualbox-6.1.6/work/VirtualBox-6.1.6/src/VBox/Devices/Graphics/DevVGA-SVGA3d-in
/var/tmp/portage/app-emulation/virtualbox-6.1.6/work/VirtualBox-6.1.6/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h:58:11: fatal err
or: X11/Xlib.h: No such file or directory
58 | # include <X11/Xlib.h>
As expected behaviour, however I might be wrong, I think it shouldn’t bring source files related to a graphic environment, and then not relying on this header file (from x11-libs/libX11 package).
Please see the provided build log file.
Steps to reproduce:
1. emerge app-emulation/virtualbox-6.1.6 with the headless USE flag (no opengl nor qt5 use flags)
Created attachment 635762 [details]
Update for virtualbox-6.1.10-r1:
Vbox upstream has resolved bug #719032, but now +headless build fails because of X dependencies.
On a clean gentoo install it needs this:
Both are needed, even if no GUI is used and even if -opengl is forced.
Created attachment 645004 [details]
Build log (gzip-ed) with version 6.1.10,
I too wasn't able to build this new version 6.1.10 on an headless system and, furthermore, I didn't try to add the dependencies you listed, Vedran. I thinks this is an issue which needs to be reported upstream, or unless they can tell us this is a real dependency, which is recently introduced.
Here the log for this last version with the same issue, compiled from this command:
% emerge -va app-emulation/virtualbox app-emulation/virtualbox-extpack-oracle
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] acct-group/vboxusers-0::gentoo 0 KiB
[ebuild N ] dev-lang/yasm-1.3.0::gentoo USE="nls -python" PYTHON_SINGLE_TARGET="-python2_7" 1,458 KiB
[ebuild N ] sys-power/iasl-20200326::gentoo USE="-test" 1,808 KiB
[ebuild N ] virtual/linux-sources-3-r4::gentoo USE="-firmware" 0 KiB
[ebuild N ~] app-emulation/virtualbox-modules-6.1.10::gentoo USE="-pax_kernel" 652 KiB
[ebuild N ] dev-libs/libIDL-0.8.14-r2::gentoo ABI_X86="(64) -32 (-x32)" 418 KiB
[ebuild N ] media-libs/libvpx-1.7.0-r1:0/5::gentoo USE="highbitdepth postproc threads -doc -static-libs -svc -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="mmx sse sse2 sse3 sse4_1 ssse3 -avx -avx2" 2,617 KiB
[ebuild N ] dev-util/kbuild-0.1.9998.3149::gentoo 2,261 KiB
[ebuild N ~] app-emulation/virtualbox-6.1.10-r1::gentoo USE="headless lvm opus pam sdk udev -alsa -debug -doc -dtrace -java -libressl -opengl -pax_kernel -pulseaudio -python -qt5 -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python3_6 -python3_7 -python3_8" 161,126 KiB
[ebuild N ~] app-emulation/virtualbox-extpack-oracle-184.108.40.206449::gentoo 10,742 KiB
Total: 10 packages (10 new), Size of downloads: 181,077 KiB
Same error here with app-emulation/virtualbox-6.0.24 in stable portable tree.
I can confirm that virtualbox-6.0.24 has same dependency on xlib. Even worse, virtualbox-6.0.24 is marked as stable and it breaks without xlib.
I confirmed I met this issue too with the current new stable version, I suspect VirtualBox versions 6.0 and above all met this issue.
I wanted to do more tests with all the current versions available inside the main Portage tree before updating this issue.
I guess with more people facing this issue, and the new stable version, we can update the title.
I still let the privilege to the maintainer to rise the level of this issue.