10000 start upgrading V8 to 7.7.299 by dothebart · Pull Request #10274 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

start upgrading V8 to 7.7.299 #10274

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

Closed
wants to merge 72 commits into from
Closed

start upgrading V8 to 7.7.299 #10274

wants to merge 72 commits into from

Conversation

dothebart
Copy link
Contributor

Starting to deploy the new V8

@dothebart
Copy link
Contributor Author
dothebart commented Oct 17, 2019

@cclauss @refack for the errors obvious to me I've provided pull requests, it would be good if you could lend me a helping hand on identifying my currently remaining issue which doesn't error out, but simply produces errnous behaviour:

I'm using the nodejs gypfiles, and invoke gyp like this:

arangosrc = ~/src/arangodb
cd "${arangosrc}/3rdParty/V8/v7.1.302.28" && /usr/bin/python3 "${arangosrc}/3rdParty/V8/v7.1.302.28/tools/gyp/gyp_main.py" --generator-output="${arangosrc}/build/3rdParty/V8/v7.1.302.28" -Dv8_target_arch=x64 -Dv8_host_arch=x64 "-Dbyteorder='little'" -Dv8_enable_i18n_support=1 gypfiles/all.gyp --format make -S.x64.release -Igypfiles/standalone.gypi -Dmac_deployment_target=10.11 --depth=. -Dstandalone_static_library=1 -Dlinux_use_bundled_gold=0 -Dlinux_use_gold_flags=0 -Dv8_no_strict_aliasing=1 -Dwerror= -Dclang=0 -Dhost_clang= -Dv8_embed_script= -Dembed_script= -Dwarmup_script= -Dv8_enable_embedded_builtins=0 -Dembedded_builtins_snapshot_src= -Dv8_enable_handle_zapping=0 -Dv8_use_snapshot=0 -DV8_ROOT="${arangosrc}/3rdParty/V8/v7.1.302.28"

which will run through, however it seems that some files are missing partially; If I get that correctly there is a module loading source file lists from .gni files, right? The node-gyp generated makefiles contain dependencies to src/base/bits.cc, but doen't add instructions howto build them. So it gyp somehow knows src/base/bits.cc, but doesn't generate all neccessary places. Most probably bits is just the first file, more would follow.

Any hints?

@dothebart
Copy link
Contributor Author

Ok, V8_ROOT has to be relative, if its absolute, everything breaks.

@ObiWahn
Copy link
Contributor
ObiWahn commented Oct 17, 2019

#10276 get this as soon as it lands in devel.

@ObiWahn
Copy link
Contributor
ObiWahn commented Oct 17, 2019
['/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/pylib', '/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/..', '/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/../../gypfiles', '/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/../../third_party/binutils']
Traceback (most recent call last):
  File "/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/gyp_main.py", line 53, in <module>
    import gyp
ImportError: bad magic number in 'gyp': b'\x03\xf3\r\n'
make[2]: *** [3rdParty/V8/CMakeFiles/v8_build.dir/build.make:106: 3rdParty/V8/v8_build-prefix/src/v8_build-stamp/v8_build-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:739: 3rdParty/V8/CMakeFiles/v8_build.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

ImportError: bad magic number in 'gyp': b'\x03\xf3\r\n'

Can be fixed by running find . -name "*.pyc" -delete in source.

@ObiWahn
Copy link
Contributor
ObiWahn commented Oct 17, 2019
Traceback (most recent call last):
  File "/home/xxx/checkouts/arangodb5/3rdParty/V8/v7.1.302.28/tools/gyp/gyp_main.py", line 56, in <module>
    sys.exit(gyp.script_main())
AttributeError: module 'gyp' has no attribute 'script_main'

cclauss added a commit to cclauss/arangodb that referenced this pull request Oct 18, 2019
Related to arangodb#10278 and the request for assistance at arangodb#10274 (comment)
```
1     E902 TokenError: EOF in multi-line statement
181   E999 SyntaxError: invalid syntax
6     F632 use ==/!= to compare str, bytes, and int literals
11    F633 use of >> is invalid with print function
2     F723 syntax error in type comment 'Dict[option, Dict[col_fam, value]] X 2 ->'
121   F821 undefined name 'execfile'
322
```
@ObiWahn
Copy link
Contributor
ObiWahn commented Oct 18, 2019

@dothebart do you know which gyp is loaded and if the version matches? I had no luck with gyp.__file__ or the inspect module locating gyp.

@cclauss
Copy link
cclauss commented Oct 18, 2019

Ok, V8_ROOT has to be relative, if its absolute, everything breaks.

Does the directive from __future__ import absolute_import help or hurt?

https://docs.python.org/3.8/library/__future__.html

@dothebart
Copy link
Contributor Author

at least for me gyp now does what its expected to - fighting torque now.

@@ -756,7 +760,7 @@ TRI_v8_global_t* TRI_GetV8Globals(v8::Isolate*);
template <typename TARGET>
bool TRI_V8_AddProtoMethod(v8::Isolate* isolate, TARGET tpl, v8::Handle<v8::String> name,
v8::FunctionCallback callback, bool isHidden = false) {
// hidden method
/* // hidden method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-771,7 +771,7 @@ bool TRI_V8_AddProtoMethod(v8::Isolate* isolate, TARGET tpl, v8::Handle<v8::Stri
 
 /// @brief adds a method to an object
 template <typename TARGET>
-inline bool TRI_V8_AddMethod(v8::Isolate* isolate, TARGET tpl, v8::Handle<v8::String> name,
+inline bool TRI_V8_AddMethod(v8::Isolate* isolate, v8::MaybeLocal<TARGET> tpl, v8::Handle<v8::String> name,
                              v8::Handle<v8::FunctionTemplate> callback,
                              bool isHidden = false) {
   // hidden method
@@ -787,8 +787,9 @@ inline bool TRI_V8_AddMethod(v8::Isolate* isolate, TARGET tpl, v8::Handle<v8::St
 }
 
 template <typename TARGET>
-inline bool TRI_V8_AddMethod(v8::Isolate* isolate, TARGET tpl, v8::Handle<v8::String> name,
+inline bool TRI_V8_AddMethod(v8::Isolate* isolate, v8::MaybeLocal<TARGET> tpl, v8::Handle<v8::String> name,
                              v8::FunctionCallback callback, bool isHidden = false) {
+

maybe we should do this instead

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

@ObiWahn
Copy link
Contributor
ObiWahn commented Oct 18, 2019

Can you split the PR. It becomes impossible do to good review here.

  • 1st pr (this) - copy the files from upstream
  • 2nd pr that has this pr as base - modifications in arangodb

@dothebart
Copy link
Contributor Author

Superseeded by #10978 - which will directly go to the currently available V8 version.

@dothebart dothebart closed this Jan 28, 2020
@dothebart dothebart deleted the feature/upgrade-v8 branch March 9, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0