node-gyp rebuilding failing on macOS 12.3 to make for hunspell with error 127

Viewed 3230

I started facing and error on node-gyp when running make for hunspell which a dependency from the the npm library spellchecker after updating my macOS to 12.3 last week.

No other change related to environment or versions changed, and compilation still work for colleagues of mine:

> spellchecker@3.7.1 install /Users/myuser/projects/project/packages/data/node_modules/spellchecker
> node-gyp rebuild

  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
  LIBTOOL-STATIC Release/hunspell.a
lerna ERR! npm install stderr:
../vendor/hunspell/src/hunspell/affentry.cxx:544:47: warning: while loop has empty body [-Wempty-body]
                        while (p && *p != ']' && (p = nextchar(p)));
                                                                   ^
../vendor/hunspell/src/hunspell/affentry.cxx:544:47: note: put the semicolon on a separate line to silence this warning
1 warning generated.
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
../vendor/hunspell/src/hunspell/affixmgr.cxx:3654:65: warning: 'strncmp' call operates on objects of type 'const char' while the size is based on a different type 'const char *' [-Wsizeof-pointer-memaccess]
                             if (strncmp(piece, keyword, sizeof(keyword)) != 0) {
                                                ~~~~~~~         ^~~~~~~
../vendor/hunspell/src/hunspell/affixmgr.cxx:3654:65: note: did you mean to provide an explicit length?
                             if (strncmp(piece, keyword, sizeof(keyword)) != 0) {
                                                                ^~~~~~~
3 warnings generated.
In file included from ../vendor/hunspell/src/hunspell/hashmgr.cxx:9:
../vendor/hunspell/src/hunspell/hashmgr.hxx:17:21: warning: private field 'userword' is not used [-Wunused-private-field]
  int               userword;
                    ^
1 warning generated
env: python: No such file or directory
make: *** [Release/hunspell.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/myuser/.volta/tools/image/npm/6.14.16/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/myuser/.volta/tools/image/node/14.19.1/bin/node" "/Users/myuser/.volta/tools/image/npm/6.14.16/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/myuser/projects/project/packages/data/node_modules/spellchecker
gyp ERR! node -v v14.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN @typescript-eslint/experimental-utils@1.13.0 requires a peer of eslint@* but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spellchecker@3.7.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spellchecker@3.7.1 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!     /Users/myuser/.npm/_logs/2022-03-29T14_24_01_048Z-debug.log

System summary:

  • Volta 1.0.6
  • NodeJS v14.19.1
  • NPM 6.14.16
  • macOS 12.3 (System Darwin 21.4.0)
  • node-gyp v5.1.0
  • spellchecker 3.7.1
1 Answers
Related