Closed Prinzhorn closed 3 weeks ago
Looks like AccessorGetterCallback
has finally been removed from the api after having been marked as deprecated for some years now.
You can give it a try and change the c++ Standard from c++17 to c++ 20.
Also change the macro NODE_GETTER within macros.lzz from
#define NODE_GETTER(name) static void name(v8::Local<v8::String> _, const v8::PropertyCallbackInfo<v8::Value>& info)
to
#define NODE_GETTER(name) static void name(v8::Local<v8::Name> _, const v8::PropertyCallbackInfo<v8::Value>& info)
Also within macros.lzz replace AccessorGetterCallback
with AccessorNameGetterCallback
(2 occurrences).
With all your changes what's left is
/src/util/macros.lzz:169:28: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessor’
Oh, yes. You might also replace SetAccessor
with SetNativeDataProperty
within macros.lzz.
It does indeed compile, thanks! Will you provide a PR in the future?
I actually already created a branch in my fork repo. But there are issues with setting c++20 option within the Ubuntu container, as it is not known by the used GCC / G++ version but named c++2a instead. Need to figure out how to adjust the build.yml and / or the bindings.gyp.
Fun fact I'm on Ubuntu (23.10), so I assume it's because the container is just outdated?
$ gcc --version
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
That seems to be the case. The runner-image documentation states that gcc 9.3.0 is preinstalled, which does not yet support the c++20 option. But newer versions already replaced the c++2a version with c++20, so using c++2a would cause issues :-/.
Well, the GCC and G++ where available within the Ubuntu 20 repo. I opened up a pull request.
Thanks for the PR, @neoxpert ! #1226 just got merged.
It's still in beta but I just happened to try to compile better-sqlite3. We're also not alone, e.g. https://github.com/xmppo/node-expat/issues/230