Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678534 - app-emulation/virtualbox-6.x.x headless builds fails without libX11 and opengl
Summary: app-emulation/virtualbox-6.x.x headless builds fails without libX11 and opengl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-21 21:36 UTC by Sugoi Asian
Modified: 2022-11-20 08:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sugoi Asian 2019-02-21 21:36:29 UTC
summary: X11/Xlib.h: No such file or directory
If I emerge libX11, build fails again needing the opengl headers

Tested with 6.0.2 as well
Tested with -qt5

Then it fails to build because gl.h not found 
Tested with -qt5 -opengl
Tested with -opengl

All fail

app-emulation/virtualbox-6.0.4-r1
USE:        abi_x86_64 alsa amd64 elibc_glibc headless kernel_linux opengl opus pam python_targets_python2_7 qt5 sdk udev userland_GNU


>>> Configuring source in /mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4 ...
./configure --with-gcc=x86_64-pc-linux-gnu-gcc --with-g++=x86_64-pc-linux-gnu-g++ --disable-dbus --disable-kmods --disable-docs --disable-java --disable-devmapper --disable-pulse --disable-python --build-headless --disable-opengl
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for Open Watcom:
  ** Open Watcom was not found, using alternative BIOS sources!
Checking for iasl: found version 20160729, OK.
Checking for xslt: found, OK.
Checking for pthread: found, OK.
Checking for libxml2: found version 2.9.9, OK.
Checking for libIDL: found version 0.8.14, OK.
Checking for ssl: found version OpenSSL 1.0.2q  20 Nov 2018, OK.
Checking for libcurl: found version 7.64.0, OK.
Checking for libvpx: found version 1.5.0, OK.
Checking for libopus: found, OK.
Checking for zlib: found version 1.2.11, OK.
Checking for libpng: found version 1.6.35, OK.
Checking for static stc++ library: found, OK.
Checking for ALSA: found version 1.1.6, OK.
Checking for libcap library: found, OK.
Checking for compiler.h: compiler.h not found, OK.
Checking for 32-bit support: OK.

kmk -j9 VBOX_BUILD_PUBLISHER=_Gentoo TOOL_GCC3_CC=x86_64-pc-linux-gnu-gcc TOOL_GCC3_CXX=x86_64-pc-linux-gnu-g++ TOOL_GCC3_AS=x86_64-pc-linux-gnu-gcc TOOL_GCC3_AR=x86_64-pc-linux-gnu-ar TOOL_GCC3_LD=x86_64-pc-linux-gnu-g++ TOOL_GCC3_LD_SYSMOD=x86_64-pc-linux-gnu-ld 'TOOL_GCC3_CFLAGS=-O2 -pipe -fdiagnostics-color=always' 'TOOL_GCC3_CXXFLAGS=-O2 -pipe -fdiagnostics-color=always' 'VBOX_GCC_OPT=-O2 -pipe -fdiagnostics-color=always' TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 all 

g++ -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter     -Wlogical-op   -Wno-variadic-macros -Wno-long-long -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter  -Wno-overloaded-virtual -Wno-array-bounds -Wno-ignored-qualifiers -Wno-variadic-macros -O2 -pipe -fdiagnostics-color=always -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden   -fPIC -m64 -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/build -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/slirp -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/include/VBox/Graphics -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/lwip-new/src/include -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/lwip-new/src/include/ipv4 -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/lwip-new/src/include/ipv6 -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/lwip-new/vbox/include -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Network/lwip-new/vbox -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxDD/dtrace -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxDD/dtrace -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/include -I/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_REM -DVBOX_WITH_RAW_MODE -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_DEBUGGER -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib64/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib64/virtualbox\" -DRTPATH_APP_DOCS=\"\" -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R3 -DPIC -DVBOX_ACPI -DVBOX_HGCM_HOST_CODE -DVBOX_WITH_HGCM -DVBOX_WITH_DMI_CHASSIS -DVBOX_WITH_DMI_OEMSTRINGS -DVBOX_WITH_NEW_LPC_DEVICE -DVBOX_WITH_DTRACE -DVBOXWDDM_WITH_VBVA -DVBOX_WITH_HGSMI -DVBOX_WITH_WDDM -DVBOX_WITH_VMSVGA -DVBOX_WITH_VMSVGA3D -DVMSVGA3D_OPENGL -DVMSVGA3D_DYNAMIC_LOAD -DVBOX_WITH_VDMA -DVBOX_WITH_PXE_ROM -DVBOX_WITH_USB -DVBOX_WITH_VUSB -DVBOX_WITH_INIP -DVBOX_WITH_E1000 -DVBOX_WITH_VIRTIO -DVBOX_WITH_UDPTUNNEL -DVBOX_WITH_VDE -DVBOX_WITH_NETSHAPER -DVBOX_WITH_AHCI -DIN_AHCI_R3 -DVBOX_WITH_BUSLOGIC -DVBOX_WITH_LSILOGIC -DVBOX_WITH_PDM_ASYNC_COMPLETION -DVBOX_WITH_SCSI -DVBOX_WITH_DRV_DISK_INTEGRITY -DVBOX_WITH_EFI -DVBOX_WITH_MSI_DEVICES -DVBOX_WITH_AUDIO_ENUM -DVBOX_WITH_AUDIO_CALLBACKS -DVBOX_WITH_INTEL_HDA -DVBOX_WITH_AUDIO_HDA_ASYNC_IO -DVBOX_WITH_AUDIO_DEBUG -DVBOX_WITH_AUDIO_OSS -DVBOX_WITH_AUDIO_ALSA -DVBOX_WITH_NETFLT -DVUSB_HAVE_USBPROXY_DEVICE -DVBOX_USB_WITH_SYSFS -Wp,-MD,/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxDD/Graphics/DevVGA-SVGA3d-shared.o.dep -Wp,-MT,/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxDD/Graphics/DevVGA-SVGA3d-shared.o -Wp,-MP -o /mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxDD/Graphics/DevVGA-SVGA3d-shared.o /mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
In file included from /mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h:45,
                 from /mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d.cpp:39:
/mnt/volatile/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h:58:11: fatal error: X11/Xlib.h: No such file or directory
Comment 1 Sugoi Asian 2019-02-21 21:38:19 UTC
also note that virtualbox doesn't correctly depend on libX11 nor opengl to resolve these dependencies itself
Comment 2 diego 2019-11-04 15:32:28 UTC
Tested with:

USE="headless -alsa -debug -doc -dtrace -java -libressl -lvm -opengl -opus -pam -pax_kernel -pulseaudio -python -qt5 -sdk -udev -vboxwebsrv -vnc"
Comment 3 diego 2019-11-28 08:01:26 UTC
Its a virtualbox bug:
https://www.virtualbox.org/ticket/18583
Comment 4 Christophe PEREZ 2020-09-06 22:14:38 UTC
Same problem here with app-emulation/virtualbox-6.0.24 in stable portage tree.
Comment 5 László Szalma 2022-11-19 12:25:53 UTC
7.0.2 doesn't build.

[ebuild     U  ] app-emulation/virtualbox-7.0.2:0/7.0::gentoo [6.1.40:0/6.1::gentoo] USE="dbus%* headless opus pam sdk sdl udev -alsa -debug -doc -dtrace -java -lvm -opengl (-pax-kernel) (-pch) -pulseaudio -python -qt5 -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9 -python3_11%" 0 KiB



  C VBoxKeyboard - {C}/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c
kmk_builtin_rm -f -- /var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/keyboard.o.dep /var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/keyboard.o
x86_64-pc-linux-gnu-gcc -c -O2 -O2 -pipe -mno-abm -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-fma -mno-fma4 -mno-popcnt -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter     -Wlogical-op   -Wno-variadic-macros  -Wno-long-long -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration   -Wno-variadic-macros -O2 -pipe -mno-abm -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-fma -mno-fma4 -mno-popcnt -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT   -fPIC -m64 -I/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/dtrace -I/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/include -I/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_DEBUGGER -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib64/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib64/virtualbox\" -DRTPATH_APP_DOCS=\"\" -DIN_RING3 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R3 -DPIC -DHC_ARCH_BITS=64 -Wp,-MD,/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/keyboard.o.dep -Wp,-MT,/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/keyboard.o -Wp,-MP -o /var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/out/linux.amd64/release/obj/VBoxKeyboard/keyboard.o /var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c
/var/tmp/portage/app-emulation/virtualbox-7.0.2/work/VirtualBox-7.0.2/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c:42:10: fatal error: X11/Xatom.h: No such file or directory



On this machine X is not installed at all. (6.1.40 builds)
Comment 6 Larry the Git Cow gentoo-dev 2022-11-20 08:20:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e23bb201c007506ef83f4e7c6ecd3af529a0ce5e

commit e23bb201c007506ef83f4e7c6ecd3af529a0ce5e
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2022-11-09 19:19:47 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2022-11-20 08:16:37 +0000

    app-emulation/virtualbox: fix build with USE='-*'
    
    Fix dependencies when built without `headless`
    
    Closes: https://bugs.gentoo.org/678534
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/virtualbox-6.1.40.ebuild | 1 +
 1 file changed, 1 insertion(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1e553ee971b105c5bfe7835d693df82d90044f6

commit d1e553ee971b105c5bfe7835d693df82d90044f6
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2022-11-19 14:38:07 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2022-11-20 08:18:42 +0000

    app-emulation/virtualbox: fix regression with USE="headless sdl"
    
    Bug: https://bugs.gentoo.org/678534
    Closes: https://github.com/gentoo/gentoo/pull/28229
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/virtualbox-7.0.2.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 7 Viorel Munteanu gentoo-dev 2022-11-20 08:25:37 UTC
(In reply to László Szalma from comment #5)
> 7.0.2 doesn't build.
> 
> [ebuild     U  ] app-emulation/virtualbox-7.0.2:0/7.0::gentoo
> [6.1.40:0/6.1::gentoo] USE="dbus%* headless opus pam sdk sdl udev -alsa
> -debug -doc -dtrace -java -lvm -opengl (-pax-kernel) (-pch) -pulseaudio
> -python -qt5 -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python3_10 -python3_8
> -python3_9 -python3_11%" 0 KiB

In 7.0.2, the error was from USE="headless sdl".  I fixed it, but if you upgrade to 7.0.4 you will have to drop `sdl` anyway because `headless` is gone.