Bug 137053 - WebKit top of tree sources won't build in 10.9 w/ Xcode 6.0.1
Summary: WebKit top of tree sources won't build in 10.9 w/ Xcode 6.0.1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 19:28 PDT by David Gatwood
Modified: 2014-09-27 00:13 PDT (History)
4 users (show)

See Also:


Attachments
Patch to clarify steps for building with Xcode, etc. (4.56 KB, patch)
2014-09-24 21:51 PDT, David Gatwood
no flags Details | Formatted Diff | Diff
Pass --wksi and --lvm to copy-webkitlibraries-to-product-directory in the build pre-actions (6.15 KB, patch)
2014-09-27 00:08 PDT, mitz
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Gatwood 2014-09-23 19:28:33 PDT
With a stock (non-Apple-Internal) installation of Xcode 6.0.1, on 10.9.5, using a current top-of-tree SVN checkout from webkit.org, if I open the provide WebKit.xcworkspace and build it, I get a build failure in the component "llvmForJSC" because the following headers are not present:

    #include <llvm-c/Analysis.h>
    #include <llvm-c/BitReader.h>
    #include <llvm-c/Core.h>
    #include <llvm-c/Disassembler.h>
    #include <llvm-c/ExecutionEngine.h>
    #include <llvm-c/Initialization.h>
    #include <llvm-c/Linker.h>
    #include <llvm-c/Target.h>
    #include <llvm-c/TargetMachine.h>
    #include <llvm-c/Transforms/IPO.h>
    #include <llvm-c/Transforms/PassManagerBuilder.h>
    #include <llvm-c/Transforms/Scalar.h>

These headers were also not present in the public version of Xcode 5.1.1, so this isn't an Xcode regression (or at least not a recent one).

I'm getting a similar failure from

    #include <WebCore/PlatformExportMacros.h>

in the DumpRenderTree library.

And in both of those subprojects, I'm also seeing the following warnings:

    Base.xcconfig line 23: Unable to find included file "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/AspenFamily.xcconfig"
    Base.xcconfig line 24: Unable to find included file "../../../../Internal/Configurations/HaveInternalSDK.xcconfig"

The webkit.org site (https://www.webkit.org/building/build.html) says that you can build WebKit using the provided xcworkspace, but I'm starting to suspect that this is not actually the case, or at least not without installing a bunch of external bits (llvm headers) that are not mentioned in the page that describes checking out the sources (https://www.webkit.org/building/checkout.html).
Comment 1 David Gatwood 2014-09-23 19:32:38 PDT
Err.. the *provided* xcworkspace file....  Sorry about the typo.
Comment 2 Alexey Proskuryakov 2014-09-23 19:43:03 PDT
Does build-webkit script work for you? I'm also not sure how the workspace could work.
Comment 3 Mark Rowe (bdash) 2014-09-24 12:34:26 PDT
It's required that you build at least once via build-webkit before building via other means (e.g., make or from within Xcode). build-webkit extracts both the WebKitSystemInterface and LLVM headers / libraries from WebKitLibraries into the build directory where they're on the relevant search paths.
Comment 4 David Gatwood 2014-09-24 14:55:13 PDT
Ah.  That's good to know.  In that case, please consider this a request for an update to the docs—specifically, mention that here:

   https://www.webkit.org/building/build.html


Thanks.
Comment 5 Alexey Proskuryakov 2014-09-24 15:09:06 PDT
David, would you be willing to submit a patch? The documentation is in repository, just like the source code.
Comment 6 David Gatwood 2014-09-24 19:39:38 PDT
Yeah.  It's still not building for me.  I'm digging in further.
Comment 7 David Gatwood 2014-09-24 19:54:30 PDT
I think I figured it out.  Xcode was doing a debug build, whereas "build-webkit" defaults to a Release build, so the build products weren't in the right place.  I'm doing a build-webkit --debug now.  Assuming that resolves the problem, I'll clarify the instructions and upload a patch for the docs.
Comment 8 David Gatwood 2014-09-24 21:51:46 PDT
Created attachment 238641 [details]
Patch to clarify steps for building with Xcode, etc.

Patch attached.  I did a little bit of cleanup in other parts of the page to reduce confusion and clutter as well.  Feel free to incorporate as much or as little of this as you see fit.
Comment 9 Alexey Proskuryakov 2014-09-26 22:21:31 PDT
Thank you David, landed (with tweaks) in <http://trac.webkit.org/r174033>.

I restored the rounded rectangle, as this is the style that we use across multiple pages.
Comment 10 mitz 2014-09-26 22:27:15 PDT
(In reply to comment #3)
> It's required that you build at least once via build-webkit before building via other means (e.g., make or from within Xcode). build-webkit extracts both the WebKitSystemInterface and LLVM headers / libraries from WebKitLibraries into the build directory where they're on the relevant search paths.

Can we fix this? It used to be that the build pre-actions in the All Source and All Source (target WebProcess) schemes did everything that was needed.
Comment 11 mitz 2014-09-26 22:31:12 PDT
(In reply to comment #10)
> (In reply to comment #3)
> > It's required that you build at least once via build-webkit before building via other means (e.g., make or from within Xcode). build-webkit extracts both the WebKitSystemInterface and LLVM headers / libraries from WebKitLibraries into the build directory where they're on the relevant search paths.
> 
> Can we fix this? It used to be that the build pre-actions in the All Source and All Source (target WebProcess) schemes did everything that was needed.

It seems like all it would take, at least for OS X builds, is to change the script to pass the --wksi and --llvm options to copy-webkitlibraries-to-product-directory.
Comment 12 mitz 2014-09-27 00:05:22 PDT
Reopening to address the issue rather than document around it.
Comment 13 mitz 2014-09-27 00:08:42 PDT
Created attachment 238765 [details]
Pass --wksi and --lvm to copy-webkitlibraries-to-product-directory in the build pre-actions
Comment 14 mitz 2014-09-27 00:13:59 PDT
Fixed in <http://trac.webkit.org/r174034>.