Skip to content

Unable to compile for electron@5.0.0-beta.2 #132

@vrbsm

Description

@vrbsm

Hi @paulcbetts
When I try to execute:
./node_modules/.bin/electron-rebuild
I saw this error:
✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/Documents/Projetos/demo/test-1/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   '/Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/spellchecker/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/.electron-gyp/5.0.0-beta.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/.electron-gyp/5.0.0-beta.2',
gyp info spawn args   '-Dnode_gyp_dir=/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/.electron-gyp/5.0.0-beta.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/md5.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string_piece.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict_reader.o
../vendor/hunspell/src/google/bdict_reader.cc:670:15: warning: unused variable 'begin' [-Wunused-variable]
  const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
              ^
1 warning generated.
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
                                                                                                      ~ ^~~~
                                                                                                        0
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                               ~ ^~~~
                                                                                                                 0
../vendor/hunspell/src/hunspell/affentry.cxx:546:57: warning: while loop has empty body [-Wempty-body]
                        while (p && *p != ']' && ((p = nextchar(p)) != NULL));
                                                                             ^
../vendor/hunspell/src/hunspell/affentry.cxx:546:57: note: put the semicolon on a separate line to silence this warning
3 warnings generated.
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
                                                                                                      ~ ^~~~
                                                                                                        0
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                               ~ ^~~~
                                                                                                                 0
2 warnings generated.
  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
In file included from ../vendor/hunspell/src/hunspell/hashmgr.cxx:9:
../vendor/hunspell/src/hunspell/hashmgr.hxx:32:21: warning: private field 'userword' is not used [-Wunused-private-field]
  int               userword;
                    ^
1 warning generated.
  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
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string16.o
  LIBTOOL-STATIC Release/hunspell.a
  CXX(target) Release/obj.target/spellchecker/src/main.o
In file included from ../src/main.cc:2:
In file included from ../../../nan/nan.h:222:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
           ^
