Skip to content

Error building VirtualBox 5.1.4 with CCACHE_CPP2 enabled #129

Closed
@scop

Description

@scop

Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1373295

Reproducer:

First install VirtualBox's build dependencies. I guess this could be trimmed down to some extent, but for example for current Fedora x86_64 development this would be taken care of by:
dnf install iasl kBuild SDL-devel xalan-c-devel openssl-devel libcurl-devel libxslt-devel xerces-c-devel libIDL-devel yasm pulseaudio-libs-devel python2-devel desktop-file-utils libcap-devel qt5-qtbase-devel qt5-qtx11extras-devel qt5-linguist pam-devel mkisofs java-devel boost-devel libxml2-devel libpng-devel zlib-devel device-mapper-devel libvpx-devel makeself libdrm-devel libpciaccess-devel mesa-libGL-devel mesa-libOSMesa-devel mesa-libEGL-devel pixman-devel xorg-x11-proto-devel xorg-x11-server-devel libXcursor-devel libXcomposite-devel libXmu-devel libXinerama-devel "libstdc++-static(x86-64)" "libstdc++-static(x86-32)" "glibc(x86-32)" "glibc-devel(x86-32)" "libgcc(x86-32)"

Then proceed with getting and building:

$ curl -O http://download.virtualbox.org/virtualbox/5.1.4/VirtualBox-5.1.4.tar.bz2
$ tar xf VirtualBox-5.1.4.tar.bz2
$ cd VirtualBox-5.1.4
$ sed -i -e 's/\(\$cc_maj -eq 6 -a \$cc_min -gt\) 1/\1 2/' configure  # if gcc is >= 6.2
$ ./configure --disable-kmods --disable-docs --with-gcc="ccache gcc" --with-g++="ccache g++"
$ source ./env.sh
$ kmk KBUILD_VERBOSE=2

Results in bunch of errors like:

cc1: error: to generate dependencies you must specify either -M or -MM
cc1plus: error: to generate dependencies you must specify either -M or -MM

This is at least with current Fedora development, gcc 6.2.1, ccache 3.3 (and 3.2.7 with CCACHE_CPP2 turned on). Turning off CCACHE_CPP2 avoids the errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDoes not work as intended/documented

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions