romgrk / node-gtk

GTK+ bindings for NodeJS (via GObject introspection)
MIT License
494 stars 41 forks source link

Build error #296

Closed gavr123456789 closed 3 years ago

gavr123456789 commented 3 years ago

distro: Arch
node: v16.2.0
node-pre-gyp: v0.17.0 installed from AUR

> npm install node-gtk
npm ERR! code 1
npm ERR! path /home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk
npm ERR! command failed
npm ERR! command sh -c if [ "$(uname)" = "Darwin" ] && [ "$(which brew)" != "" ]; then export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig; fi; node-pre-gyp install --fallback-to-build
npm ERR! make: вход в каталог «/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/build»
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/async_call_environment.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/async_call_wrapper.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/boxed.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/callback.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/closure.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/debug.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/error.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/function.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/gi.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/gobject.o
npm ERR!   CXX(target) Release/obj.target/node_gtk/src/loop.o
npm ERR! make: выход из каталога «/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/build»
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64/node_gtk.node --module_name=node_gtk --module_path=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.3
npm ERR! node-pre-gyp info using node@16.2.0 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64/node_gtk.node" (not found)
npm ERR! node-pre-gyp http GET https://node-gtk-1.s3.amazonaws.com/node_gtk/v0.7.0/node_gtk-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://node-gtk-1.s3.amazonaws.com/node_gtk/v0.7.0/node_gtk-node-v93-linux-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for node-gtk@0.7.0 and node@16.2.0 (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 403 Forbidden on https://node-gtk-1.s3.amazonaws.com/node_gtk/v0.7.0/node_gtk-node-v93-linux-x64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.0.0
npm ERR! gyp info using node@16.2.0 | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.0.0
npm ERR! gyp info using node@16.2.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
npm ERR! (node:28212) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/gavr/.cache/node-gyp/16.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/gavr/.cache/node-gyp/16.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/gavr/.cache/node-gyp/16.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.0.0
npm ERR! gyp info using node@16.2.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../../nan/nan.h:2790,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/boxed.cc:5:
npm ERR! ../../nan/nan_weak.h: В конкретизации «Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = GNodeJS::Boxed; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<GNodeJS::Boxed>&)]»:
npm ERR! ../../nan/nan_weak.h:264:12:   требуемый из «void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = GNodeJS::Boxed; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<GNodeJS::Boxed>&); Nan::WeakCallbackType = v8::WeakCallbackType]»
npm ERR! ../src/boxed.cc:243:29:   required from here
npm ERR! ../../nan/nan_weak.h:58:16: предупреждение: «void* memcpy(void*, const void*, size_t)» writing to an object of type «class v8::Persistent<v8::Value>» with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
npm ERR!    58 |     std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
npm ERR!       |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /home/gavr/.cache/node-gyp/16.2.0/include/node/node.h:63,
npm ERR!                  from ../../nan/nan.h:56,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/boxed.cc:5:
npm ERR! /home/gavr/.cache/node-gyp/16.2.0/include/node/v8.h:667:35: замечание: «class v8::Persistent<v8::Value>» declared here
npm ERR!   667 | template <class T, class M> class Persistent : public PersistentBase<T> {
npm ERR!       |                                   ^~~~~~~~~~
npm ERR! ../src/closure.cc: В статической функции-члене «static void GNodeJS::Closure::Execute(GICallableInfo*, guint, const Nan::Persistent<v8::Function>&, GValue*, uint, const GValue*)»:
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::signal_name» [-Wmissing-field-initializers]
npm ERR!    42 |     GSignalQuery signal_query = { 0, };
npm ERR!       |                                      ^
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::itype» [-Wmissing-field-initializers]
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::signal_flags» [-Wmissing-field-initializers]
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::return_type» [-Wmissing-field-initializers]
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::n_params» [-Wmissing-field-initializers]
npm ERR! ../src/closure.cc:42:38: предупреждение: отсутствует инициализатор для элемента «_GSignalQuery::param_types» [-Wmissing-field-initializers]
npm ERR! ../src/gobject.cc: В функции «void GNodeJS::ObjectClass::ClassInit(void*, void*)»:
npm ERR! ../src/gobject.cc:724:11: предупреждение: неиспользуемая переменная «gtype» [-Wunused-variable]
npm ERR!   724 |     GType gtype = G_OBJECT_CLASS_TYPE(klass);
npm ERR!       |           ^~~~~
npm ERR! ../src/gobject.cc: В функции «Nan::NAN_METHOD_RETURN_TYPE GNodeJS::ObjectClass::RegisterClass(Nan::NAN_METHOD_ARGS_TYPE)»:
npm ERR! ../src/gobject.cc:820:10: предупреждение: переменная «jsKlass» определена, но не используется [-Wunused-but-set-variable]
npm ERR!   820 |     auto jsKlass      = info[1].As<Object>();
npm ERR!       |          ^~~~~~~
npm ERR! ../src/gobject.cc:822:10: предупреждение: переменная «jsParent» определена, но не используется [-Wunused-but-set-variable]
npm ERR!   822 |     auto jsParent     = info[3].As<Object>();
npm ERR!       |          ^~~~~~~~
npm ERR! In file included from ../../nan/nan.h:2790,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/gobject.cc:4:
npm ERR! ../../nan/nan_weak.h: В конкретизации «Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = _GObject; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<_GObject>&)]»:
npm ERR! ../../nan/nan_weak.h:264:12:   требуемый из «void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = _GObject; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<_GObject>&); Nan::WeakCallbackType = v8::WeakCallbackType]»
npm ERR! ../src/gobject.cc:106:29:   required from here
npm ERR! ../../nan/nan_weak.h:58:16: предупреждение: «void* memcpy(void*, const void*, size_t)» writing to an object of type «class v8::Persistent<v8::Value>» with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
npm ERR!    58 |     std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
npm ERR!       |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /home/gavr/.cache/node-gyp/16.2.0/include/node/node.h:63,
npm ERR!                  from ../../nan/nan.h:56,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/gobject.cc:4:
npm ERR! /home/gavr/.cache/node-gyp/16.2.0/include/node/v8.h:667:35: замечание: «class v8::Persistent<v8::Value>» declared here
npm ERR!   667 | template <class T, class M> class Persistent : public PersistentBase<T> {
npm ERR!       |                                   ^~~~~~~~~~
npm ERR! In file included from ../../nan/nan.h:2790,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/gobject.cc:4:
npm ERR! ../../nan/nan_weak.h: В конкретизации «Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = long unsigned int; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<long unsigned int>&)]»:
npm ERR! ../../nan/nan_weak.h:264:12:   требуемый из «void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = long unsigned int; T = v8::FunctionTemplate; M = v8::NonCopyablePersistentTraits<v8::FunctionTemplate>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<long unsigned int>&); Nan::WeakCallbackType = v8::WeakCallbackType]»
npm ERR! ../src/gobject.cc:571:27:   required from here
npm ERR! ../../nan/nan_weak.h:58:16: предупреждение: «void* memcpy(void*, const void*, size_t)» writing to an object of type «class v8::Persistent<v8::Value>» with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
npm ERR!    58 |     std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
npm ERR!       |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /home/gavr/.cache/node-gyp/16.2.0/include/node/node.h:63,
npm ERR!                  from ../../nan/nan.h:56,
npm ERR!                  from ../src/boxed.h:4,
npm ERR!                  from ../src/gobject.cc:4:
npm ERR! /home/gavr/.cache/node-gyp/16.2.0/include/node/v8.h:667:35: замечание: «class v8::Persistent<v8::Value>» declared here
npm ERR!   667 | template <class T, class M> class Persistent : public PersistentBase<T> {
npm ERR!       |                                   ^~~~~~~~~~
npm ERR! ../src/gobject.cc: На глобальном уровне:
npm ERR! ../src/gobject.cc:720:13: предупреждение: «void GNodeJS::ObjectClass::ClassGetProperty(GObject*, unsigned int, GValue*, GParamSpec*)» определена, но не используется [-Wunused-function]
npm ERR!   720 | static void ClassGetProperty(GObject* object, unsigned id, GValue* value, GParamSpec* pspec) {}
npm ERR!       |             ^~~~~~~~~~~~~~~~
npm ERR! ../src/gobject.cc:719:13: предупреждение: «void GNodeJS::ObjectClass::ClassSetProperty(GObject*, unsigned int, const GValue*, GParamSpec*)» определена, но не используется [-Wunused-function]
npm ERR!   719 | static void ClassSetProperty(GObject* object, unsigned id, const GValue* value, GParamSpec* pspec) {}
npm ERR!       |             ^~~~~~~~~~~~~~~~
npm ERR! ../src/loop.cc: В функции «void GNodeJS::CallMicrotaskHandlers()»:
npm ERR! ../src/loop.cc:136:28: ошибка: «class v8::Isolate» не содержит элемента с именем «RunMicrotasks»
npm ERR!   136 |     Isolate::GetCurrent()->RunMicrotasks();
npm ERR!       |                            ^~~~~~~~~~~~~
npm ERR! make: *** [node_gtk.target.mk:142: Release/obj.target/node_gtk/src/loop.o] Ошибка 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.12.4-arch1-2
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64/node_gtk.node" "--module_name=node_gtk" "--module_path=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v8.0.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64/node_gtk.node --module_name=node_gtk --module_path=/home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/gavr/Projects/TS/node-gtk-template-master/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.12.4-arch1-2
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/gavr/Projects/TS/node-gtk-template-master/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/gavr/Projects/TS/node-gtk-template-master/node_modules/node-gtk
npm ERR! node-pre-gyp ERR! node -v v16.2.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.3
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gavr/.npm/_logs/2021-05-25T21_18_15_463Z-debug.log
romgrk commented 3 years ago

297 will fix it. There are some build issues with GHA at the moment, once I get that fixed I'll release a new version to npm. Meanwhile use nodejs < 16 as a workaround.

romgrk commented 3 years ago

The PR has been merged and 0.9.0 has been released.

You'll need to wait for https://github.com/romgrk/node-gtk/actions/runs/879455168 to complete to have the prebuilt binaries.