<scratch space>:145:1: note: expanded from here
ToBoolean
^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2408:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("ToBoolean can never throw. Use Local version.",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/main.cc:2:
In file included from ../../../nan/nan.h:222:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
              ^
<scratch space>:152:1: note: expanded from here
BooleanValue
^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2453:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:187:20: error: no template named 'Handle'
  static void Init(Handle<Object> exports) {
                   ^
../src/main.cc:43:29: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string language = *String::Utf8Value(info[0]);
                            ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:64:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:75:5: error: use of undeclared identifier 'Handle'; did you mean 'handle'?
    Handle<String> string = Handle<String>::Cast(info[0]);
    ^~~~~~
    handle
../../../nan/nan_object_wrap.h:42:32: note: 'handle' declared here
  inline v8::Local<v8::Object> handle() const {
                               ^
../src/main.cc:75:5: error: call to non-static member function without an object argument
    Handle<String> string = Handle<String>::Cast(info[0]);
    ^~~~~~
../src/main.cc:75:12: error: 'String' does not refer to a value
    Handle<String> string = Handle<String>::Cast(info[0]);
           ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2557:17: note: declared here
class V8_EXPORT String : public Name {
                ^
../src/main.cc:75:20: error: use of undeclared identifier 'string'
    Handle<String> string = Handle<String>::Cast(info[0]);
                   ^
../src/main.cc:75:36: error: 'String' does not refer to a value
    Handle<String> string = Handle<String>::Cast(info[0]);
                                   ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2557:17: note: declared here
class V8_EXPORT String : public Name {
                ^
../src/main.cc:75:29: error: use of undeclared identifier 'Handle'
    Handle<String> string = Handle<String>::Cast(info[0]);
                            ^
../src/main.cc:75:45: error: no member named 'Cast' in the global namespace; did you mean 'Just'?
    Handle<String> string = Handle<String>::Cast(info[0]);
                                          ~~^~~~
                                            Just
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:8766:19: note: 'Just' declared here
  friend Maybe<U> Just(const U& u);
                  ^
../src/main.cc:76:10: error: use of undeclared identifier 'string'
    if (!string->IsString()) {
         ^
../src/main.cc:83:9: error: use of undeclared identifier 'string'
    if (string->Length() == 0) {
        ^
../src/main.cc:87:32: error: use of undeclared identifier 'string'
    std::vector<uint16_t> text(string->Length() + 1);
                               ^
../src/main.cc:88:5: error: use of undeclared identifier 'string'
    string->Write(reinterpret_cast<uint16_t *>(text.data()));
    ^
../src/main.cc:99:25: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      misspelled_range->Set(Nan::New("start").ToLocalChecked(), Nan::New<Integer>(start));
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3280:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:100:25: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      misspelled_range->Set(Nan::New("end").ToLocalChecked(), Nan::New<Integer>(end));
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3280:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:101:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(index, misspelled_range);
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:112:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:125:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:139:27: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
      std::string path = *String::Utf8Value(info[0]);
                          ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:148:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:162:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:171:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(i, val.ToLocalChecked());
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:201:66: warning: 'GetFunction' is deprecated: Use maybe version [-Wdeprecated-declarations]
    exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction());
                                                                 ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:5790:3: note: 'GetFunction' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Function> GetFunction());
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:205:6: error: variable has incomplete type 'void'
void Init(Handle<Object> exports, Handle<Object> module) {
     ^
../src/main.cc:205:18: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                 ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3278:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/main.cc:205:11: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
          ^
../src/main.cc:205:26: error: use of undeclared identifier 'exports'
void Init(Handle<Object> exports, Handle<Object> module) {
                         ^
../src/main.cc:205:42: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                                         ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3278:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/main.cc:205:35: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
                                  ^
../src/main.cc:205:50: error: use of undeclared identifier 'module'
void Init(Handle<Object> exports, Handle<Object> module) {
                                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
14 warnings and 20 errors generated.
make: *** [Release/obj.target/spellchecker/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/.nvm/versions/node/v10.15.0/bin/node" "/Users/Documents/Projetos/demo/test-1/node_modules/.bin/node-gyp" "rebuild" "--target=5.0.0-beta.2" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/spellchecker
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/Documents/Projetos/demo/test-1/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   '/Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/spellchecker/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/.electron-gyp/5.0.0-beta.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/.electron-gyp/5.0.0-beta.2',
gyp info spawn args   '-Dnode_gyp_dir=/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/.electron-gyp/5.0.0-beta.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/md5.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string_piece.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict_reader.o
../vendor/hunspell/src/google/bdict_reader.cc:670:15: warning: unused variable 'begin' [-Wunused-variable]
  const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
              ^
1 warning generated.
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/google/bdict.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affentry.o
In file included from ../vendor/hunspell/src/hunspell/affentry.cxx:9:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
                                                                                                      ~ ^~~~
                                                                                                        0
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                               ~ ^~~~
                                                                                                                 0
../vendor/hunspell/src/hunspell/affentry.cxx:546:57: warning: while loop has empty body [-Wempty-body]
                        while (p && *p != ']' && ((p = nextchar(p)) != NULL));
                                                                             ^
../vendor/hunspell/src/hunspell/affentry.cxx:546:57: note: put the semicolon on a separate line to silence this warning
3 warnings generated.
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
                                                                                                      ~ ^~~~
                                                                                                        0
../vendor/hunspell/src/hunspell/affentry.hxx:93:114: warning: implicit conversion of NULL constant to 'unsigned short' [-Wnull-conversion]
  struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                               ~ ^~~~
                                                                                                                 0
2 warnings generated.
  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
In file included from ../vendor/hunspell/src/hunspell/hashmgr.cxx:9:
../vendor/hunspell/src/hunspell/hashmgr.hxx:32:21: warning: private field 'userword' is not used [-Wunused-private-field]
  int               userword;
                    ^
1 warning generated.
  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
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/base/strings/string16.o
  LIBTOOL-STATIC Release/hunspell.a
  CXX(target) Release/obj.target/spellchecker/src/main.o
In file included from ../src/main.cc:2:
In file included from ../../../nan/nan.h:222:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
           ^
<scratch space>:145:1: note: expanded from here
ToBoolean
^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2408:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("ToBoolean can never throw. Use Local version.",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/main.cc:2:
In file included from ../../../nan/nan.h:222:
In file included from ../../../nan/nan_converters.h:67:
../../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
              ^
<scratch space>:152:1: note: expanded from here
BooleanValue
^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2453:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:187:20: error: no template named 'Handle'
  static void Init(Handle<Object> exports) {
                   ^
../src/main.cc:43:29: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string language = *String::Utf8Value(info[0]);
                            ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:64:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:75:5: error: use of undeclared identifier 'Handle'; did you mean 'handle'?
    Handle<String> string = Handle<String>::Cast(info[0]);
    ^~~~~~
    handle
../../../nan/nan_object_wrap.h:42:32: note: 'handle' declared here
  inline v8::Local<v8::Object> handle() const {
                               ^
../src/main.cc:75:5: error: call to non-static member function without an object argument
    Handle<String> string = Handle<String>::Cast(info[0]);
    ^~~~~~
../src/main.cc:75:12: error: 'String' does not refer to a value
    Handle<String> string = Handle<String>::Cast(info[0]);
           ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2557:17: note: declared here
class V8_EXPORT String : public Name {
                ^
../src/main.cc:75:20: error: use of undeclared identifier 'string'
    Handle<String> string = Handle<String>::Cast(info[0]);
                   ^
../src/main.cc:75:36: error: 'String' does not refer to a value
    Handle<String> string = Handle<String>::Cast(info[0]);
                                   ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2557:17: note: declared here
class V8_EXPORT String : public Name {
                ^
../src/main.cc:75:29: error: use of undeclared identifier 'Handle'
    Handle<String> string = Handle<String>::Cast(info[0]);
                            ^
../src/main.cc:75:45: error: no member named 'Cast' in the global namespace; did you mean 'Just'?
    Handle<String> string = Handle<String>::Cast(info[0]);
                                          ~~^~~~
                                            Just
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:8766:19: note: 'Just' declared here
  friend Maybe<U> Just(const U& u);
                  ^
../src/main.cc:76:10: error: use of undeclared identifier 'string'
    if (!string->IsString()) {
         ^
../src/main.cc:83:9: error: use of undeclared identifier 'string'
    if (string->Length() == 0) {
        ^
../src/main.cc:87:32: error: use of undeclared identifier 'string'
    std::vector<uint16_t> text(string->Length() + 1);
                               ^
../src/main.cc:88:5: error: use of undeclared identifier 'string'
    string->Write(reinterpret_cast<uint16_t *>(text.data()));
    ^
../src/main.cc:99:25: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      misspelled_range->Set(Nan::New("start").ToLocalChecked(), Nan::New<Integer>(start));
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3280:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:100:25: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      misspelled_range->Set(Nan::New("end").ToLocalChecked(), Nan::New<Integer>(end));
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3280:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:101:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(index, misspelled_range);
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:112:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:125:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:139:27: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
      std::string path = *String::Utf8Value(info[0]);
                          ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:148:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(i, Nan::New(dict.data(), dict.size()).ToLocalChecked());
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:162:25: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
    std::string word = *String::Utf8Value(info[0]);
                        ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:2914:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:171:15: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
      result->Set(i, val.ToLocalChecked());
              ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3285:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:345:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:201:66: warning: 'GetFunction' is deprecated: Use maybe version [-Wdeprecated-declarations]
    exports->Set(Nan::New("Spellchecker").ToLocalChecked(), tpl->GetFunction());
                                                                 ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:5790:3: note: 'GetFunction' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Function> GetFunction());
  ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8config.h:330:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/main.cc:205:6: error: variable has incomplete type 'void'
void Init(Handle<Object> exports, Handle<Object> module) {
     ^
../src/main.cc:205:18: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                 ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3278:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/main.cc:205:11: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
          ^
../src/main.cc:205:26: error: use of undeclared identifier 'exports'
void Init(Handle<Object> exports, Handle<Object> module) {
                         ^
../src/main.cc:205:42: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                                         ^
/Users/.electron-gyp/5.0.0-beta.2/include/node/v8.h:3278:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/main.cc:205:35: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
                                  ^
../src/main.cc:205:50: error: use of undeclared identifier 'module'
void Init(Handle<Object> exports, Handle<Object> module) {
                                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
14 warnings and 20 errors generated.
make: *** [Release/obj.target/spellchecker/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Documents/Projetos/demo/test-1/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/.nvm/versions/node/v10.15.0/bin/node" "/Users/Documents/Projetos/demo/test-1/node_modules/.bin/node-gyp" "rebuild" "--target=5.0.0-beta.2" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/Documents/Projetos/demo/test-1/node_modules/@paulcbetts/spellchecker
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

Failed with exit code: 1
    at SafeSubscriber._error (/Users/Documents/Projetos/demo/test-1/node_modules/spawn-rx/lib/src/index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:207:16)
    at SafeSubscriber.error (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:158:26)
    at Subscriber._error (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:92:26)
    at Subscriber.error (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:72:18)
    at SafeSubscriber._next (/Users/Documents/Projetos/demo/test-1/node_modules/spawn-rx/lib/src/index.js:242:65)
    at SafeSubscriber.__tryOrUnsub (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:207:16)
    at SafeSubscriber.next (/Users/Documents/Projetos/demo/test-1/node_modules/rxjs/internal/Subscriber.js:145:22)

Compiling for electron v4.x.x works just fine

I think this error is related to the https://electronjs.org/blog/nodejs-native-addons-and-electron-5:

Electron 5.0 includes a version of V8 that has finally removed v8::Handle for good, and native Node.js addons that still use it will need to be updated before they can be used with Electron 5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions