Bug 86430 - Building WebKit in Xcode is not working.
Summary: Building WebKit in Xcode is not working.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 20:00 PDT by Alexis Menard (darktears)
Modified: 2012-05-16 17:43 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2012-05-14 20:00:32 PDT
Steps I did :

- Open the workspace file located in the root directory of WebKit
- Select All Source scheme
- Invoke build

It will compile successfully WTF, then LLInts Offsets but will fail JSCLLIntOffsetsExtractor with compile error on header inclusion for wtf/platform.h

If you click on the WTF project, it has several build phases : copy WTF headers, Detect Available headers, compiles sources, link binary and copy headers. According to my log panel all the phases are executed but not the last one (or maybe it just doesn't show on the log output panel).

I'm running Mac OS 10.7 and Xcode 4.3 if that make any difference.
Comment 1 Alexis Menard (darktears) 2012-05-14 20:03:39 PDT
(In reply to comment #0)
> Steps I did :
> 
> - Open the workspace file located in the root directory of WebKit
> - Select All Source scheme
> - Invoke build
> 
> It will compile successfully WTF, then LLInts Offsets but will fail JSCLLIntOffsetsExtractor with compile error on header inclusion for wtf/platform.h
> 
> If you click on the WTF project, it has several build phases : copy WTF headers, Detect Available headers, compiles sources, link binary and copy headers. According to my log panel all the phases are executed but not the last one (or maybe it just doesn't show on the log output panel).
> 
> I'm running Mac OS 10.7 and Xcode 4.3 if that make any difference.

If more infos needed I can provide :)
Comment 2 mitz 2012-05-14 20:32:13 PDT
Can you please paste the compiler invocation and the compiler error?
Comment 3 Alexis Menard (darktears) 2012-05-15 04:22:14 PDT
(In reply to comment #2)
> Can you please paste the compiler invocation and the compiler error?

CompileC build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o llint/LLIntOffsetsExtractor.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/darktears/Development/webkit/Source/JavaScriptCore
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -stdlib=libc++ -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -O0 -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wno-return-type -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DHAVE_DTRACE=1 -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -DHAVE_HEADER_DETECTION_H -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.7 -g -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-conversion -Wno-sign-conversion -I/Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/JSCLLIntOffsetsExtractor.hmap -I/Users/darktears/Development/webkit/Source/JavaScriptCore/build/Debug/include -I. -Iicu -I/Users/darktears/Development/webkit/Source/JavaScriptCore/build/Debug/usr/local/include -I/Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/DerivedSources/x86_64 -I/Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wglobal-constructors -Wexit-time-destructors -F/Users/darktears/Development/webkit/Source/JavaScriptCore/build/Debug -MMD -MT dependencies -MF /Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.d --serialize-diagnostics /Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.dia -c /Users/darktears/Development/webkit/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp -o /Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o

In file included from /Users/darktears/Development/webkit/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:26:
/Users/darktears/Development/webkit/Source/JavaScriptCore/config.h:30:10: fatal error: 'wtf/Platform.h' file not found
#include <wtf/Platform.h>
         ^
1 error generated.
Comment 4 mitz 2012-05-15 08:37:42 PDT
(In reply to comment #3)
>     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang […] -o /Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o

Looks like the intermediates directory (OBJROOT) is not set correctly. In File > Workspace Settings, if you click the Advanced button in the Build tab, what paths do you see next to Products and Intermediates at the bottom?
Comment 5 Alexis Menard (darktears) 2012-05-15 09:41:08 PDT
(In reply to comment #4)
> (In reply to comment #3)
> >     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang […] -o /Users/darktears/Development/webkit/Source/JavaScriptCore/build/JavaScriptCore.build/Debug/JSCLLIntOffsetsExtractor.build/Objects-normal/x86_64/LLIntOffsetsExtractor.o
> 
> Looks like the intermediates directory (OBJROOT) is not set correctly. In File > Workspace Settings, if you click the Advanced button in the Build tab, what paths do you see next to Products and Intermediates at the bottom?

"Xcode default" is checked and the two fields you are talking about are for the "custom" checkbox. If I check custom it becomes : For intermediate : Build/Intermediates and Build/Products for Products.

I checked custom and it seems to continue compiling :) let see if it will succeed for all.

Maybe the workspace should by default come with that custom checkbox checked (if that's even possible).
Comment 6 mitz 2012-05-15 10:00:36 PDT
(In reply to comment #5)
> "Xcode default" is checked and the two fields you are talking about are for the "custom" checkbox.

I meant the labels at the bottom, not the text fields. The former tell you where Products and Intermediates go given the current selections in the sheet.

> If I check custom it becomes : For intermediate : Build/Intermediates and Build/Products for Products.
> 
> I checked custom and it seems to continue compiling :) let see if it will succeed for all.

The recommended configuration is the one described in <http://www.webkit.org/building/debug.html>: “Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit by choosing File > Workspace Settings and clicking the Advanced button, selecting Custom, Relative to Workspace, and entering WebKitBuild both for Products and for Intermediates”.

> Maybe the workspace should by default come with that custom checkbox checked (if that's even possible).

I am afraid that’s not possible at this time.
Comment 7 Alexis Menard (darktears) 2012-05-15 11:54:25 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > "Xcode default" is checked and the two fields you are talking about are for the "custom" checkbox.
> 
> I meant the labels at the bottom, not the text fields. The former tell you where Products and Intermediates go given the current selections in the sheet.
> 
> > If I check custom it becomes : For intermediate : Build/Intermediates and Build/Products for Products.
> > 
> > I checked custom and it seems to continue compiling :) let see if it will succeed for all.
> 
> The recommended configuration is the one described in <http://www.webkit.org/building/debug.html>: “Ensure that the Products and Intermediates locations for the workspace match those used by build-webkit by choosing File > Workspace Settings and clicking the Advanced button, selecting Custom, Relative to Workspace, and entering WebKitBuild both for Products and for Intermediates”.
> 
> > Maybe the workspace should by default come with that custom checkbox checked (if that's even possible).
> 
> I am afraid that’s not possible at this time.

I hit another build error :

CompileC /Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/NetscapePluginHostManager.o mac/Plugins/Hosted/NetscapePluginHostManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/darktears/Development/webkit/Source/WebKit
    setenv LANG en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch x86_64 -fmessage-length=0 -stdlib=libc++ -fobjc-gc -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -O0 -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-arc-abi -Wno-c++11-extensions -DDISABLE_THREAD_CHECK -DENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH -DENABLE_3D_RENDERING -DENABLE_BLOB -DENABLE_CHANNEL_MESSAGING -DENABLE_CSS_FILTERS -DENABLE_CSS_GRID_LAYOUT -DENABLE_DASHBOARD_SUPPORT -DENABLE_DETAILS -DENABLE_FILTERS -DENABLE_FULLSCREEN_API -DENABLE_GEOLOCATION -DENABLE_HIGH_DPI_CANVAS -DENABLE_ICONDATABASE -DENABLE_IFRAME_SEAMLESS -DENABLE_JAVASCRIPT_DEBUGGER -DENABLE_MATHML -DENABLE_METER_TAG -DENABLE_MUTATION_OBSERVERS -DENABLE_PROGRESS_TAG -DENABLE_REQUEST_ANIMATION_FRAME -DENABLE_SHARED_WORKERS -DENABLE_SQL_DATABASE -DENABLE_SVG -DENABLE_SVG_DOM_OBJC_BINDINGS -DENABLE_SVG_FONTS -DENABLE_TEXT_NOTIFICATIONS_ONLY -DENABLE_VIDEO -DENABLE_VIDEO_TRACK -DENABLE_WEBGL -DENABLE_WEB_AUDIO -DENABLE_WEB_SOCKETS -DENABLE_WORKERS -DENABLE_XSLT -DFRAMEWORK_NAME=WebKit -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -fasm-blocks -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.7 -g -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-conversion -Wno-sign-conversion "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/WebKit.hmap -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug/include -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug/usr/local/include -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug/WebCore.framework/PrivateHeaders/ForwardingHeaders -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug/WebCore.framework/PrivateHeaders/icu -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug/DerivedSources/WebKit -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/DerivedSources/x86_64 -I/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/DerivedSources -Wall -Wextra -Wchar-subscripts -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wglobal-constructors -Wexit-time-destructors -F/Users/darktears/Library/Developer/Xcode/DerivedData/Build/Products/Debug -F/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -F/System/Library/Frameworks/Carbon.framework/Frameworks -F/System/Library/Frameworks/Quartz.framework/Frameworks -F/System/Library/Frameworks/CoreServices.framework/Frameworks -F/System/Library/PrivateFrameworks -include /Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/PrecompiledHeaders/WebKitPrefix-hkwfrchttpbfvheaucwdaaceztol/WebKitPrefix.h -MMD -MT dependencies -MF /Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/NetscapePluginHostManager.d --serialize-diagnostics /Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/NetscapePluginHostManager.dia -c /Users/darktears/Development/webkit/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm -o /Users/darktears/Library/Developer/Xcode/DerivedData/Build/Intermediates/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/NetscapePluginHostManager.o

/Users/darktears/Development/webkit/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:33:9: fatal error: 'WebKitSystemInterface.h' file not found
#import "WebKitSystemInterface.h"
        ^
1 error generated.
Comment 8 mitz 2012-05-15 21:31:42 PDT
(In reply to comment #7)
> I hit another build error :
> 
> /Users/darktears/Development/webkit/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:33:9: fatal error: 'WebKitSystemInterface.h' file not found
> #import "WebKitSystemInterface.h"
>         ^
> 1 error generated.

I think I just fixed the reason for this error in <http://trac.webkit.org/r117215>. Please try again. Thanks for testing this!
Comment 9 Alexis Menard (darktears) 2012-05-16 17:43:27 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > I hit another build error :
> > 
> > /Users/darktears/Development/webkit/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:33:9: fatal error: 'WebKitSystemInterface.h' file not found
> > #import "WebKitSystemInterface.h"
> >         ^
> > 1 error generated.
> 
> I think I just fixed the reason for this error in <http://trac.webkit.org/r117215>. Please try again. Thanks for testing this!

It works :). I completed a build with no issues. Thanks for fixing it. Just need to play around with the debug part now :).