* After https://trac.webkit.org/changeset/262182/webkit (bug 209890), `make debug` or `make release` fails on the repository root if ccache is installed on the machine. * If the machine did not install ccache, it works well. * This problem is not reproduce with `Tools/Scripts/build-webkit --debug` ## Environment * macOS 10.15.5 * XCode 11.5 * Build for macOS on macOS
the log with `make debug` ``` ../Tools/Scripts/set-webkit-configuration --debug perl ../Tools/Scripts/copy-webkitlibraries-to-product-directory ../../Tools/Scripts/set-webkit-configuration --debug ( if [[ -t 1 ]]; then COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; fi; xcodebuild `perl -I../../Tools/Scripts -Mwebkitdirs -e 'print XcodeOptionString()' -- ` ${COLOR_DIAGNOSTICS_ARG} WK_USE_CCACHE=YES -UseNewBuildSystem=YES USE_NEW_BUILD_SYSTEM=YES GCC_PREPROCESSOR_DEFINITIONS=' $(inherited)' | ../../Tools/Scripts/filter-build-webkit && exit ${PIPESTATUS[0]} ) Command line invocation: User defaults from command line: ^Cmake[2]: *** [debug] Interrupt: 2 make[1]: *** [debug] Interrupt: 2 make: *** [debug] Interrupt: 2 tetsuharu@macbookpro-15-2017:/Volumes/Source/webkit % rm -rf WebKitBuild (git:master) tetsuharu@macbookpro-15-2017:/Volumes/Source/webkit % rm -rf WebKitBuild (git:master) tetsuharu@macbookpro-15-2017:/Volumes/Source/webkit % make debug (git:master) ../Tools/Scripts/set-webkit-configuration --debug perl ../Tools/Scripts/copy-webkitlibraries-to-product-directory ../../Tools/Scripts/set-webkit-configuration --debug ( if [[ -t 1 ]]; then COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; fi; xcodebuild `perl -I../../Tools/Scripts -Mwebkitdirs -e 'print XcodeOptionString()' -- ` ${COLOR_DIAGNOSTICS_ARG} WK_USE_CCACHE=YES -UseNewBuildSystem=YES USE_NEW_BUILD_SYSTEM=YES GCC_PREPROCESSOR_DEFINITIONS=' $(inherited)' | ../../Tools/Scripts/filter-build-webkit && exit ${PIPESTATUS[0]} ) Command line invocation: User defaults from command line: note: Using new build system note: Planning build note: Constructing build description CreateBuildDirectory /Volumes/Source/webkit/WebKitBuild (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc.hmap (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc-own-target-headers.hmap (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/all-product-headers.yaml (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc-generated-files.hmap (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc-all-non-framework-target-headers.hmap (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc-project-headers.hmap (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/bmalloc-all-target-headers.hmap (in target 'bmalloc' from project 'bmalloc') CompileC Scavenger.o /Volumes/Source/webkit/Source/bmalloc/../../Tools/ccache/ccache-wrapper: line 26: ccache: command not found warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') Command CompileC failed with a nonzero exit code CompileC bmalloc.o warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') WriteAuxiliaryFile /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/Objects-normal/x86_64/bmalloc.LinkFileList (in target 'bmalloc' from project 'bmalloc') CompileC Zone.o /Volumes/Source/webkit/Source/bmalloc/../../Tools/ccache/ccache-wrapper: line 26: ccache: command not found warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') CompileC ProcessCheck.o /Volumes/Source/webkit/Source/bmalloc/../../Tools/ccache/ccache-wrapper: line 26: ccache: command not found warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') CompileC PerProcess.o /Volumes/Source/webkit/Source/bmalloc/../../Tools/ccache/ccache-wrapper: line 26: ccache: command not found warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') Command CompileC failed with a nonzero exit code CompileC ObjectType.o /Volumes/Source/webkit/Source/bmalloc/../../Tools/ccache/ccache-wrapper: line 26: ccache: command not found warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') CompileC ObjectTypeTable.o warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') CompileC Mutex.o warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'bmalloc' from project 'bmalloc') ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/Objects-normal/x86_64/Scavenger.o /Volumes/Source/webkit/Source/bmalloc/bmalloc/Scavenger.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler CompileC /Volumes/Source/webkit/WebKitBuild/bmalloc.build/Debug/bmalloc.build/Objects-normal/x86_64/PerProcess.o /Volumes/Source/webkit/Source/bmalloc/bmalloc/PerProcess.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (2 failures) make[2]: *** [debug] Error 65 make[1]: *** [debug] Error 2 make: *** [debug] Error 2 ```
Created attachment 400470 [details] Patch adhoc patch
Originally, bug 197020 introduced that enabling ccache automatically with Makefile.
I'm not sure about XCBuild's cleverness on incremental build. To be honest, I'm not confident whether enabling ccache with XCBuild is nice or not. Thus my patch is just workaround on the environment installed ccache.
I'm reverting the use of XCBuild for now. I'll keep this issue in mind when we try to re-enable it. In that context, I don't think we need this patch right now.
(In reply to Keith Rollin from comment #5) > I'm reverting the use of XCBuild for now. I'll keep this issue in mind when > we try to re-enable it. In that context, I don't think we need this patch > right now. Ah, I see. Thank you for your review.
The problem here is that XCBuild removes /usr/local/bin from the PATH. I'm checking to see if that's intentional.
Rather than taking the approach of Ohzeki-san's original patch (which disables ccache under XCBuild), I'll try to look for it in a few well-known places when under XCBuild (or any time `which ccache` can't find anything). If not found, we'll fall back to compiling regularly.
<rdar://problem/70278783>
Created attachment 411298 [details] Patch
Comment on attachment 411298 [details] Patch r=me
Committed r268475: <https://trac.webkit.org/changeset/268475> All reviewed patches have been landed. Closing bug and clearing flags on attachment 411298 [details].