Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

[email protected]: compilation failed #127

Open
vladimiry opened this issue Oct 22, 2019 · 12 comments
Open

[email protected]: compilation failed #127

vladimiry opened this issue Oct 22, 2019 · 12 comments

Comments

@vladimiry
Copy link

  ⨯ cannot execute  cause=exit status 1
                    out=$ node-gyp rebuild
    make: Entering directory '/home/dev/_github/electron-mail/node_modules/spellchecker/build'
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/dictmgr.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/filemgr.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hashmgr.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunspell.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/hunzip.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/phonet.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/replist.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/suggestmgr.o
      CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/parsers/textparser.o
      AR(target) Release/obj.target/hunspell.a
      COPY Release/hunspell.a
      CXX(target) Release/obj.target/spellchecker/src/main.o
    make: Leaving directory '/home/dev/_github/electron-mail/node_modules/spellchecker/build'
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    
                    errorOut=gyp info it worked if it ends with ok
    gyp info using [email protected]
    gyp info using [email protected] | linux | x64
    gyp info find Python using Python version 2.7.16 found at "/usr/bin/python2"
    gyp info spawn /usr/bin/python2
    gyp info spawn args [
    gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args   'binding.gyp',
    gyp info spawn args   '-f',
    gyp info spawn args   'make',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/dev/_github/electron-mail/node_modules/spellchecker/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/dev/.electron-gyp/7.0.0/include/node/common.gypi',
    gyp info spawn args   '-Dlibrary=shared_library',
    gyp info spawn args   '-Dvisibility=default',
    gyp info spawn args   '-Dnode_root_dir=/home/dev/.electron-gyp/7.0.0',
    gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/home/dev/.electron-gyp/7.0.0/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/home/dev/_github/electron-mail/node_modules/spellchecker',
    gyp info spawn args   '-Dnode_engine=v8',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.'
    gyp info spawn args ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:
    ../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
       30 |   struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
          |                                                                                                         ^~~~
    ../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
       93 |   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
          |                                                                                                                  ^~~~
    ../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int PfxEntry::test_condition(const char*)’:
    ../vendor/hunspell/src/hunspell/affentry.cxx:113:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      113 |          case '.': if (!pos) { // dots are not metacharacters in groups: [.]
          |                    ^~
    ../vendor/hunspell/src/hunspell/affentry.cxx:120:5: note: here
      120 |     default: {
          |     ^~~~~~~
    ../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
    ../vendor/hunspell/src/hunspell/affentry.cxx:501:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      501 |         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
          |                   ^~
    ../vendor/hunspell/src/hunspell/affentry.cxx:516:5: note: here
      516 |     default: {
          |     ^~~~~~~
    In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:
    ../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
       30 |   struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
          |                                                                                                         ^~~~
    ../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
       93 |   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
          |                                                                                                                  ^~~~
    ../vendor/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::parse_convtable(char*, FileMgr*, RepList**, const char*)’:
    ../vendor/hunspell/src/hunspell/affixmgr.cxx:3654:58: warning: argument to ‘sizeof’ in ‘int strncmp(const char*, const char*, size_t)’ call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
     3654 |                              if (strncmp(piece, keyword, sizeof(keyword)) != 0) {
          |                                                          ^~~~~~~~~~~~~~~
    ../vendor/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::encodeit(affentry&, char*)’:
    ../vendor/hunspell/src/hunspell/affixmgr.cxx:1075:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 20 equals destination size [-Wstringop-truncation]
     1075 |     strncpy(entry.c.conds, cs, MAXCONDLEN);
          |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘void strlinecat(char*, const char*)’:
    ../vendor/hunspell/src/hunspell/csutil.cxx:411:24: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
      411 |                 strncpy(dest, s, len);
          |                 ~~~~~~~^~~~~~~~~~~~~~
    ../vendor/hunspell/src/hunspell/csutil.cxx:407:21: note: length computed here
      407 |     int len = strlen(s);
          |               ~~~~~~^~~
    ../vendor/hunspell/src/hunspell/csutil.cxx: In function ‘char* mystrrep(char*, const char*, const char*)’:
    ../vendor/hunspell/src/hunspell/csutil.cxx:567:16: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
      567 |         strncpy(pos, rep, replen);
          |         ~~~~~~~^~~~~~~~~~~~~~~~~~
    ../vendor/hunspell/src/hunspell/csutil.cxx:552:26: note: length computed here
      552 |       int replen = strlen(rep);
          |                    ~~~~~~^~~~~
    ../vendor/hunspell/src/hunspell/dictmgr.cxx: In member function ‘int DictMgr::parse_file(const char*, const char*)’:
    ../vendor/hunspell/src/hunspell/dictmgr.cxx:102:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
      102 |                        pdict->region=NULL;
          |                                     ^
    ../vendor/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
      103 |                     case 2: //deliberate fallthrough
          |                     ^~~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::spell(const char*, int*, char**)’:
    ../vendor/hunspell/src/hunspell/hunspell.cxx:369:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      369 |             *info += SPELL_ORIGCAP;
    ../vendor/hunspell/src/hunspell/hunspell.cxx:370:6: note: here
      370 |      case NOCAP: {
          |      ^~~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx:439:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
      439 |             }
          |             ^
    ../vendor/hunspell/src/hunspell/hunspell.cxx:441:6: note: here
      441 |      case INITCAP: {
          |      ^~~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char***, const char*)’:
    ../vendor/hunspell/src/hunspell/hunspell.cxx:741:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
      741 |                     capwords = 1;
          |                     ~~~~~~~~~^~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx:742:6: note: here
      742 |      case HUHCAP: {
          |      ^~~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx:865:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      865 |               capwords = 1;
          |               ~~~~~~~~~^~~
    ../vendor/hunspell/src/hunspell/hunspell.cxx:866:11: note: here
      866 |           case HUHCAP: {
          |           ^~~~
    ../vendor/hunspell/src/hunspell/suggestmgr.cxx: In member function ‘char* SuggestMgr::suggest_gen(char**, int, char*)’:
    ../vendor/hunspell/src/hunspell/suggestmgr.cxx:1723:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
     1723 |     strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN);
          |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/v8-internal.h:14,
                     from /home/dev/.electron-gyp/7.0.0/include/node/v8.h:27,
                     from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8config.h:343:49: warning: ‘v8::MicrotasksCompletedCallback’ is deprecated: Use *WithData version. [-Wdeprecated-declarations]
      343 |   declarator __attribute__((deprecated(message)))
          |                                                 ^
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:8513:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
     8513 |   V8_DEPRECATE_SOON("Use *WithData version.",
          |   ^~~~~~~~~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:6919:34: note: declared here
     6919 |                   typedef void (*MicrotasksCompletedCallback)(Isolate*));
          |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8config.h:343:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
      343 |   declarator __attribute__((deprecated(message)))
          |   ^~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8config.h:343:49: warning: ‘v8::MicrotasksCompletedCallback’ is deprecated: Use *WithData version. [-Wdeprecated-declarations]
      343 |   declarator __attribute__((deprecated(message)))
          |                                                 ^
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:8522:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’
     8522 |   V8_DEPRECATE_SOON("Use *WithData version.",
          |   ^~~~~~~~~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:6919:34: note: declared here
     6919 |                   typedef void (*MicrotasksCompletedCallback)(Isolate*));
          |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8config.h:343:3: note: in definition of macro ‘V8_DEPRECATE_SOON’
      343 |   declarator __attribute__((deprecated(message)))
          |   ^~~~~~~~~~
    In file included from ../src/main.cc:3:
    ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
    ../../nan/nan.h:2298:62: 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]
     2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
          |                                                              ^
    ../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::CheckSpelling(Nan::NAN_METHOD_ARGS_TYPE)’:
    ../src/main.cc:137:89: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
      137 |       misspelled_range->Set(Nan::New("start").ToLocalChecked(), Nan::New<Integer>(start));
          |                                                                                         ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    ../src/main.cc:138:85: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
      138 |       misspelled_range->Set(Nan::New("end").ToLocalChecked(), Nan::New<Integer>(end));
          |                                                                                     ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    ../src/main.cc:139:42: error: no matching function for call to ‘v8::Array::Set(size_t&, v8::Local<v8::Object>&)’
      139 |       result->Set(index, misspelled_range);
          |                                          ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    ../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetAvailableDictionaries(Nan::NAN_METHOD_ARGS_TYPE)’:
    ../src/main.cc:223:73: error: no matching function for call to ‘v8::Array::Set(size_t&, v8::Local<v8::String>)’
      223 |       result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
          |                                                                         ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    ../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::GetCorrectionsForMisspelling(Nan::NAN_METHOD_ARGS_TYPE)’:
    ../src/main.cc:249:42: error: no matching function for call to ‘v8::Array::Set(size_t&, v8::Local<v8::String>)’
      249 |       result->Set(i, val.ToLocalChecked());
          |                                          ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    ../src/main.cc: In static member function ‘static void {anonymous}::Spellchecker::Init(v8::Local<v8::Object>)’:
    ../src/main.cc:289:103: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::Function>)’
      289 |     exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction(context).ToLocalChecked());
          |                                                                                                       ^
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
     3455 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3455:37: note:   candidate expects 3 arguments, 2 provided
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
     3458 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
          |                                     ^~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:3458:37: note:   candidate expects 3 arguments, 2 provided
    In file included from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    ../src/main.cc: At global scope:
    /home/dev/.electron-gyp/7.0.0/include/node/node.h:572:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
      572 |       (node::addon_register_func) (regfunc),                          \
          |                                           ^
    /home/dev/.electron-gyp/7.0.0/include/node/node.h:606:3: note: in expansion of macro ‘NODE_MODULE_X’
      606 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
          |   ^~~~~~~~~~~~~
    ../src/main.cc:299:1: note: in expansion of macro ‘NODE_MODULE’
      299 | NODE_MODULE(spellchecker, Init)
          | ^~~~~~~~~~~
    In file included from /home/dev/.electron-gyp/7.0.0/include/node/node.h:63,
                     from ../../nan/nan.h:54,
                     from ../src/main.cc:3:
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
    /home/dev/.electron-gyp/7.0.0/include/node/node_object_wrap.h:84:78:   required from here
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:10141:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
    10141 |                reinterpret_cast<Callback>(callback), type);
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
    ../../nan/nan_object_wrap.h:65:61:   required from here
    /home/dev/.electron-gyp/7.0.0/include/node/v8.h:10141:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
    make: *** [spellchecker.target.mk:118: Release/obj.target/spellchecker/src/main.o] Error 1
@rsese
Copy link

rsese commented Oct 23, 2019

Like #112 related to Electron 5, we mentioned in #112 (comment) that we're behind on Electron versions (the latest Atom beta 1.42.0-beta0 is on Electron 4.2.7) so this isn't something we'll likely get to in the near term but may be open to reviewing a well-written pull request in the future.

@vladimiry
Copy link
Author

I'm kindly pinging @goddessfreya who has handled seems to be a similar issue before. I also hope some big players / for-profit companies that use this module could jump into the issue.

@goddessfreya
Copy link
Contributor

goddessfreya commented Oct 24, 2019

@vladimiry Not the prettiest fixes, but here they are: #128

Now npm build . works. I don't really use this package (or anything node related), and I'm pretty busy currently, so unfortunately I'm unwilling to commit the time to refactor the codebase.

EDIT: Apparently I wrote the patch accidentally against an older version of this package that didn't have V8_MAJOR_VERSION in use. Luckily the patch still applies, but the maintainer should probably still wrap my changes if an #if guard like the other similar changes.

@vladimiry
Copy link
Author

vladimiry commented Oct 24, 2019

@goddessfreya your changes made the module compilable and working with Electron v7 (which comes with node v12.8.1). Thanks a lot, especially given the fact that you don't really use anything node related and this module in particular.

The issue remains open until the fix lands onto the master branch.

vladimiry added a commit to vladimiry/ElectronMail that referenced this issue Nov 20, 2019
* TODO (switch back to upstream "node-spellchecker") atom/node-spellchecker#127
* TODO (blocker) electron/electron#20700
* TODO (blocker @electron v8) electron/electron#21154
@vladimiry
Copy link
Author

See #130 PR if interested in working with 7/8/9 @electron version.

@ghost
Copy link

ghost commented Jan 21, 2020

@nathansobo any chance that new minor version can be released soon with provided PR? It's blocking many of us to update on electron 7 and test electron beta 8. Thanks in advance.

@dziudek
Copy link

dziudek commented Jan 21, 2020

@cumajkeee - please remember that Electron 8 introduces a native spellchecker support so such libraries won't be necessary :) But at this moment spellchecker works up to beta.4 - later versions have some problems: electron/electron#21798

@ghost
Copy link

ghost commented Jan 21, 2020

@dziudek thanks for the note, wasn't aware of those changes. But still would like to integrate v7.

@astoilkov
Copy link

@cumajkeee Note that Electron 8 brings native spellchecker support but doesn't provide a custom API which means a custom editor implementation can't be used with the new Electron API.

@vladimiry
Copy link
Author

vladimiry commented Jan 21, 2020

@dziudek, in my opinion, at least a few major Electron releases should be published until the chromium-builtin/native spellchecker gets stabilized in Electron. In my experience, spellchecking is a sensitive topic if it comes to multi-OS and different Linux package formats support (Snap packages, for example, quite often require special treatment). There also might be a need for flexibilities mentioned by @astoilkov in the previous message. Besides that, new Electron versions, unfortunately, quite often come with broken working before things, sometimes broken severely, but the node-spellchecker module works quite well (if you know how to properly set up it for multi-OS and multi-package types case). Referencing related issue.

@cumajkeee just fork the https://github.com/goddessfreya/node-spellchecker (see #130) to your GitHub profile and then reference it in packages.json like instead of using the upstream/NPM module. But in this case, you better remove the prebuilds and force rebuilding from sources.

PS changed @nathansobo => @cumajkeee

@kpcyrd
Copy link

kpcyrd commented Jul 3, 2020

Are there any updates with this? We currently have to cherry-pick a specific commit of node-spellchecker to build signal-desktop for Arch Linux. :)

@vladimiry
Copy link
Author

vladimiry commented Dec 14, 2020

@kpcyrd, working version available in #130. Btw there were recent commits https://github.com/atom/node-spellchecker/commits/master so maybe it's already working. I still use the @goddessfreya fork.

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

No branches or pull requests

6 participants