Summary: | emulators/virtualbox-ose: Use ccache from bsd.ccache.mk | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Derek Schrock <dereks> | ||||
Component: | Individual Port(s) | Assignee: | Virtualbox Team (Nobody) <vbox> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | grahamperrin, madpilot | ||||
Priority: | --- | Keywords: | needs-qa | ||||
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(vbox) |
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: | https://reviews.freebsd.org/D29453 | ||||||
Bug Depends on: | 254609 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
How do other ports handle these compiler variables? I'm not sure moving from LOCALBASE/bin calls to PATH/env based invocations is the correct method. Shouldn't this be handled by Mk/bsd.ccache.mk? Since there isn't any framework support for kmk builds other ports are not setting do-build targets. Look at bsd.ports.mk do-build target this is just emulating it. ping? Hi, I'm taking a look at this patch. It does what is expected for the virtualbox-ose port. I tried to apply it to the legacy port too, but there it causes a build failure, only on head: ``` /wrkdirs/usr/ports/emulators/virtualbox-ose-legacy/work/VirtualBox-5.2.44/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h:11475:15: warning: mangled name of 'iemOpHlp_Grp5_far_Ep' will change in C++17 due to non-throwing exception specification in function signature [-Wc++17-compat-mangling] FNIEMOP_DEF_2(iemOpHlp_Grp5_far_Ep, uint8_t, bRm, FNIEMCIMPLFARBRANCH *, pfnCImpl) ^ error: ran out of registers during register allocation ``` (can provide full log if needed) I could not understand the cause, do you have any idea? I'd like to apply this improvement to both the new and legacy ports. What was the change for legacy? Since it doesn’t have CC= and CXX= setting you should only need the $SETENV and $MAKE_ENV addition to do-build. (In reply to Derek Schrock from comment #5) Yes sorry, I forgot to specify. Yes I only modified the do-build stanza. Ok works here on 13. Any chance you’re on 14? (In reply to Derek Schrock from comment #7) Yes, I specified I'm on head aka, 14. In poudriere I'm testing on 14 (head), 13.0 and 12.3. 13.0 and 12.3 work, but it fails in 14. I'd like to understand why the difference. Yeah, you're right sorry I missed that in the init. comment. The details of that error are over my head. However, I don't believe this has to be with ccache. The build fails in the same way on FreeBSD 13.0 with clang13 (head's base compiler) with/without ccache. It seems there was a pkg fallout a couple months ago for something that looked like the same error but different code: https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg1853307.html It doesn't appear anything was done port side to fix that. Maybe require llvm11? Change CC and CXX to clang11/clang++11? (In reply to Derek Schrock from comment #9) Forcing llvm 11 for newer head seems to fix the issue, regarding legacy virtualbox-ose. I'm still doing some testing and everything seems now to work. I plan to commit these changes soon, since having virtualbox take advantage of ccache is very useful in speeding up builds a little. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a60dcd712517e7948e6867f2cbe89938b6c55681 commit a60dcd712517e7948e6867f2cbe89938b6c55681 Author: Derek Schrock <dereks@lifeofadishwasher.com> AuthorDate: 2022-02-09 14:22:27 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-02-09 14:24:30 +0000 emulators/virtualbox-ose(-legacy): Take advantage of ccache This patch teaches the virtualbox ports to take advantage of ccache if the ports are configured to use it. PR: 254616 emulators/virtualbox-ose-legacy/Makefile | 2 +- emulators/virtualbox-ose/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=39f7031c79eb0da62240461fe830b9df08545f55 commit 39f7031c79eb0da62240461fe830b9df08545f55 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-02-09 14:20:54 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-02-09 14:20:54 +0000 emulators/virtualbox-ose-legacy: Fix build on head The legacy version of virtualbox fails to build on head with clang > 11, so force using clang 11 there. PR: 254616 (suggested in) emulators/virtualbox-ose-legacy/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) Committed the changes. Thanks! BTW can you close the related review? A commit in branch 2022Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=66392cf640932b50db9ea4d5ebcabb28999e65e4 commit 66392cf640932b50db9ea4d5ebcabb28999e65e4 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-02-09 14:20:54 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-02-09 14:33:41 +0000 emulators/virtualbox-ose-legacy: Fix build on head The legacy version of virtualbox fails to build on head with clang > 11, so force using clang 11 there. PR: 254616 (suggested in) (cherry picked from commit 39f7031c79eb0da62240461fe830b9df08545f55) emulators/virtualbox-ose-legacy/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) A commit in branch 2022Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=12c2ffe72d30ec48aeaf9500dbcc3b82e9979110 commit 12c2ffe72d30ec48aeaf9500dbcc3b82e9979110 Author: Derek Schrock <dereks@lifeofadishwasher.com> AuthorDate: 2022-02-09 14:22:27 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-02-09 14:33:58 +0000 emulators/virtualbox-ose(-legacy): Take advantage of ccache This patch teaches the virtualbox ports to take advantage of ccache if the ports are configured to use it. PR: 254616 (cherry picked from commit a60dcd712517e7948e6867f2cbe89938b6c55681) emulators/virtualbox-ose-legacy/Makefile | 2 +- emulators/virtualbox-ose/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) |
Created attachment 223651 [details] Use bsd.ccache.mk values when building When using FreeBSD 12 llvm11 is used setting CC/CXX to a full path to localbase's binaries. Use just the name and use ENV and MAKE_ENV when building such that PATH (using ccache's libexec symlink dir) and CCACHE_DIR set.