Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodehun dependency of spellchecker fails to build with nodejs 10 #304

Closed
onny opened this issue May 19, 2018 · 17 comments
Closed

nodehun dependency of spellchecker fails to build with nodejs 10 #304

onny opened this issue May 19, 2018 · 17 comments
Assignees
Labels
confirmed-bug Issues with confirmed bugs

Comments

@onny
Copy link

onny commented May 19, 2018

Do you want to request a feature or report a bug?
bug

What is the current behavior?
DocumentServer fails to build. It stops with an error when trying to build nodehun nodejs dependency for the spellchecker.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
This error occours only when nodejs 10 or higher is installed and used. So to reproduce it, just run: npm install nodehun (or install custom nodehun from the onlyoffice github repo)

What is the expected behavior?
nodehun compilation should pass also with nodejs 10 or higher.

Did this work in previous versions of DocumentServer?
I dont think so

DocumentServer version:
5.1.3

Operating System:
ArchLinux x64

Logs:
Here are the relevant logs from make:

In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::createNewNodehunFinish(uv_work_t*, int)’:
../src/post0.12.0/nodehun.cpp:92:38: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Handle<v8::Value>*)’
   argv[1] = cons->NewInstance(1, &ext);

and this is the complete log:


> [email protected] install /home/onny/node_modules/nodehun
> node-gyp rebuild

make: Entering directory '/home/onny/node_modules/nodehun/build'
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/affentry.o
In file included from ../src/hunspell/src/hunspell/affentry.cxx:9:
../src/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);
                                                                                                         ^~~~
../src/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);
                                                                                                                  ^~~~
../src/hunspell/src/hunspell/affentry.cxx: In member function ‘int PfxEntry::test_condition(const char*)’:
../src/hunspell/src/hunspell/affentry.cxx:113:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
          case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                    ^~
../src/hunspell/src/hunspell/affentry.cxx:120:5: note: here
     default: {
     ^~~~~~~
../src/hunspell/src/hunspell/affentry.cxx: In member function ‘int SfxEntry::test_condition(const char*, const char*)’:
../src/hunspell/src/hunspell/affentry.cxx:501:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
                   ^~
../src/hunspell/src/hunspell/affentry.cxx:516:5: note: here
     default: {
     ^~~~~~~
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/affixmgr.o
In file included from ../src/hunspell/src/hunspell/affixmgr.cxx:13:
../src/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);
                                                                                                         ^~~~
../src/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);
                                                                                                                  ^~~~
../src/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::parse_convtable(char*, IStrMgr*, RepList**, const char*)’:
../src/hunspell/src/hunspell/affixmgr.cxx:3671: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]
                              if (strncmp(piece, keyword, sizeof(keyword)) != 0) {
                                                          ^~~~~~~~~~~~~~~
../src/hunspell/src/hunspell/affixmgr.cxx: In member function ‘int AffixMgr::encodeit(affentry&, char*)’:
../src/hunspell/src/hunspell/affixmgr.cxx:1092:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 20 equals destination size [-Wstringop-truncation]
     strncpy(entry.c.conds, cs, MAXCONDLEN);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/csutil.o
../src/hunspell/src/hunspell/csutil.cxx: In function ‘void strlinecat(char*, const char*)’:
../src/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]
                 strncpy(dest, s, len);
                 ~~~~~~~^~~~~~~~~~~~~~
../src/hunspell/src/hunspell/csutil.cxx:407:21: note: length computed here
     int len = strlen(s);
               ~~~~~~^~~
../src/hunspell/src/hunspell/csutil.cxx: In function ‘char* mystrrep(char*, const char*, const char*)’:
../src/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]
         strncpy(pos, rep, replen);
         ~~~~~~~^~~~~~~~~~~~~~~~~~
../src/hunspell/src/hunspell/csutil.cxx:552:26: note: length computed here
       int replen = strlen(rep);
                    ~~~~~~^~~~~
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/dictmgr.o
../src/hunspell/src/hunspell/dictmgr.cxx: In member function ‘int DictMgr::parse_file(const char*, const char*)’:
../src/hunspell/src/hunspell/dictmgr.cxx:102:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
                        pdict->region=NULL;
                                     ^
../src/hunspell/src/hunspell/dictmgr.cxx:103:21: note: here
                     case 2: //deliberate fallthrough
                     ^~~~
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/filemgr.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hashmgr.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hunspell.o
../src/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::spell(const char*, int*, char**)’:
../src/hunspell/src/hunspell/hunspell.cxx:378:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
             *info += SPELL_ORIGCAP;
../src/hunspell/src/hunspell/hunspell.cxx:379:6: note: here
      case NOCAP: {
      ^~~~
../src/hunspell/src/hunspell/hunspell.cxx:448:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             }
             ^
