-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v8 5.4.500.41 #7168
v8 5.4.500.41 #7168
Conversation
They changed the entire build system, which is why nobody has touched this for a while. You'll need to look into that. |
If I'm obsessed enough to hand-write a manpage for V8's command-line flags, I'm pretty confident that figuring out its build system falls within my motivational scope. :-) Will keep you posted. |
Heh, good luck 😉. If you need any help feel free to prod, I've tended to be the one handling V8 changes in Homebrew for a while, so if there's anything that confuses you in the formula I probably put it there 😅. |
Build failed at an
This is consistent with the build system change that DomT4 mentioned. You'll probably want to test and tweak this locally and get it building before resubmitting it to the PR. |
Aye, I read something about a new build system in another (closed) PR. Will have a closer look at this tonight. =) This might be the most patriotic PR I've ever proposed. Brews and V8 engines... can't get more Australian than that... |
@Alhadis any luck? |
FUCK! Totally forgot!! Stayed up amending revision requests on a long overdue PR before crashing. I'm normally pretty good at remembering if there's food on my plate, so to speak, so... embarrassing that I should've forgotten. A'IGHT GOOGLE, LEMME AT YER SWEET SWEET JS ENGINE. |
Question: Should I point to a specific commit for Google's |
Yes, thanks. |
Do we have facilities for checking out source through a third-party tool? Because this is actually a required part of Google's build step: Note that checkout here is referring specifically to a repository that's been cloned using
Still halfway through re-checking-out V8; here's what I'm currently staring at in the terminal window:
EDIT: Finished a minute or so after posting. Updated to include last three lines of feedback. |
system "gclient", ".... |
Ah. So... I can simply omit these lines then? url "https://github.com/v8/v8/archive/5.4.500.41.tar.gz"
sha256 "463ce3e345d30b856b48f0ddf123b48d038c3af8c1098a7a6ad4c0e09c1eae0f" |
Should I be concerned about pinned formulae (or users wanting specific V8 versions) when modifying the current build steps? Virtually everything about the build process is different to the current one. |
Not unless they were being replaced with something else. It may be that
No, I don't think so. |
Alright, thanks. Seems like
I assumed this last step was just a recommendation, but after running my first (successful) approach using relative paths, I was greeted with a handful of errors halfway through
Some cursory snooping through Also, if it appears this is taking too long, it'll be because I'm waiting on checkouts and builds to finish downloading/compiling. |
Yes, you can use ENV.prepend_path or ENV.prepend_create_path |
I'm not seeing a What would you recommend to determine if the formula's being built on a 64-bit or 32-bit machine? |
arch = MacOS.prefer_64_bit? ? "x64" : "x86" |
Another stupid question: could I get clarification on what this is doing? lib.install Dir["lib*"]
bin.install "d8", "mksnapshot", "process", "shell" => "v8" First of all, the resulting contents of
Secondly, I wasn't aware that
Are these two binaries needed for something? |
means
means
no idea |
Thanks! What's the |
Library files which may be dynamic (foo.dylib and occasionally foo.so) or static (foo.a), and which may or may not be used by any other formulae.
shows what libraries a given formula uses. |
Well, these are the only
Whereas the contents of
So I'm unsure what to do. Here're the full contents of |
The old make file had an option |
Ah, that would be a component build then, I guess. I'll try rebuilding with it. |
No luck. Even with So far, the only solution seems to be running |
@Alhadis go ahead and push what you have so far please and I'll take a look at what you mean. |
Scratch what I said about
Nothing to push yet; I wanted to verify the build generated everything before integrating it into the formula. Here're the steps I'm running, which assume # Checkout repository
gclient root
gclient config --spec 'solutions = [
{
"url": "https://chromium.googlesource.com/v8/v8.git",
"managed": False,
"name": "v8",
"deps_file": "DEPS",
"custom_deps": {},
},
]
target_os = [ "mac" ]
target_os_only = True
'
gclient sync -r 5.4.500.41
git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
git config diff.ignoreSubmodules all
# Configure build
tools/dev/v8gen.py x64.release
ninja -C out.gn/x64.release
tools/run-tests.py --outdir out.gn/x64.release You can omit the last line if you're not interested in running tests. |
I'll just leave it as-is, actually. I only thought the shared library was getting in the way of the final build, simply because I'd overlooked the fact it relied on the missing I'm still convinced there's a way of generating these files with
For shared libraries, though, we'll still need a separate build pass. |
@DomT4 When dealing with V8 builds, have you ever had to deal with it needing I'm wondering if this is new to the GN-era build process, because the |
Yes, been down that path before, which is why: ENV.append "GYP_DEFINES", "v8_use_external_startup_data=0" has lived in the formula for a while, since Homebrew/legacy-homebrew#44976. Not only did it need those files, but it was fussy about where they lived to boot. |
From the code comment there you highlighted in |
Well, I'm partly relieved to know this isn't a new issue. =)
To avoid introducing new problems, I wiped the slate clean of ENV-wrangling and kept things simple. Also, before I forget to bring them up, here're some random things I've learned spelunking through Google's cavernous build-dungeon:
EDIT: Oh yeah, almost forgot this, too: I'm getting the same compiler warning mentioned here while building, but there've been no problems... I dismissed it as a non-issue, but you guys might know if it's worth concern:
|
IIRC
This doesn't surprise me. They've been leaning that way for a while. I think it's fine for |
Two less headaches to worry about then. =) Good to hear. I've spent nearly all day digging through GN docs and configs to find a safe way of setting the rpath that's embedded in the There's no way to change this at a configuration level, however. Existing targets can't be modified outside their definition. So we're basically reduced to patching a So far, that hasn't been turning out too well:
This snarky bullshit hasn't done anything for my expectations, either:
|
Is there a way to download dependent resources to a directory other than (If I don't answer, it's because I've finally crashed and fallen asleep) |
Okay, I tried installing outside @ilovezfs Is it possible to download the formula's source to a subdirectory in the buildpath? |
@Alhadis can you come on IRC? (freenode #machomebrew) https://www.irccloud.com/#!/ircs://irc.freenode.net:6697/%23machomebrew |
Any progress on this? I'm planning to upgrade v8 to 5.7 (sure, not in core, I maintain own formulae for development purposes - https://github.com/pinepain/packaging/tree/master/homebrew) and as build system changed I have to alter packaging scripts, so to not duplicate our efforts it would be wise to coordinate the work. Are there anything I can assist with? |
@Alhadis are static libraries a must nowadays? In a thread you linked (https://groups.google.com/forum/#!topic/v8-users/Y05xPj956Ys) Jochen Eisinger points that now libplatform could be built as shared. I'll give a try my php-v8 extension to build without static libraries, but before it was not possible because libplatform was built only statically, afair. Did you go with custom depot download strategy or how you handle sources download process? |
Confirmed with hello_world_build_osx.sh. Now we can build against that shared libraries. It looks like we don't need static libs unless there are some specific requirements (which I'm not aware of). |
I'm not sure why the static libraries are being used, to be honest... @ilovezfs, status? I got an e-mail telling me my IRCCloud trial expired and I have to fork out money I don't have in order to upgrade, so, hope you won't be needing too much of my input, haha. |
@Alhadis they are not required anymore, at least I can us dynamic one as of 5.7 with php-v8, try upgrade-to-v8-5.7 branch if you curious (note, it's heavy WIP branch). I'm not sure about 5.6, but if you see sth like libbase.dylib, static is not required. I'll push some of my changes to own co-installable v8 I use for php-v8 later today so you can adapt your changes to it (basically, it's quite the same you already have, but co-installable). |
@ilovezfs @DomT4 We discussed it before, but on more time: what about having multiple v8 versions at once, like php tap does? Make it co-installable, keg-only and let depends on any of |
@pinepain let's not discuss that here please. If you want to discuss versioning, join the party on Homebrew/brew#620. |
@ilovezfs wow, somehow missed that, thanks for pointing me out! |
Hi, as I noted earlier, here is my Key difference from core v8 formula is that I build vanilla v8 with icu and do not patch anything. |
#9343 updates V8 to v5.8.48 and adds a |
(Created with
brew bump-formula-pr
)This is the V8 version used by the latest stable version of Chrome (54.0.2840.98). Hoping I did everything right.
Would it be possible to add a
--HEAD
option for the V8 formula? Work on the V8 engine moves fast, and some JS programmers (like me) prefer to benchmark their work against cutting-edge versions.