Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 674142 - >=app-emulation/virtualbox-6.0.4-r1 - parallel make fails
Summary: >=app-emulation/virtualbox-6.0.4-r1 - parallel make fails
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords:
: 676228 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-31 00:40 UTC by peteru
Modified: 2020-09-07 05:08 UTC (History)
9 users (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 peteru 2018-12-31 00:40:36 UTC
app-emulation/virtualbox-6.0.0 fails to build with MAKEOPTS=-j4 but builds fine with MAKEOPTS=-j1

The errors produced are slightly different on each run, but generally refer to missing files.

Here is an example:

> 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 -march=corei7 -O2 -pipe -funit-at-a-time -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden   -fPIC  -std=c++0x -m64 -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/NetworkServices/Dhcpd -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Devices/Network/lwip-new/src/include -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Devices/Network/lwip-new/src/include/ipv4 -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Devices/Network/lwip-new/src/include/ipv6 -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Devices/Network/lwip-new/vbox/include -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Devices/Network/lwip-new/vbox -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/string -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/nsprpub -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/ipcd -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/obj/VBoxNetDhcpd/dtrace -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/include -I/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/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 -DKBUILD_TYPE=\"release\" -DVBOX_WITH_XPCOM -Wp,-MD,/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o.dep -Wp,-MT,/tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o -Wp,-MP -o /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Main/glue/VBoxLogRelCreate.cpp
> In file included from /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nsID.h:44,
>                  from /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/include/VBox/com/defs.h:286,
>                  from /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/include/VBox/com/com.h:29,
>                  from /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/src/VBox/Main/glue/VBoxLogRelCreate.cpp:22:
> /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nscore.h:51:10: fatal error: prtypes.h: No such file or directory
>  #include "prtypes.h"
>           ^~~~~~~~~~~
> compilation terminated.
> kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:226: /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o] Error 1
Comment 1 Jiří Moravec 2019-01-30 14:33:26 UTC
I just hit the same problem with 6.0.4 version.

In file included from /var/tmp/portage/app-emulation/virtualbox-6.0.4/work/VirtualBox-6.0.4/src/VBox/HostServices/SharedOpenGL/render/renderspu.c:11:
/var/tmp/portage/app-emulation/virtualbox-6.0.4/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/cr_spu.h:16:10: fatal error: spu_dispatch_table.h: No such file or directory
#include "spu_dispatch_table.h"
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:221: /var/tmp/portage/app-emulation/virtualbox-6.0.4/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLrenderspu/render/renderspu.o] Error 1
kmk: *** Waiting for unfinished jobs....