../src/hunspell/src/hunspell/hunspell.cxx:450:6: note: here
      case INITCAP: {
      ^~~~
../src/hunspell/src/hunspell/hunspell.cxx: In member function ‘int Hunspell::suggest(char***, const char*)’:
../src/hunspell/src/hunspell/hunspell.cxx:750:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
                     capwords = 1;
                     ~~~~~~~~~^~~
../src/hunspell/src/hunspell/hunspell.cxx:751:6: note: here
      case HUHCAP: {
      ^~~~
../src/hunspell/src/hunspell/hunspell.cxx:874:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
               capwords = 1;
               ~~~~~~~~~^~~
../src/hunspell/src/hunspell/hunspell.cxx:875:11: note: here
           case HUHCAP: {
           ^~~~
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/hunzip.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/phonet.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/replist.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/strmgr.o
  CXX(target) Release/obj.target/hunspell/src/hunspell/src/hunspell/suggestmgr.o
../src/hunspell/src/hunspell/suggestmgr.cxx: In member function ‘char* SuggestMgr::suggest_gen(char**, int, char*)’:
../src/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]
     strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  AR(target) Release/obj.target/src/hunspell/hunspell.a
  COPY Release/hunspell.a
  CXX(target) Release/obj.target/nodehun/src/nodehun.o
../src/nodehun.cpp:5:2: warning: #warning "Nodehun is no longer being actively maintained. Please email [email protected] If you are interested in taking over the project." [-Wcpp]
 #warning "Nodehun is no longer being actively maintained. Please email [email protected] If you are interested in taking over the project."
  ^~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::createNewNodehunFinish(uv_work_t*, int)’:
../src/post0.12.0/nodehun.cpp:92:38: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Handle<v8::Value>*)’
   argv[1] = cons->NewInstance(1, &ext);
                                      ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:3848:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8.h:3848:44: note:   candidate expects 3 arguments, 2 provided
/home/onny/.node-gyp/10.1.0/include/node/v8.h:3851:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8.h:3851:44: note:   candidate expects 1 argument, 2 provided
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::isCorrect(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:165:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       String::Utf8Value arg0(args[0]->ToString());
                                                 ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::isCorrectSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:186:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       String::Utf8Value arg0(args[0]->ToString());
                                                 ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::spellSuggest(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:245:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       String::Utf8Value arg0(args[0]->ToString());
                                                 ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::spellSuggestSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:266:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value arg0(args[0]->ToString());
                                               ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::spellSuggestions(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:301:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       String::Utf8Value arg0(args[0]->ToString());
                                                 ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::spellSuggestionsSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:322:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value arg0(args[0]->ToString());
                                               ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::addRemoveWordInit(const v8::FunctionCallbackInfo<v8::Value>&, bool)’:
../src/post0.12.0/nodehun.cpp:504:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value arg0(args[0]->ToString());
                                               ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::addRemoveWordInitSync(const v8::FunctionCallbackInfo<v8::Value>&, bool)’:
../src/post0.12.0/nodehun.cpp:545:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value arg0(args[0]->ToString());
                                               ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::stem(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:607:53: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       v8::String::Utf8Value arg0(args[0]->ToString());
                                                     ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::stemSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:626:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value arg0(args[0]->ToString());
                                                   ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::generate(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:701:53: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       v8::String::Utf8Value arg0(args[0]->ToString());
                                                     ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp:702:53: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       v8::String::Utf8Value arg1(args[1]->ToString());
                                                     ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::generateSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:722:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value arg0(args[0]->ToString());
                                                   ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp:723:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value arg1(args[1]->ToString());
                                                   ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::analyze(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:790:53: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
       v8::String::Utf8Value arg0(args[0]->ToString());
                                                     ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: In static member function ‘static void Nodehun::SpellDictionary::analyzeSync(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/post0.12.0/nodehun.cpp:809:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value arg0(args[0]->ToString());
                                                   ^
In file included from /home/onny/.node-gyp/10.1.0/include/node/v8.h:26,
                 from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.0/include/node/v8.h:2822:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^~~~~~~~~
/home/onny/.node-gyp/10.1.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
../src/post0.12.0/nodehun.cpp: At global scope:
/home/onny/.node-gyp/10.1.0/include/node/node.h:513:43: warning: cast between incompatible function types from ‘void (*)(v8::Handle<v8::Object>, v8::Handle<v8::Object>)’ {aka ‘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]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/onny/.node-gyp/10.1.0/include/node/node.h:547:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/post0.12.0/nodehun.cpp:860:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(nodehun, Nodehun::SpellDictionary::Init);
 ^~~~~~~~~~~
In file included from /home/onny/.node-gyp/10.1.0/include/node/node.h:63,
                 from ../src/post0.12.0/nodehun.hpp:5,
                 from ../src/post0.12.0/nodehun.cpp:1,
                 from ../src/nodehun.cpp:12:
/home/onny/.node-gyp/10.1.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/onny/.node-gyp/10.1.0/include/node/node_object_wrap.h:85:78:   required from here
/home/onny/.node-gyp/10.1.0/include/node/v8.h:9227: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]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [nodehun.target.mk:102: Release/obj.target/nodehun/src/nodehun.o] Error 1
make: Leaving directory '/home/onny/node_modules/nodehun/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Linux 4.14.0-gnu-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/onny/node_modules/nodehun
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/home/onny/package.json'
npm WARN onny No description
npm WARN onny No repository field.
npm WARN onny No README data
npm WARN onny No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [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/onny/.npm/_logs/2018-05-19T15_07_13_594Z-debug.log

Workaround:
Temporary workaround is downgrading to nodejs 9.X

@Wulf
Copy link

Wulf commented May 20, 2018

Related to nodehun !63.

@Wulf
Copy link

Wulf commented May 20, 2018

This should hopefully be resolved now!

@onny
Copy link
Author

onny commented May 20, 2018

@ onlyoffice dev team: could you please rebase the patches to your custom repo than? https://github.com/ONLYOFFICE/nodehun thanks :D

@Ke1i
Copy link

Ke1i commented May 26, 2018

I guess this is the reason the spellchecker doesn't work in the latest version of ONLYOFFICE-DocumentServer-5.1.4.
Here are some files from /var/log/onlyoffice/documentserver/spellchecker/
err.log
out.log
Running Onlyoffice-DocumentServer on Ubuntu Server 18.04 LTS, Nodejs v8.10.0

@ShockwaveNN ShockwaveNN added the confirmed-bug Issues with confirmed bugs label Jul 19, 2018
@arturlangner
Copy link

Same thing happens on Ubuntu 18.04.1 LTS, node 10.8.0. I worked around by installing node 8 using n lts. Server built fine on node 8.11.4.

@chrispydizzle
Copy link

chrispydizzle commented Sep 2, 2018

This still happens, at least, I ran into this weekend. The package.json for this module is pointing at the github repo for nodehun, which is either broken or out of date. When I change it to the current version that node is hosting (2.0.12) it works just fine. Let me know if you guys want a pull req for it.

@onny
Copy link
Author

onny commented Sep 30, 2018

Bug still present in DocumentServer version 5.2.0

@onny
Copy link
Author

onny commented Nov 10, 2018

Bug still present in DocumentServer version 5.2.3 since the nodehun module fork here https://github.com/ONLYOFFICE/nodehun wasn't yet updated to version 2.0.12

@ShockwaveNN
Copy link
Contributor

@onny yeap, issue is still actual, since upgrading to latest nodehun is not an easy process for us, because we used fork of nodehun.

@ndlrx
Copy link

ndlrx commented Dec 6, 2018

I still get the issue with my Ubuntu 18.04 and the DocumentServer 5.2.3.

I'm installed the DocumentServer with nodejs 8, then rebuilding the spellchecker and it's solved.

now I get an error about the converter, 'Download failed' when trying to edit the office file. When I check th log, it's about ssl handshake error. SO i just upgrade the nodejs to v10, and it's solved.

ps:
I tried using nodejs v9, and get an error about the libcef.so error.

@ShockwaveNN
Copy link
Contributor

I just checked - you can use nodejs 10 after reinstall of node_modules in DocumentServer 5.2.7 and seems everything works fine.
I'll close this issue, but feel free asking any question if any left

@jasle
Copy link

jasle commented Mar 15, 2021

I just tried to build the forked nodehun and it seems to fail with the same error. The upstream nodehun build fine.

> [email protected] install
> node-gyp rebuild

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 3.9.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
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   '/tmp/nodehun/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/jasle/.cache/node-gyp/12.21.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/jasle/.cache/node-gyp/12.21.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/jasle/.cache/node-gyp/12.21.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/tmp/nodehun',
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' ]
make: Entering directory '/tmp/nodehun/build'
  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
  AR(target) Release/obj.target/node_modules/node-addon-api/src/nothing.a
  COPY Release/nothing.a
make: *** No rule to make target 'Release/obj.target/hunspell/src/hunspell/src/hunspell/affentry.o', needed by 'Release/obj.target/src/hunspell.a'.  Stop.
make: Leaving directory '/tmp/nodehun/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.11.2-arch1-1
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/nodehun
gyp ERR! node -v v12.21.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /tmp/nodehun
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild

@ShockwaveNN
Copy link
Contributor

@jasle Try same command with node js v10, since we do not support nodejs v12 currently (we're working on it)
Also please note there is known issues with npm v7, so also use npm v6

@jasle
Copy link

jasle commented Mar 15, 2021

Thanks for the quick reply!
I have also tried running it with node v10.24.0 and npm 6.14.9, but it still fails with the same error message. Building the upstream nodehun works, even with a recent node and npm version.

@ShockwaveNN
Copy link
Contributor

@jasle could you try to build using this Dockerfile and compare dependency version

@jasle
Copy link

jasle commented Mar 16, 2021

@ShockwaveNN tried build server 6.1.1 using the Dockerfile tagged with v6.1.17 and got the same error message.

I am not really sure which tagged version of the Dockerfile should work with which version of the server, should this versions work together?

And thanks again for your awesome support!

@ShockwaveNN
Copy link
Contributor

@jasle Try to build it from master, and I think it's better to create new issue in build_tools repo if build from master failing, since this issue is 3 years old and we're completely change our build process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs
Projects
None yet
Development

No branches or pull requests

9 participants