This problem is not new and without ccache VB build is fine. Error (full log in the attachment): … kBuild: Linking VBoxPython kBuild: Installing VBoxPython => /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/bin/VBoxPython.so kBuild: Compiling VBoxRemPrimary - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/VBoxRecompiler.c cc1: error: to generate dependencies you must specify either -M or -MM kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary/VBoxRecompiler.o] Error 1 The failing command: @gcc48 -c -O2 -g -pipe -O2 -mtune=generic -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/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/Sun/crt -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/Sun -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/target-i386 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/tcg -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/fpu -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/VBox/VMM/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/tcg/i386 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler -I/usr/local/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary/dtrace -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_REM -DVBOX_WITH_RAW_MODE -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_DEBUGGER -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DPIC -DIN_REM_R3 -DREM_INCLUDE_CPU_H -DNEED_CPU_H -DVBOX_WITH_NEW_APIC -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_RING1 -DLOG_USE_C99 -D_BSD -D__x86_64__ -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary/VBoxRecompiler.o.dep -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary/VBoxRecompiler.o -Wp,-MP -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/out/freebsd.amd64/release/obj/VBoxRemPrimary/VBoxRecompiler.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.6/src/recompiler/VBoxRecompiler.c *** Error code 2 Stop. make[1]: stopped in /usr/ports/emulators/virtualbox-ose *** Error code 1 Stop. make: stopped in /usr/ports/emulators/virtualbox-ose root@vladiom:~ # pkg version -v | grep -e virtualbox -e ccache ccache-3.2.5_2 = up-to-date with index virtualbox-ose-5.1.6 = up-to-date with index virtualbox-ose-kmod-5.1.6 = up-to-date with index <uname> FreeBSD 10.3-RELEASE-p7 amd64 <make.conf> CPUTYPE?=core2 OPTIONS_SET=CUPS WITHOUT_LPR=YES DEFAULT_VERSIONS+=apache=2.4 QT4_OPTIONS=CUPS NAS QGTKSTYLE LOCALIZED_LANG=ru DEFAULT_VERSIONS+=perl5=5.20 MAKE_JOBS_UNSAFE=yes DEFAULT_VERSIONS+=mysql=5.7 .if ${.CURDIR:M*/ports/devel/ccache} NO_CCACHE=yes .endif DEFAULT_VERSIONS+=ssl=openssl CC=clang37 CXX=clang++37 CPP=clang-cpp37
Created attachment 174949 [details] Full log
It looks like ccache has a fix. https://github.com/ccache/ccache/issues/129 Bryan, assign as devel/ccache issue?
Pass to maintainer.
I tried again build VirtualBox-5.1.12 with ccache – error still present ...
A commit references this bug: Author: bdrewery Date: Fri Feb 3 21:53:08 UTC 2017 New revision: 433264 URL: https://svnweb.freebsd.org/changeset/ports/433264 Log: - Fix building with -Wp,-MT,path. Namely this fixes building the emulators/virtualbox-ose port. PR: 212818 Obtained from: https://github.com/ccache/ccache/commit/026ba6b9fdbeb3ab57d9eb424025a0a0850baae6 MFH: 2017Q1 Changes: head/devel/ccache/Makefile head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT
A commit references this bug: Author: bdrewery Date: Fri Feb 3 21:54:18 UTC 2017 New revision: 433265 URL: https://svnweb.freebsd.org/changeset/ports/433265 Log: MFH: r433264 - Fix building with -Wp,-MT,path. Namely this fixes building the emulators/virtualbox-ose port. PR: 212818 Obtained from: https://github.com/ccache/ccache/commit/026ba6b9fdbeb3ab57d9eb424025a0a0850baae6 Approved by: portmgr (implicit) Changes: _U branches/2017Q1/ branches/2017Q1/devel/ccache/Makefile branches/2017Q1/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT
Fix committed, sorry this took so long!