Bug 212818 - emulators/virtualbox-ose: Doesn't build with ccache
Summary: emulators/virtualbox-ose: Doesn't build with ccache
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL: https://github.com/ccache/ccache/issu...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2016-09-19 10:45 UTC by Vladimir Omelchuk
Modified: 2017-02-03 21:54 UTC (History)
4 users (show)

See Also:


Attachments
Full log (35.16 KB, application/x-xz)
2016-09-19 10:46 UTC, Vladimir Omelchuk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Omelchuk 2016-09-19 10:45:09 UTC
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
Comment 1 Vladimir Omelchuk 2016-09-19 10:46:00 UTC
Created attachment 174949 [details]
Full log
Comment 2 VK 2016-09-25 14:56:07 UTC
It looks like ccache has a fix.

https://github.com/ccache/ccache/issues/129

Bryan, assign as devel/ccache issue?
Comment 3 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2016-09-28 11:21:19 UTC
Pass to maintainer.
Comment 4 Vladimir Omelchuk 2016-12-21 17:03:32 UTC
I tried again build VirtualBox-5.1.12 with ccache – error still present ...
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-02-03 21:53:27 UTC
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
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-02-03 21:54:30 UTC
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
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2017-02-03 21:54:44 UTC
Fix committed, sorry this took so long!