Skip to content
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

error: no matching constructor for initialization of 'v8::ScriptOrigin' #488

Closed
cody-young opened this issue May 31, 2022 · 2 comments · Fixed by #486
Closed

error: no matching constructor for initialization of 'v8::ScriptOrigin' #488

cody-young opened this issue May 31, 2022 · 2 comments · Fixed by #486

Comments

@cody-young
Copy link

Hi There,

I'm getting the following error when trying to run make -j4 on OSX 12.3.1
I installed v8 via brew. Version 10.1.124.12

Any hints?

% make -j4
/bin/sh /tmp/v8js/libtool --mode=compile g++ -Wno-narrowing -std=c++14 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/local/Cellar/[email protected]/7.4.29/include/php -I/usr/local/Cellar/[email protected]/7.4.29/include/php/main -I/usr/local/Cellar/[email protected]/7.4.29/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.29/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext/date/lib -I/usr/local/include -I/usr/local -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js_class.cc -o v8js_class.lo
/bin/sh /tmp/v8js/libtool --mode=compile g++ -Wno-narrowing -std=c++14 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/local/Cellar/[email protected]/7.4.29/include/php -I/usr/local/Cellar/[email protected]/7.4.29/include/php/main -I/usr/local/Cellar/[email protected]/7.4.29/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.29/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext/date/lib -I/usr/local/include -I/usr/local -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js_methods.cc -o v8js_methods.lo
g++ -Wno-narrowing -std=c++14 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/local/Cellar/[email protected]/7.4.29/include/php -I/usr/local/Cellar/[email protected]/7.4.29/include/php/main -I/usr/local/Cellar/[email protected]/7.4.29/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.29/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext/date/lib -I/usr/local/include -I/usr/local -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js_methods.cc -fno-common -DPIC -o .libs/v8js_methods.o
g++ -Wno-narrowing -std=c++14 -I. -I/tmp/v8js -DPHP_ATOM_INC -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/local/Cellar/[email protected]/7.4.29/include/php -I/usr/local/Cellar/[email protected]/7.4.29/include/php/main -I/usr/local/Cellar/[email protected]/7.4.29/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.4.29/include/php/Zend -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext -I/usr/local/Cellar/[email protected]/7.4.29/include/php/ext/date/lib -I/usr/local/include -I/usr/local -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -c /tmp/v8js/v8js_class.cc -fno-common -DPIC -o .libs/v8js_class.o
/tmp/v8js/v8js_class.cc:104:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
V8JS_GLOBAL(c->isolate)->Delete(v8_context, object_name_js);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
./v8js_v8.h:37:32: note: expanded from macro 'V8JS_GLOBAL'
#define V8JS_GLOBAL(isolate) ((isolate)->GetCurrentContext()->Global())
^
/tmp/v8js/v8js_class.cc:460:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
context->Global()->Set(context, V8JS_SYM("global"), context->Global());
^~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_class.cc:506:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
V8JS_GLOBAL(isolate)->DefineOwnProperty(context, object_name_js, php_obj, v8::ReadOnly);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./v8js_v8.h:37:32: note: expanded from macro 'V8JS_GLOBAL'
#define V8JS_GLOBAL(isolate) ((isolate)->GetCurrentContext()->Global())
^
/tmp/v8js/v8js_class.cc:528:4: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
php_obj->DefineOwnProperty(context, key, zval_to_v8js(value, isolate), v8::ReadOnly);
^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_class.cc:595:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
php_obj->CreateDataProperty(context, method_name, ft->GetFunction(context).ToLocalChecked());
^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_class.cc:639:19: error: no matching constructor for initialization of 'v8::ScriptOrigin'
v8::ScriptOrigin origin(sname);
^ ~~~~~
/usr/local/include/v8-message.h:62:17: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Localv8::String' to 'const v8::ScriptOrigin' for 1st argument
class V8_EXPORT ScriptOrigin {
^
/usr/local/include/v8-message.h:62:17: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Localv8::String' to 'v8::ScriptOrigin' for 1st argument
/usr/local/include/v8-message.h:64:13: note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided
V8_INLINE ScriptOrigin(Isolate* isolate, Local resource_name,
^
/tmp/v8js/v8js_methods.cc:519:19: error: no matching constructor for initialization of 'v8::ScriptOrigin'
v8::ScriptOrigin origin(sname);
^ ~~~~~
/usr/local/include/v8-message.h:62:17: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Localv8::String' to 'const v8::ScriptOrigin' for 1st argument
class V8_EXPORT ScriptOrigin {
^
/usr/local/include/v8-message.h:62:17: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Localv8::String' to 'v8::ScriptOrigin' for 1st argument
/usr/local/include/v8-message.h:64:13: note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided
V8_INLINE ScriptOrigin(Isolate* isolate, Local resource_name,
^
/tmp/v8js/v8js_methods.cc:565:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
module->Set(context, V8JS_SYM("id"), V8JS_STR(normalised_module_id));
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_methods.cc:566:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
module->Set(context, V8JS_SYM("exports"), exports);
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_methods.cc:580:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
v8::Localv8::Function::Cast(module_function.ToLocalChecked())->Call(context, exports, 3, jsArgv);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_methods.cc:616:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
module->Get(context, sym_exports).ToLocal(&newobj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
/tmp/v8js/v8js_class.cc:1332:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
jsobj->DefineOwnProperty(v8_context, key, zval_to_v8js(value, isolate), v8::ReadOnly);
^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/v8js/v8js_class.cc:1356:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
jsobj->Delete(v8_context, key);
^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
4 warnings and 1 error generated.
make: *** [v8js_methods.lo] Error 1
make: *** Waiting for unfinished jobs....
7 warnings and 1 error generated.
make: *** [v8js_class.lo] Error 1

@stesie
Copy link
Member

stesie commented Jun 1, 2022

Yeah, noticed this myself yesterday, but just opened a PR and no issue :-)

... just merged the PR, so should compile fine if you'll try again.

@stesie stesie closed this as completed Jun 1, 2022
@cody-young
Copy link
Author

Yup, working now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants