influxdata / influxdata/chronograf

1.10.1 compile error: ‘AccessorSignature’ is not a member of ‘v8’

Open
#6,040 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
250
Avg merge
1d 3h
Merged PRs (30d)
9

Description

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. Unpack chronograf-1.10.1.tar.gz
2. cd chronograf-1.10.1
3. make

After several C++ warnings, I get a compile error:

```
x86_64-pc-linux-gnu-g++ -o Release/obj.target/binding/src/binding.o ../src/binding.cpp '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DBUILDING_NODE_EXTENSION' -I/home/mario/.cache/node-gyp/20.2.0/include/node -I/home/mario/.cache/node-gyp/20.2.0/src -I/home/mario/.cache/node-gyp/20.2.0/deps/openssl/config -I/home/mario/.cache/node-gyp/20.2.0/deps/openssl/openssl/include -I/home/mario/.cache/node-gyp/20.2.0/deps/uv/include -I/home/mario/.cache/node-gyp/20.2.0/deps/zlib -I/home/mario/.cache/node-gyp/20.2.0/deps/v8/include -I../../nan -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c
In file included from ../../nan/nan.h:178,
from ../src/binding.cpp:1:
../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
55 | typedef v8::Local Sig;
| ^~~~~~~~~~~~~~~~~
../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
55 | typedef v8::Local Sig;
| ^
../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
../../nan/nan.h:684:63: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
684 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
685 | idle_time_in_ms * 0.001);
| ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/mario/.cache/node-gyp/20.2.0/include/node/v8-initialization.h:13,
from /home/mario/.cache/node-gyp/20.2.0/include/node/v8.h:34,
from /home/mario/.cache/node-gyp/20.2.0/include/node/node.h:73,
from ../../nan/nan.h:58:
/home/mario/.cache/node-gyp/20.2.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local, v8::Local, GetterCallback, SetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, imp::Sig)’:
../../nan/nan.h:2544:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local&, void (*&)(v8::Local, const v8::PropertyCallbackInfo&), void (*&)(v8::Local, v8::Local, const v8::PropertyCallbackInfo&), v8::Local&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)’
2544 | tpl->SetAccessor(
| ~~~~~~~~~~~~~~~~^
2545 | name
| ~~~~
2546 | , getter_
| ~~~~~~~~~
2547 | , setter_
| ~~~~~~~~~
2548 | , obj
| ~~~~~
2549 | , settings
| ~~~~~~~~~~
2550 | , attribute
| ~~~~~~~~~~~
2551 | , signature);
| ~~~~~~~~~~~~
In file included from /home/mario/.cache/node-gyp/20.2.0/include/node/v8-function.h:15,
from /home/mario/.cache/node-gyp/20.2.0/include/node/v8.h:33:
/home/mario/.cache/node-gyp/20.2.0/include/node/v8-template.h:809:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
809 | void SetAccessor(
| ^~~~~~~~~~~
/home/mario/.cache/node-gyp/20.2.0/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mario/.cache/node-gyp/20.2.0/include/node/v8-template.h:816:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
816 | void SetAccessor(
| ^~~~~~~~~~~
/home/mario/.cache/node-gyp/20.2.0/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:284:80: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
284 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:320:80: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
320 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cpp: At global scope:
/home/mario/.cache/node-gyp/20.2.0/include/node/node.h:1156:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local, v8::Local, void*)’} [-Wcast-function-type]
1156 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mario/.cache/node-gyp/20.2.0/include/node/node.h:1190:3: note: in expansion of macro ‘NODE_MODULE_X’
1190 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
358 | NODE_MODULE(binding, RegisterModule);
| ^~~~~~~~~~~
```
__Expected behavior:__
Compile without error.

__Actual behavior:__
Compilation Aborte with error.

__Environment info:__

* Chronograf version: 1.10.1
* Other relevant environment details: Linux, Gentoo,x86_64-pc-linux-gnu-g++ (Gentoo 12.2.1_p20230428-r1 p2) 12.2.1 20230428

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with make in the chronograf-1.10.1 source tree using Node 20.2.0, then inspect src/binding.cpp and the referenced nan/nan.h and nan_callbacks.h files alongside the V8 headers. Done means the native binding compiles successfully on the reported Gentoo toolchain without the AccessorSignature or SetAccessor errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.