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

Mac OS 10.4.6 npm installation error: unknown type name 'constexpr' #62

Open
tom-longmeadow opened this issue Jul 2, 2020 · 13 comments

Comments

@tom-longmeadow
Copy link

Hello. I have installed pocketsphinx and have successfully run the hello_ps.c example. I am now trying to get the npm version installed. When installing I get an error: unknown type name 'constexpr'. I have looked up reasons for this error and they suggest compiling with c11, but i am unsure how to set this up for the npm installation.

relevant part of the build:

[ 16%] Generating swig bindings
Scanning dependencies of target SphinxBase
[ 33%] Building CXX object sphinxbase/CMakeFiles/SphinxBase.dir/sb.cpp.o
In file included from /Users/T/m/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:172:
In file included from /Users/T/.cmake-js/node-x64/v12.18.0/include/node/node.h:67:
In file included from /Users/T/.cmake-js/node-x64/v12.18.0/include/node/v8.h:27:
/Users/T/.cmake-js/node-x64/v12.18.0/include/node/v8-internal.h:51:1: error: unknown type name 'constexpr'
constexpr intptr_t kIntptrAllBitsSet = intptr_t{-1};

@nshmyrev
Copy link

nshmyrev commented Sep 6, 2020

add -std=c++11 in cflags in cmakefile

@simon-tannai
Copy link

@nshmyrev I have the same issue than @tom-longmeadow but I'm not familiar with C and make file.
Can you details how to fix it and whare add the -std=c++11 ?

@nshmyrev
Copy link

@nshmyrev I have the same issue than @tom-longmeadow but I'm not familiar with C and make file.

What is your OS, compiler, compiler version, cmake version, full build output right now.

@simon-tannai
Copy link

@nshmyrev I'm using MacOS Catalina 10.15.7 with Node.js 12.18, cmake-js 6.1.0, cmake 3.19.2.
The issue happened when I ran npm i --save pocketsphinx.

The logs:

> [email protected] install /Users/user/project/node_modules/pocketsphinx
> cmake-js compile

[
  '/Users/user/.nvm/versions/node/v12.18.4/bin/node',
  '/Users/user/.nvm/versions/node/v12.18.4/bin/cmake-js',
  'compile'
]
info TOOL Using Unix Makefiles generator.
info CMD CONFIGURE
info RUN cmake "/Users/user/project/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/Users/user/project/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/Users/user/.cmake-js/node-x64/v12.18.4/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.4" -DNODE_ARCH="x64" -DCMAKE_CXX_FLAGS="-D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION" -DCMAKE_SHARED_LINKER_FLAGS="-undefined dynamic_lookup"
Not searching for unused variables given on the command line.
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.0.2", minimum required is "3.0.7")  
-- Checking for module 'sphinxbase>=5prealpha'
--   Found sphinxbase, version 5prealpha
-- Checking for module 'pocketsphinx>=5prealpha'
--   Found pocketsphinx, version 5prealpha
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/project/node_modules/pocketsphinx/build
info CMD BUILD
info RUN cmake --build "/Users/user/project/node_modules/pocketsphinx/build" --config Release
[ 16%] Generating swig bindings
Scanning dependencies of target SphinxBase
[ 33%] Building CXX object sphinxbase/CMakeFiles/SphinxBase.dir/sb.cpp.o
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:51:1: error: unknown type name 'constexpr'
constexpr intptr_t kIntptrAllBitsSet = intptr_t{-1};
^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:51:19: error: expected ';' after top level declarator
constexpr intptr_t kIntptrAllBitsSet = intptr_t{-1};
                  ^
                  ;
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:52:1: error: unknown type name 'constexpr'
constexpr uintptr_t kUintptrAllBitsSet =
^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:52:20: error: expected ';' after top level declarator
constexpr uintptr_t kUintptrAllBitsSet =
                   ^
                   ;
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:60:10: error: unknown type name 'constexpr'
  static constexpr intptr_t kSmiMinValue =
         ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:60:28: error: expected ';' at end of declaration list
  static constexpr intptr_t kSmiMinValue =
                           ^
                           ;
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:62:10: error: unknown type name 'constexpr'
  static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1);
         ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:62:28: error: expected ';' at end of declaration list
  static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1);
                           ^
                           ;
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:69:20: error: unknown type name 'constexpr'
  V8_INLINE static constexpr bool IsValidSmi(intptr_t value) {
                   ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:69:46: error: unknown type name 'intptr_t'; did you mean '::intptr_t'?
  V8_INLINE static constexpr bool IsValidSmi(intptr_t value) {
                                             ^~~~~~~~
                                             ::intptr_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_intptr_t.h:32:33: note: '::intptr_t' declared here
typedef __darwin_intptr_t       intptr_t;
                                ^
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:73:25: error: unknown type name 'uintptr_t'; did you mean '::uintptr_t'?
    return (static_cast<uintptr_t>(value) -
                        ^~~~~~~~~
                        ::uintptr_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_uintptr_t.h:30:33: note: '::uintptr_t' declared here
typedef unsigned long           uintptr_t;
                                ^
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:74:25: error: unknown type name 'uintptr_t'; did you mean '::uintptr_t'?
            static_cast<uintptr_t>(kSmiMinValue)) <=
                        ^~~~~~~~~
                        ::uintptr_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_uintptr_t.h:30:33: note: '::uintptr_t' declared here
typedef unsigned long           uintptr_t;
                                ^
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:75:25: error: unknown type name 'uintptr_t'; did you mean '::uintptr_t'?
           (static_cast<uintptr_t>(kSmiMaxValue) -
                        ^~~~~~~~~
                        ::uintptr_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_uintptr_t.h:30:33: note: '::uintptr_t' declared here
typedef unsigned long           uintptr_t;
                                ^
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:76:25: error: unknown type name 'uintptr_t'; did you mean '::uintptr_t'?
            static_cast<uintptr_t>(kSmiMinValue));
                        ^~~~~~~~~
                        ::uintptr_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_uintptr_t.h:30:33: note: '::uintptr_t' declared here
typedef unsigned long           uintptr_t;
                                ^
In file included from /Users/user/project/node_modules/pocketsphinx/build/sphinxbase/sb.cpp:182:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/node.h:67:
In file included from /Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:27:
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:74:36: error: use of undeclared identifier 'kSmiMinValue'
            static_cast<uintptr_t>(kSmiMinValue)) <=
                                   ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:75:36: error: use of undeclared identifier 'kSmiMaxValue'
           (static_cast<uintptr_t>(kSmiMaxValue) -
                                   ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:76:36: error: use of undeclared identifier 'kSmiMinValue'
            static_cast<uintptr_t>(kSmiMinValue));
                                   ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:85:10: error: unknown type name 'constexpr'
  static constexpr intptr_t kSmiMinValue =
         ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8-internal.h:85:28: error: expected ';' at end of declaration list
  static constexpr intptr_t kSmiMinValue =
                           ^
                           ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]

