v8 icon indicating copy to clipboard operation
v8 copied to clipboard

broken install steps for 6.9.427.19

Open tobowers opened this issue 6 years ago • 23 comments

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):

# github.com/augustoroman/v8
Undefined symbols for architecture x86_64:
  "v8::internal::Builtins::Generate_ArrayForEach(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_TestHelperPlus1(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_TestHelperPlus2(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_ArraySpliceTorque(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_TypedArrayQuickSort(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_TypedArrayPrototypeSort(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetInt8(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetInt8(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_GenericBuiltinTest5ATSmi(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetInt16(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetInt32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetUint8(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetInt16(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetInt32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetUint8(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetBuffer(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetUint16(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetUint32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetUint16(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetUint32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetFloat32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetFloat64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetFloat32(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetFloat64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_ArrayForEachLoopContinuation(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetBigInt64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetBigInt64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetBigUint64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeSetBigUint64(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetByteLength(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_DataViewPrototypeGetByteOffset(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement16ATFixedInt8Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement17ATFixedInt16Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement17ATFixedInt32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement17ATFixedUint8Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement16ATFixedInt8Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement18ATFixedUint16Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement18ATFixedUint32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement17ATFixedInt16Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement17ATFixedInt32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement17ATFixedUint8Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_ArrayForEachLoopLazyDeoptContinuation(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement19ATFixedFloat32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement19ATFixedFloat64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement18ATFixedUint16Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement18ATFixedUint32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_ArrayForEachLoopEagerDeoptContinuation(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement20ATFixedBigInt64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement19ATFixedFloat32Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement19ATFixedFloat64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement21ATFixedBigUint64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement20ATFixedBigInt64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement21ATFixedBigUint64Array(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_GenericBuiltinTest22UT12ATHeapObject5ATSmi(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_LoadFixedElement24ATFixedUint8ClampedArray(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
  "v8::internal::Builtins::Generate_StoreFixedElement24ATFixedUint8ClampedArray(v8::internal::compiler::CodeAssemblerState*)", referenced from:
      v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal(v8::internal::Isolate*) in libv8_initializers.a(setup-builtins-internal.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL	github.com/augustoroman/v8 [build failed]

tobowers avatar Jan 23 '19 09:01 tobowers

the 6.7 gems fail too, but it does appear the 6.3 versions do work following the prebuilt

tobowers avatar Jan 23 '19 09:01 tobowers

5465aa4fd3f4894abcfe3054bccc95de3f22feeb should fix the build for 6.7.288.

lacombar avatar Jan 29 '19 08:01 lacombar

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.

lacombar avatar Jan 29 '19 09:01 lacombar

Oh that will be awesome!

tobowers avatar Jan 29 '19 10:01 tobowers

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

lacombar avatar Jan 31 '19 09:01 lacombar

hmm - didn't build https://gist.github.com/tobowers/be6edb7149e389c173f8c4f8de5e42fc but I think it might be a paths thing with symlink.sh

tobowers avatar Feb 04 '19 09:02 tobowers

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

tobowers avatar Feb 04 '19 09:02 tobowers

@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 avatar Feb 04 '19 10:02 tobowers

@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.

lacombar avatar Feb 05 '19 23:02 lacombar

@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) ?

lacombar avatar Feb 05 '19 23:02 lacombar

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 avatar Mar 05 '19 00:03 jacksontj

@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 avatar Mar 05 '19 00:03 lacombar

@lacombar sure, I actually have a build I made already. What branch should I be using?

jacksontj avatar Mar 05 '19 01:03 jacksontj

cf https://github.com/augustoroman/v8/issues/39#issuecomment-459275270

lacombar avatar Mar 05 '19 01:03 lacombar

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?

jacksontj avatar Mar 05 '19 13:03 jacksontj

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

jacksontj avatar Mar 05 '19 17:03 jacksontj

Yes, the old V8 snapshot API has been deprecated. I didn't have the time yet to sort out the new API.

lacombar avatar Mar 06 '19 07:03 lacombar

@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 avatar Mar 08 '19 00:03 jacksontj

@jacksontj it depends entirely on @augustoroman

lacombar avatar Mar 08 '19 00:03 lacombar

@augustoroman do you have any comments on this issue?

tobowers avatar Apr 12 '19 19:04 tobowers

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 avatar Apr 18 '19 06:04 augustoroman

@augustoroman sounds like @lacombar and myself at least are interested :)

jacksontj avatar Apr 18 '19 15:04 jacksontj

@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: [email protected]

Cheers

base698 avatar Nov 11 '19 22:11 base698