Open tobowers opened 5 years ago
the 6.7 gems fail too, but it does appear the 6.3 versions do work following the prebuilt
5465aa4fd3f4894abcfe3054bccc95de3f22feeb should fix the build for 6.7.288.
btw, I looked at building with 7.0.x but there was a bunch of API change which will require change to the bridge. Given the v8 folks are at 7.4 right now, I'll build it and jump to that version directly.
Oh that will be awesome!
I fixed most of the API deprecation (short of snapshots, which are still broken) against V8 7.4. Hopefully, I'll get some time to run some test tomorrow.
Code available in my fork... https://github.com/aerilon/v8/commits/build
hmm - didn't build https://gist.github.com/tobowers/be6edb7149e389c173f8c4f8de5e42fc but I think it might be a paths thing with symlink.sh
so the path is wrong, but when I fix that then I get a:
10:45 ~/code/go/src/github.com/augustoroman/v8 (new-ver) $ go test
# github.com/augustoroman/v8
ld: library not found for -lv8_monolith
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL github.com/augustoroman/v8 [build failed]
It looks like the build instructions do not produce a libv8_monolith file, maybe there was a tweak?
UPDATE: found the v8_monolithic=true flag
@lacombar after getting the monolith to build, fixing up the LD flags import and commenting out anything referencing snapshot in the tests - I got the following segfault:
https://gist.github.com/tobowers/2de0a6182f0fc4a00cf496c7360b1e65
@tobowers tests should be fixed now, short of some time/date timezone issue and the snapshot stuff. In the future, would you mind moving comments related to my branch on my repo, not to hijack this issue ? I'm not sure of @augustoroman intend with this repo in the future.
@augustoroman speaking of which, do you intend to only follow the stable rubygem's v8 binary release (the latest beta is already nearly 6 month old!), or do you intend to support the latest versions (in which case I can open a PR to get that support in) ?
I get a similar looking stack of symbol errors when trying to run with v8 7.2.502.28 -- presumably the same 7.x compatibility issues mentioned in https://github.com/augustoroman/v8/issues/39#issuecomment-458460258 -- are there any plans for supporting the newer version?
@jacksontj could you try my branch ? the only trick is that you will need to build v8 on your own, but it's not overly complicated.
@lacombar sure, I actually have a build I made already. What branch should I be using?
hmm, my local build didn't seem to work:. I'm building using the docker instructions, I have made some modifications to get it working for the newer version -- https://github.com/jacksontj/v8/tree/v8build/docker-v8-lib
Output when run:
$ go test
# github.com/augustoroman/v8
/usr/bin/ld: cannot find -lv8_monolith
collect2: error: ld returned 1 exit status
I already added that monolith flag, any ideas?
After some more digging (and updating my branches) seems that I was missing another monolith flag, and your fork changed the include path. It now seems to build (and my tests for my usecase pass), but I'm having issues with snapshots now (they seem entirely broken? To be clear, I'm not getting the behavior I expect, but it is not segfault-ing as it was before)-- which seems maybe expected since you have it disabled in your fork? If so, any ideas on how to get those working? Or any pointers on what the problem is?
@lacombar
Yes, the old V8 snapshot API has been deprecated. I didn't have the time yet to sort out the new API.
@lacombar I'll start taking a look then -- but the rest of it all seems to work. Are these changes going to be merged in? Or is this the beginnings of a fork?
@jacksontj it depends entirely on @augustoroman
@augustoroman do you have any comments on this issue?
Sorry for the delay. I'd prefer that this repo follow the latest v8 and not be constrained by the ruby gems. I don't have much time to invest in keeping this up to date, but I'll do what I can. I can also add collaborators for someone interested in helping to maintain this library.
@augustoroman sounds like @lacombar and myself at least are interested :)
@augustoroman What is your contact information? I have some questions about consulting on this if you'd be open to it and have time. My email is: justin.thomas1@gmail.com
Cheers
I followed the install steps on OSX 10.14 (couldn't get the gem to install, so I went the source install).
6.7.288.46.1 fails because it needs a single digit sdk for xcode (see: https://github.com/Homebrew/homebrew-core/issues/31616 )
Using 6.9.427.19 fails with the following (after symlinking):