@nshmyrev
Copy link

Try to add a line to CMakeLists.txt:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

@simon-tannai
Copy link

@nshmyrev Great !
Your fix working fine for this error but I got another one:

/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:1199:79: error: too few arguments to function call, single argument 'context' was not specified
  v8::Local<v8::Object> result = class_templ->InstanceTemplate()->NewInstance();
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6423:3: note: 'NewInstance' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:1524:83: error: too few arguments to function call, single argument 'context' was not specified
  obj->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction());
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:1535:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
  obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
  ^~~~~~~~~~~~~~~~
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6247:83: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_Config_obj = _exports_Config_class_0->GetFunction();
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6253:87: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_FrontEnd_obj = _exports_FrontEnd_class_0->GetFunction();
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6259:85: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_Feature_obj = _exports_Feature_class_0->GetFunction();
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6265:87: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_FsgModel_obj = _exports_FsgModel_class_0->GetFunction();
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6271:87: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_JsgfRule_obj = _exports_JsgfRule_class_0->GetFunction();
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6277:91: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_NGramModel_obj = _exports_NGramModel_class_0->GetFunction();
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6283:85: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_LogMath_obj = _exports_LogMath_class_0->GetFunction();
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6289:113: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_NGramModelSetIterator_obj = _exports_NGramModelSetIterator_class_0->GetFunction();
                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6295:95: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_JsgfIterator_obj = _exports_JsgfIterator_class_0->GetFunction();
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6301:97: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_NGramModelSet_obj = _exports_NGramModelSet_class_0->GetFunction();
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
/Users/user/project/node-pocketsphinx/build/sphinxbase/sb.cpp:6307:79: error: too few arguments to function call, single argument 'context' was not specified
v8::Handle<v8::Object> _exports_Jsgf_obj = _exports_Jsgf_class_0->GetFunction();
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8.h:6126:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/user/.cmake-js/node-x64/v12.18.4/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))

@nshmyrev
Copy link

Swig doesn't support very recent node I think, maybe 0.10 will work.

@simon-tannai
Copy link

@nshmyrev I tried with Node.js 0.10.48 but cmake-js seems to not support this old version.
According to the documentation, I tried with [email protected] but I got an error from the package:

for (var key of _.keys(npmConfigData)) {
             ^^
SyntaxError: Unexpected identifier
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3

Maybe you have more information about version to use ?

@nshmyrev
Copy link

Given the software is from 2016, something like 3.2.0 or 3.4.0 should probably work.

@simon-tannai
Copy link

@nshmyrev I tested both version, I got same errors :(

@nshmyrev
Copy link

Are those files (node.js, module.js) too recent? Maybe they come from very recent npm or something.

@nshmyrev
Copy link

You can try instead https://github.com/alphacep/vosk-api/tree/master/nodejs, I tested it recently and it should work with node 0.10

@nshmyrev
Copy link

You have to compiler kaldi properly first though, also not a trivial thing.

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

No branches or pull requests

3 participants