[webkit-dev] Generating compile_commands.json when building WebKit on MacOS

shrivatsa at firemail.cc shrivatsa at firemail.cc
Wed Jul 22 01:15:51 PDT 2020


I was able to get the compilation process starting with some changed 
(patch attached), but now I am facing some errors that I don't know how 
to tackle, e.g.:

[1218/5220] Building CXX object 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o
FAILED: 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o
/usr/local/bin/ccache /usr/local/opt/ccache/libexec/c++  
-DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 
-DJavaScriptCore_EXPORTS -DSTATICALLY_LINKED_WITH_WTF 
-D__STDC_WANT_LIB_EXT1__ -IDerivedSources/ForwardingHeaders -I. 
-I../../Source/JavaScriptCore
  -I../../Source/JavaScriptCore/API 
-I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/b3 
-I../../Source/JavaScriptCore/b3/air 
-I../../Source/JavaScriptCore/bindings 
-I../../Source/JavaScriptCore/builtins 
-I../../Source/JavaScriptCore/bytecode -I../../So
urce/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg 
-I../../Source/JavaScriptCore/disassembler 
-I../../Source/JavaScriptCore/disassembler/ARM64 
-I../../Source/JavaScriptCore/disassembler/udis86 
-I../../Source/JavaScriptCore/domjit -I../../Source/JavaScriptC
ore/ftl -I../../Source/JavaScriptCore/heap 
-I../../Source/JavaScriptCore/debugger 
-I../../Source/JavaScriptCore/inspector 
-I../../Source/JavaScriptCore/inspector/agents 
-I../../Source/JavaScriptCore/inspector/augmentable 
-I../../Source/JavaScriptCore/inspector/remote -I..
/../Source/JavaScriptCore/interpreter -I../../Source/JavaScriptCore/jit 
-I../../Source/JavaScriptCore/llint -I../../Source/JavaScriptCore/parser 
-I../../Source/JavaScriptCore/profiler 
-I../../Source/JavaScriptCore/runtime 
-I../../Source/JavaScriptCore/tools -I../../Source
/JavaScriptCore/wasm -I../../Source/JavaScriptCore/wasm/js 
-I../../Source/JavaScriptCore/yarr -IDerivedSources/JavaScriptCore 
-IDerivedSources/JavaScriptCore/inspector 
-IDerivedSources/JavaScriptCore/runtime 
-IDerivedSources/JavaScriptCore/yarr -IDerivedSources -I../../So
urce/JavaScriptCore/inspector/cocoa 
-I../../Source/JavaScriptCore/inspector/remote/cocoa -isystem 
ICU/Headers -fdiagnostics-color=always -fcolor-diagnostics -Wextra -Wall 
-Wno-noexcept-type -Wno-parentheses-equality -Qunused-arguments 
-Wwrite-strings -Wundef -Wpointer-ari
th -Wmissing-format-attribute -Wformat-security -Wcast-align  
-fno-strict-aliasing -fno-exceptions -fno-rtti -g -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk 
-fPIC   -ffp-contract=off -fno-slp-vectorize -std=c++17
  -MD -MT 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o 
-MF 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d
10ff-2-mm.mm.o.d -o 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o 
-c 
DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm
In file included from 
DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm:1:
In file included from 
../../Source/JavaScriptCore/API/JSWrapperMap.mm:35:
In file included from 
../../Source/JavaScriptCore/API/JSContextInternal.h:30:
In file included from 
DerivedSources/ForwardingHeaders/JavaScriptCore/JSContextPrivate.h:31:
DerivedSources/ForwardingHeaders/JavaScriptCore/JSContext.h:40:1: error: 
duplicate interface definition for class 'JSContext'
@interface JSContext : NSObject
^
../../Source/JavaScriptCore/API/JSContext.h:40:12: note: previous 
definition is here
@interface JSContext : NSObject
            ^

Your assistance would be much appreciated.


More information about the webkit-dev mailing list