Bug 79780

Summary: [Chromium] Automatically install 64-bit linker for Android
Product: WebKit Reporter: Peter Beverloo <peter>
Component: New BugsAssignee: Peter Beverloo <peter>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, eric, jrg, satish, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 84843    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Peter Beverloo
Reported 2012-02-28 05:17:06 PST
[Chromium] Update Android NDK to r7b, automatically install 64-bit linker
Attachments
Patch (6.71 KB, patch)
2012-02-28 05:23 PST, Peter Beverloo
no flags
Patch (5.78 KB, patch)
2012-03-13 10:29 PDT, Peter Beverloo
no flags
Patch (6.21 KB, patch)
2012-05-30 06:58 PDT, Peter Beverloo
no flags
Patch for landing (6.04 KB, patch)
2012-05-30 11:36 PDT, Peter Beverloo
no flags
Peter Beverloo
Comment 1 2012-02-28 05:23:30 PST
Adam Barth
Comment 2 2012-02-28 09:03:11 PST
Comment on attachment 129232 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129232&action=review > Source/WebKit/chromium/DEPS:177 > + # Directly referring to chromium_deps variable isn't possible, as the > + # dependency is not listed in Chromium's main DEPS file. > + 'third_party/aosp': > + 'http://src.chromium.org/svn/trunk/deps/third_party/aosp@122156', Is maintaining this version number going to be a hassle? Currently we just need to increment one number in this file. Can we refactor Chromium's main DEPS file or improve gclient so we can get the right version automatically?
Peter Beverloo
Comment 3 2012-02-28 10:18:43 PST
(In reply to comment #2) > Is maintaining this version number going to be a hassle? Currently we just need to increment one number in this file. Can we refactor Chromium's main DEPS file or improve gclient so we can get the right version automatically? Android's DEPS additions are being controlled in a separate gyp repository here: http://git.chromium.org/gitweb/?p=chromium/tools/android.deps.git;a=summary An alternative approach would be to include this repository in the gclient configuration file (update-webkit-chromium:58) in case the checkout is for Android. The issue here is that this follows Chromium's path structure, thus prefixing everything with "src/", which we don't want for WebKit. Chromium's WebKit port solves this by referring to the DEPS file in the online repository and pulling the dependency from there using our own naming. I've tried getting this to work with an online version of the DEPS file, but to no avail (http://git.chromium.org/gitweb/?p=chromium/tools/android.deps.git;a=blob_plain;h=ff1118) -- it seems to try to svn checkout a git directory which obviously is not going to work. I'll look into gclient to see if I can somehow get it to check out the android.deps.git file and base the other dependencies off that.
Peter Beverloo
Comment 4 2012-02-29 11:39:06 PST
The File() function in DEPS files is used to check out a single file from a subversion repository. The Android-specific DEPS file we're requiring is only available on git, so that won't fly in it's current form. Checking out a single file from a git repository requires us to clone it, and while that may be fine in this (uncommon) case, it could result in tons of unnecessary traffic elsewhere. A third option would be to add a "Url()" method to gclient which would download the page over HTTP, through the web-viewer. These options are both quite severe and would require quite some changes in gclient. Making the DEPS file (probably the entire repository) available over SVN would be another option, but this would have to be mirrored with the GIT repository as the master (given that Chromium depends on GIT right now). Given that the linker shouldn't require (frequent) updates I think that, for now, it's fine. I'll discuss internally to see what the ideal way would be to get WebKit to be able to access Android's DEPS file.
Peter Beverloo
Comment 5 2012-03-13 10:29:40 PDT
Peter Beverloo
Comment 6 2012-03-13 10:35:13 PDT
I moved the update to the Android NDK r7b to Bug 81005. This patch has been tested with both versions of the NDK. At least for now, I don't foresee many changes to the Android-specific DEPS file which would cause too much duplication. Furthermore, since it[1] will be updated on Chromium's schedule, referring to it directly may pull in different versions of files for which WebKit's Chromium version has not yet been updated. Until we've got more insight in what the DEPS file will be used for (as seen from WebKit's interest) aside from the custom linker and Freetype repository, I think we should be fine for now. [1] http://git.chromium.org/gitweb/?p=chromium/tools/android.deps.git;a=blob;f=DEPS
Adam Barth
Comment 7 2012-03-13 13:08:09 PDT
It seems like the proper way to solve this problem is to follow the dependency chain: Use the chromium_rev in Source/WebKit/chromium/DEPS to get the proper version of android.deps/DEPS and then look in that file to get the proper version of aosp. Having the version number hard-coded here is going to be a maintenance burden.
Peter Beverloo
Comment 8 2012-03-13 13:10:29 PDT
Yes, and there lies the problem: android.deps/DEPS is only available over git, and gclient has no way of referring to that. Adding dpranke; Dirk, would you have any idea on how to solve this in a clean way?
Adam Barth
Comment 9 2012-03-13 13:41:17 PDT
If we're going to use git to store DEPS files, it seems like we need to teach gclient how to use git. Another solution is to store the DEPS file in an SVN repo.
Dirk Pranke
Comment 10 2012-03-13 14:56:11 PDT
Comment on attachment 131659 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=131659&action=review > Source/WebKit/chromium/DEPS:176 > + 'http://src.chromium.org/svn/trunk/deps/third_party/aosp@122156', Can you get this using the "From()" feature in gclient? I've never used it, but I think the syntax is something like 'android_deps': File('http://git.chromium.org/gitweb/?p=chromium/tools/android.deps.git;a=blob;f=DEPS'), 'third_party/aosp': From('android_deps', 'third_party/aosp'), or something like that (there other are examples in this file). However, it seems like you still need to fix a revision of the chromium git repo (since we wouldn't want to just pick HEAD), and since you can't use the svn revision for this, you will still have two numbers to update, so I'm not sure that it's an improvement. It seems bad to me to have a git-only thing in the chromium repo, since everything else works for either svn or git.
Dirk Pranke
Comment 11 2012-03-13 14:56:42 PDT
Tony knows the webkit / gclient hooks better than I; Tony, any ideas?
Tony Chang
Comment 12 2012-03-13 15:47:57 PDT
(In reply to comment #4) > Checking out a single file from a git repository requires us to clone it, and while that may be fine in this (uncommon) case, it could result in tons of unnecessary traffic elsewhere. This seems reasonable to me. You would just need to update File() to understand git. I agree that cloning the whole repository seems like a waste, but you could use --depth 1 and -n to avoid pulling the whole history or writing a bunch of files to disk (reference: http://stackoverflow.com/a/2466755 ). How does it work for Chromium checkouts? Is it a separate solution entry in your .gclient file? Alternately, maybe we can add the git clone of android.deps.git to update-webkit-chromium (or maybe this script can add it to the .gclient file).
Peter Beverloo
Comment 13 2012-04-19 14:29:02 PDT
Comment on attachment 131659 [details] Patch We're fixing infrastructure to do this the right way, the first patches are already in-flight (elsewhere). I'll upload a new patch once that has been done.
Peter Beverloo
Comment 14 2012-05-30 06:58:55 PDT
Peter Beverloo
Comment 15 2012-05-30 07:01:25 PDT
New patch, I would appreciate it if you could take a look! We're now ready to start deprecating the android.deps.git repository in favor of using gclient's new target_os feature and the main DEPS file. As part of that, the versioning issue has been resolved and we now inherit the revision data from Chromium, as pretty much all other dependencies do.
Adam Barth
Comment 16 2012-05-30 11:19:13 PDT
Comment on attachment 144802 [details] Patch Thanks.
Adam Barth
Comment 17 2012-05-30 11:20:07 PDT
Peter, thanks for doing this the right way. I really appreciate it.
Peter Beverloo
Comment 18 2012-05-30 11:22:45 PDT
(In reply to comment #17) > Peter, thanks for doing this the right way. I really appreciate it. That's ok, it's the approach which should have been taken straight away. Thank you for the review! I'll wait for Ami's Chromium DEPS roll to land after which I'll put the patch on the CQ.
Peter Beverloo
Comment 19 2012-05-30 11:36:15 PDT
Created attachment 144881 [details] Patch for landing
Peter Beverloo
Comment 20 2012-05-31 02:23:11 PDT
Note You need to log in before you can comment on or make changes to this bug.