electron-spellchecker icon indicating copy to clipboard operation
electron-spellchecker copied to clipboard

Error: `make` failed with exit code: 2

Open yafp opened this issue 6 years ago • 6 comments

I tried installing electron-spellchecker by executing npm install electron-spellchecker --save.

The output is as follows

> @felixrieseberg/[email protected] install /home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker
> node-gyp rebuild

make: Verzeichnis „/home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker/build“ wird betreten
  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: In member function ‘bool hunspell::LineIterator::AdvanceAndCopy(char*, size_t)’:
../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_]);
               ^~~~~
  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:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   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]
   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=]
          case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                    ^~
../vendor/hunspell/src/hunspell/affentry.cxx:120:5: note: here
     default: {
     ^~~~~~~
../vendor/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
../vendor/hunspell/src/hunspell/affentry.cxx:503:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                   ^~
../vendor/hunspell/src/hunspell/affentry.cxx:518:5: note: here
     default: {
     ^~~~~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/affixmgr.o
In file included from ../vendor/hunspell/src/hunspell/affixmgr.cxx:12:0:
../vendor/hunspell/src/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type ‘short unsigned int’ from NULL [-Wconversion-null]
   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]
   struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
                                                                                                                  ^~~~
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/csutil.o
  CXX(target) Release/obj.target/hunspell/vendor/hunspell/src/hunspell/dictmgr.o
../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=]
                        pdict->region=NULL;
                                     ^
../vendor/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
                     case 2: //deliberate fallthrough
                     ^~~~
  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
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::spell(const char*, int*, char**)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:404:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
             *info += SPELL_ORIGCAP;
../vendor/hunspell/src/hunspell/hunspell.cxx:405:6: note: here
      case NOCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:474:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             }
             ^
../vendor/hunspell/src/hunspell/hunspell.cxx:476:6: note: here
      case INITCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char***, const char*)’:
../vendor/hunspell/src/hunspell/hunspell.cxx:786:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
                     capwords = 1;
                     ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:787:6: note: here
      case HUHCAP: {
      ^~~~
../vendor/hunspell/src/hunspell/hunspell.cxx:910:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
               capwords = 1;
               ~~~~~~~~~^~~
../vendor/hunspell/src/hunspell/hunspell.cxx:911:11: note: here
           case HUHCAP: {
           ^~~~
  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
  AR(target) Release/obj.target/hunspell.a
  COPY Release/hunspell.a
  CXX(target) Release/obj.target/spellchecker/src/main.o
../src/main.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Spellchecker::CheckSpelling(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/main.cc:93:79: error: no matching function for call to ‘v8::String::Write(v8::Isolate*, short unsigned int*)’
     string->Write(info.GetIsolate(), reinterpret_cast<uint16_t *>(text.data()));
                                                                               ^
In file included from /home/USER/.cache/node-gyp/8.15.0/include/node/node.h:63:0,
                 from ../../../nan/nan.h:54,
                 from ../src/main.cc:2:
/home/USER/.cache/node-gyp/8.15.0/include/node/v8.h:2576:7: note: candidate: int v8::String::Write(uint16_t*, int, int, int) const
   int Write(uint16_t* buffer,
       ^~~~~
/home/USER/.cache/node-gyp/8.15.0/include/node/v8.h:2576:7: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘uint16_t* {aka short unsigned int*}’
spellchecker.target.mk:117: recipe for target 'Release/obj.target/spellchecker/src/main.o' failed
make: *** [Release/obj.target/spellchecker/src/main.o] Error 1
make: Verzeichnis „/home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker/build“ wird verlassen
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-55-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/USER/PROJECT/node_modules/@felixrieseberg/spellchecker
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=12.0.0"} (current: {"node":"8.15.0","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @felixrieseberg/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @felixrieseberg/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/USER/.npm/_logs/2019-10-29T13_26_52_947Z-debug.log

Host is Ubuntu 18.04 / 64bit.

yafp avatar Oct 29 '19 13:10 yafp

Related to @felixrieseberg's node-spellchecker dependency.

ghost avatar Nov 19 '19 12:11 ghost

Similar issue for us. @felixrieseberg any idea what might be causing this?

etyp avatar Dec 09 '19 22:12 etyp

Also facing a similar issue

Circuit8 avatar Jan 08 '20 12:01 Circuit8

this package is broken and nothing happens :(

matheo avatar Jan 16 '20 00:01 matheo

FYI it looks like Electron itself is going to support spell checking with the release of version 8 which is currently in beta.

Circuit8 avatar Jan 16 '20 12:01 Circuit8

Facing this same issue, How can we fix this ?

vineetvk01 avatar Mar 06 '20 21:03 vineetvk01