With MAKEOPTS=-j1 no problem at all, but compiling with just 1 thread on 4C/8T system is really BAD...
Comment 2 Paolo Pedroni 2019-01-31 10:11:15 UTC
*** Bug 676228 has been marked as a duplicate of this bug. ***
Comment 3 Paolo Pedroni 2019-01-31 10:16:51 UTC
(In reply to Jiří Moravec from comment #1)
> I just hit the same problem with 6.0.4 version.

May I ask your USE flags for the package?

I suspect that it may be USE flag dependent because I have two systems with different USE flags, one of which reliably builds OK with 'MAKEOPTS=-j7 -l6', the other needs 'MAKEOPTS=-j1'

The working one has:
# equery u virtualbox
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-emulation/virtualbox-6.0.4:
 U I
 + + alsa                     : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful
                                backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of
                                globally
 - - headless                 : Build without any graphic frontend
 - - java                     : Add support for Java
 - - libressl                 : Use dev-libs/libressl instead of dev-libs/openssl when applicable (see also the ssl useflag)
 + + lvm                      : Build VBoxVolInfo that needs devicemapper from sys-fs/lvm2.
 + + opengl                   : Add support for OpenGL (3D graphics)
 + + opus                     : Enable Opus audio codec support
 + + pam                      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 - - pax_kernel               : Apply patch needed for pax enabled kernels.
 + + pulseaudio               : Add support for PulseAudio sound server
 - - python                   : Add optional support/bindings for the Python language
 + + python_targets_python2_7 : Build with Python 2.7
 + + qt5                      : Add support for the Qt 5 application and UI framework
 - - sdk                      : Enable building of SDK
 + + udev                     : Controls installation of special USB udev rules.
 - - vboxwebsrv               : Build and install the VirtualBox webservice
 + + vnc                      : Enable VNC (remote desktop viewer) support

The failing one has:
# equery u virtualbox
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-emulation/virtualbox-6.0.4:
 U I
 + + alsa                     : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful
                                backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of
                                globally
 - - headless                 : Build without any graphic frontend
 + + java                     : Add support for Java
 - - libressl                 : Use dev-libs/libressl instead of dev-libs/openssl when applicable (see also the ssl useflag)
 + + lvm                      : Build VBoxVolInfo that needs devicemapper from sys-fs/lvm2.
 + + opengl                   : Add support for OpenGL (3D graphics)
 + + opus                     : Enable Opus audio codec support
 + + pam                      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 - - pax_kernel               : Apply patch needed for pax enabled kernels.
 + + pulseaudio               : Add support for PulseAudio sound server
 - - python                   : Add optional support/bindings for the Python language
 + + python_targets_python2_7 : Build with Python 2.7
 + + qt5                      : Add support for the Qt 5 application and UI framework
 + + sdk                      : Enable building of SDK
 + + udev                     : Controls installation of special USB udev rules.
 + + vboxwebsrv               : Build and install the VirtualBox webservice
 + + vnc                      : Enable VNC (remote desktop viewer) support
Comment 4 Jiří Moravec 2019-01-31 14:53:49 UTC
$ equery u virtualbox
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
* Found these USE flags for app-emulation/virtualbox-6.0.4:
U I
+ + alsa                     : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
- - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
- - doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
- - headless                 : Build without any graphic frontend
+ + java                     : Add support for Java
- - libressl                 : Use dev-libs/libressl instead of dev-libs/openssl when applicable (see also the ssl useflag)
- - lvm                      : Build VBoxVolInfo that needs devicemapper from sys-fs/lvm2.
+ + opengl                   : Add support for OpenGL (3D graphics)
+ + opus                     : Enable Opus audio codec support
+ + pam                      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
- - pax_kernel               : Apply patch needed for pax enabled kernels.
- - pulseaudio               : Add support for PulseAudio sound server
+ + python                   : Add optional support/bindings for the Python language
+ + python_targets_python2_7 : Build with Python 2.7
+ + qt5                      : Add support for the Qt 5 application and UI framework
+ + sdk                      : Enable building of SDK
+ + udev                     : Controls installation of special USB udev rules.
- - vboxwebsrv               : Build and install the VirtualBox webservice
+ + vnc                      : Enable VNC (remote desktop viewer) support
Comment 5 Paolo Pedroni 2019-01-31 15:08:06 UTC
I guess it's USE=java or USE=sdk (or both). Time for some experimenting, as soon as I have some time for it.
Comment 6 Jiří Moravec 2019-01-31 15:34:09 UTC
$ USE="-java -python -sdk" ebuild virtualbox-6.0.4.ebuild compile

has succeeded...
Comment 7 Jiří Moravec 2019-01-31 15:48:22 UTC
Yep. Disabling java made the trick.

USE="alsa java opengl opus pam python qt5 sdk udev vnc -java -debug -doc -headless -libressl -lvm -pax_kernel -pulseaudio -vboxwebsrv" ebuild virtualbox-6.0.4.ebuild clean compile install 

was complete success...
Comment 8 peteru 2019-02-01 02:59:57 UTC
The java USE flag seems to be a red herring. I see the build failures with -java

USE="alsa opengl opus pam pulseaudio python qt5 sdk udev vnc -debug -doc -headless -java -libressl -lvm -pax_kernel -vboxwebsrv"

PYTHON_TARGETS="python2_7"
Comment 9 Paolo Pedroni 2019-02-01 09:24:13 UTC
(In reply to peteru from comment #8)
> The java USE flag seems to be a red herring. I see the build failures with
> -java
> 
> USE="alsa opengl opus pam pulseaudio python qt5 sdk udev vnc -debug -doc
> -headless -java -libressl -lvm -pax_kernel -vboxwebsrv"
> 
> PYTHON_TARGETS="python2_7"

Try "-sdk" then...
Comment 10 peteru 2019-02-01 14:34:34 UTC
The error message in the bug report is clear enough. The build fails while building the SDK, as evidenced by:

> /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nscore.h:51:10: fatal error: prtypes.h: No such file or directory

It stands to reason that the Makefiles for the SDK portion are broken. However, it could be that the same issues are present in other parts of the VirtualBox build infrastructure and a parallel make may fail elsewhere.
Comment 11 Jiří Moravec 2019-02-01 19:16:37 UTC
(In reply to peteru from comment #10)
> The error message in the bug report is clear enough. The build fails while
> building the SDK, as evidenced by:
> 
> > /tmp/portage/app-emulation/virtualbox-6.0.0/work/VirtualBox-6.0.0/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nscore.h:51:10: fatal error: prtypes.h: No such file or directory
> 
> It stands to reason that the Makefiles for the SDK portion are broken.
> However, it could be that the same issues are present in other parts of the
> VirtualBox build infrastructure and a parallel make may fail elsewhere.

For me USE="alsa opengl opus pam -pulseaudio python qt5 sdk udev vnc -debug -doc -headless -java -libressl -lvm -pax_kernel -vboxwebsrv" ebuild virtualbox-6.0.4.ebuild clean compile

is fine for me with 100% success. Which has small difference from yours.
I haven't pulseaudio on my system. Maybe you should try compile virtualbox with
USE="-pulseaudio sdk". Just for curiosity...
Comment 12 Jiří Moravec 2019-02-02 14:14:35 UTC
I just emerged media-sound/pulseaudio-12.2 with media-plugins/alsa-plugins-1.1.8.

After this "USE="alsa opengl opus pam pulseaudio python qt5 sdk udev vnc -debug -doc -headless -java -libressl -lvm -pax_kernel -vboxwebsrv" ebuild virtualbox-6.0.4.ebuild clean compile" succeeded without hiccup.

And now even full 'FEATURES="-ccache" USE="alsa opengl opus pam pulseaudio python qt5 sdk udev vnc -debug -doc -headless java -libressl -lvm -pax_kernel -vboxwebsrv" ebuild virtualbox-6.0.4.ebuild clean compile' succeeded. That's crazy!!
Comment 13 peteru 2019-02-03 02:13:55 UTC
You are just wasting CPU cycles. This is a typical race condition. It may show up every time, never, 90% of the time or once in a blue moon. Just fiddling with the use flags is not much help either. The virtualbox build system is broken due to a race condition. In the original bug report, the problem is that some targets in the SDK tree do not specify all their dependencies. As a result, during a parallel build, those targets are being built before their dependencies exist.

Just changing USE flags is not a fix or even a workaround. The workaround is MAKEOPTS=-j1, which sucks in terms of performance. The fix is to correctly specify all the dependencies.
Comment 14 Jiří Moravec 2019-02-03 14:08:10 UTC
(In reply to peteru from comment #13)
> You are just wasting CPU cycles. This is a typical race condition. It may
> show up every time, never, 90% of the time or once in a blue moon. Just
> fiddling with the use flags is not much help either. The virtualbox build
> system is broken due to a race condition. In the original bug report, the
> problem is that some targets in the SDK tree do not specify all their
> dependencies. As a result, during a parallel build, those targets are being
> built before their dependencies exist.
> 
> Just changing USE flags is not a fix or even a workaround. The workaround is
> MAKEOPTS=-j1, which sucks in terms of performance. The fix is to correctly
> specify all the dependencies.

I know, it's just interesting...
And its energy consumption is actually negligible comparing with CPU load from other tasks. :-)
Comment 15 peteru 2019-02-09 05:38:19 UTC
Just to supply another mode of failure...

Changing USE flags to -sdk -python -java still results in a fail, this time in the OpenGL subtree:

gcc -c -O2 -g -pipe -march=corei7 -O2 -pipe -funit-at-a-time -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fPIC -Wno-sign-compare -Werror-implicit-function-declaration -m64 -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/include/VBox/Graphics -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Additions/x11/x11include/glproto-1.4.10 -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Additions/x11/x11include/mesa-7.2 -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLgen -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/dtrace -I/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/include -I/tmp/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=\"\" -DCHROMIUM_THREADSAFE -DVBOX_WITH_HGCM -DUNPACKS -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R3 -DPIC -DVBOX_WITH_CRHGSMI -DLinux=1 -D_GNU_SOURCE -Wp,-MD,/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/pixel.o.dep -Wp,-MT,/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/pixel.o -Wp,-MP -o /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/pixel.o /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/util/pixel.c
In file included from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/state/cr_client.h:12,
                 from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/cr_pixeldata.h:11,
                 from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/util/pixel.c:7:
/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/state/cr_bufferobject.h:12:10: fatal error: state/cr_statefuncs.h: No such file or directory
 #include "state/cr_statefuncs.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:221: /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/pixel.o] Error 1
kmk: *** Waiting for unfinished jobs....
In file included from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/state/cr_client.h:12,
                 from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/cr_pixeldata.h:11,
                 from /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/util/net.c:27:
/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/include/state/cr_bufferobject.h:12:10: fatal error: state/cr_statefuncs.h: No such file or directory
 #include "state/cr_statefuncs.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:221: /tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/net.o] Error 1
kmk_builtin_append -n "/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxOGLhostcrutil/util/matrix.o.dep" "" "/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/GuestHost/OpenGL/util/matrix.c:" ""
kmk_builtin_append -n "/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/out/linux.amd64/release/obj/VBoxSVGA3D/Graphics/shaderlib/directx.o.dep" "" "/tmp/portage/app-emulation/virtualbox-6.0.4-r1/work/VirtualBox-6.0.4/src/VBox/Devices/Graphics/shaderlib/directx.c:" ""
kmk: *** Exiting with status 2


Bottom line is, virtualbox is broken with parallel make. Quick fix would be to force MAKEOPTS=-j1 in the ebuild.
Comment 16 Georgy Yakovlev gentoo-dev 2019-06-08 07:42:00 UTC
probably a dupe of 505482
Comment 17 Thomas Capricelli 2019-06-15 11:37:11 UTC
I can confirm the problem with app-emulation/virtualbox-6.0.8 and USE="alsa java opengl opus pam pulseaudio python qt5 sdk udev vnc"


/home/notmpfs/portage/app-emulation/virtualbox-6.0.8/work/VirtualBox-6.0.8/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nscore.h:51:10: fatal error: prtypes.h: No such file or directory
 #include "prtypes.h"
          ^~~~~~~~~~~
Comment 18 Mark Nowiasz 2019-07-17 15:45:04 UTC
Happans also with virtualbox-6.0.10
Comment 19 Jan Breig 2019-09-09 14:05:48 UTC
Same with virtualbox-6.0.12

USE="alsa opengl opus pam pulseaudio qt5 sdk udev"
MAKEOPTS="-j8 -l8"

In file included from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/include/VBox/com/com.h:32,
                 from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/src/VBox/Main/glue/VBoxLogRelCreate.cpp:22:
/var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/include/VBox/com/defs.h:289:10: fatal error: nsID.h: No such file or directory
  289 | #include <nsID.h>
      |          ^~~~~~~~
compilation terminated.
kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:226: /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o] Error 1
Comment 20 Alexey Korepanov 2019-09-24 08:09:54 UTC
same with 6.0.12, USE="opengl opus pam pulseaudio python qt5 sdk udev -alsa -debug -doc -dtrace -headless -java -libressl -lvm -pax_kernel -vboxwebsrv -vnc"

> In file included from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nsID.h:44,
>                  from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/include/VBox/com/defs.h:289,
>                  from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/include/VBox/com/com.h:32,
>                  from /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/src/VBox/Main/glue/VBoxLogRelCreate.cpp:22:
> /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom/nscore.h:51:10: fatal error: prtypes.h: No such file or directory
>  #include "prtypes.h"
>           ^~~~~~~~~~~
> compilation terminated.
> kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:226: /var/tmp/portage/app-emulation/virtualbox-6.0.12/work/VirtualBox-6.0.12/out/linux.amd64/release/obj/VBoxNetDhcpd/dt/dt/Main/glue/VBoxLogRelCreate.o] Error 1
Comment 21 François Valenduc 2019-10-16 15:52:45 UTC
And it still occurs with 6.0.14.
Comment 22 François Valenduc 2019-12-12 21:24:33 UTC
The problem doesn't occur with version 6.1.0, or it was just by chance.
Comment 23 Andrew Udvare 2020-03-14 08:46:11 UTC
No longer occurs on 6.1.4-r1.
Comment 24 peteru 2020-03-14 16:16:11 UTC
It's a race condition, so it may not show for some people some of the time. I've encountered a problem on first build of 6.1.4-r1, however a second build completed without failure.
Comment 25 Roger 2020-09-07 05:07:50 UTC
Yup, race condition.

/etc/make.conf
MAKEOPTS="-j1"

... and sit back and wait an hour or so for compiling to complete.