无法编译 GridDB Node.js 连接器

Cannot compile the GridDB Node.js connector

我相信我正在按照 github 页面上的说明进行操作:我已经安装了正确的 swig 版本(具有正确的提交 ID)并且正在使用 nvm 给我正确的 node.js版本(12)。我已将 Makefile 中的路径更改为 nvm 给我的路径:

$ nvm which 12
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node

并且还在同一目录中添加了正确的 nodejs-devel 文件,以提供各种构建工具。

但是当我 运行 时,我得到以下输出:

$ make
g++ -fPIC -std=c++0x -g -O2 -c -o src/TimeSeriesProperties.o -Iinclude -Isrc src/TimeSeriesProperties.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/ContainerInfo.o -Iinclude -Isrc src/ContainerInfo.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/AggregationResult.o -Iinclude -Isrc src/AggregationResult.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Container.o -Iinclude -Isrc src/Container.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Store.o -Iinclude -Isrc src/Store.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/StoreFactory.o -Iinclude -Isrc src/StoreFactory.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/PartitionController.o -Iinclude -Isrc src/PartitionController.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Query.o -Iinclude -Isrc src/Query.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/QueryAnalysisEntry.o -Iinclude -Isrc src/QueryAnalysisEntry.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/RowKeyPredicate.o -Iinclude -Isrc src/RowKeyPredicate.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/RowSet.o -Iinclude -Isrc src/RowSet.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Field.o -Iinclude -Isrc src/Field.cpp
g++ -fPIC -std=c++0x -g -O2 -c -o src/Util.o -Iinclude -Isrc src/Util.cpp
swig -DSWIGWORDSIZE64 -Ilibs/js/v8 -outdir . -o src/griddb_js.cxx -c++ -javascript -node src/griddb.i
g++ -fPIC -std=c++0x -g -O2 -Iinclude -Isrc -I/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/ -Inode_modules/nan -DNODE_GYP_MODULE_NAME=griddb -DV8_DEPRECATION_WARNINGS=1 -DBUILDING_NODE_EXTENSION -c -o src/griddb_js.o src/griddb_js.cxx
In file included from /home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:30:0,
                 from /home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h:63,
                 from src/griddb_js.cxx:171:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-internal.h:492:33: error: ‘remove_cv_t’ is not a member of ‘std’
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                 ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-internal.h:492:33: error: ‘remove_cv_t’ is not a member of ‘std’
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-internal.h:492:50: error: template argument 2 is invalid
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                                  ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-internal.h:492:61: error: ‘::Perform’ has not been declared
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                                             ^
In file included from /home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h:63:0,
                 from src/griddb_js.cxx:171:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h: At global scope:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1478:49: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   V8_INLINE Local<Integer> ResourceLineOffset() const;
                                                 ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1480:51: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   V8_INLINE Local<Integer> ResourceColumnOffset() const;
                                                   ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1482:39: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   V8_INLINE Local<Integer> ScriptID() const;
                                       ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1634:33: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   int GetModuleRequestsLength() const;
                                 ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1642:41: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Local<String> GetModuleRequest(int i) const;
                                         ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1651:44: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Location GetModuleRequestLocation(int i) const;
                                            ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1687:79: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
                                                       ResolveCallback callback);
                                                                               ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:1780:58: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
                                 Local<Value> export_value);
                                                          ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:2073:49: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       CompileOptions options = kNoCompileOptions);
                                                 ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:3654:23: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Local<Value> Name() const { return Description(); }
                       ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:4806:33: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Local<Value> GetDisplayName() const;
                                 ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:5521:76: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:5568:21: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:5594:24: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:5604:70: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:5615:24: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6003:76: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6052:76: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6061:21: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6076:24: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6086:70: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:6101:24: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:8641:30: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
     std::vector<std::string> supported_import_assertions;
                              ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:8984:51: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       HostImportModuleDynamicallyCallback callback);
                                                   ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:9155:59: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
                                     MeasureMemoryMode mode);
                                                           ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:9840:55: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
       ModifyCodeGenerationFromStringsCallback callback);
                                                       ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:10209:75: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   static bool TryHandleSignal(int signal_number, void* info, void* context);
                                                                           ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8.h:10246:40: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   static void SetIsCrossOriginIsolated();
                                        ^
In file included from /home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h:65:0,
                 from src/griddb_js.cxx:171:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-platform.h:234:28: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   virtual bool IsCompleted() { return !IsActive(); }
                            ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-platform.h:245:26: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   virtual bool IsRunning() { return IsValid(); }
                          ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/v8-platform.h:278:38: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
   virtual size_t GetMaxConcurrency() const { return 0; }
                                      ^
In file included from src/griddb_js.cxx:171:0:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h: In lambda function:
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h:617:43: error: parameter packs not expanded with ‘...’:
             std::forward<EnvironmentArgs>(env_args)...);
                                           ^
/home/Gopheritis/.nvm/versions/node/v12.22.10/bin/node.h:617:43: note:         ‘env_args’
make: *** [src/griddb_js.o] Error 1

有什么想法吗?

您使用的是 CentOS 7 吗? 尝试通过 yum 卸载 node.js 和 re-install。

sudo yum -y update
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
sudo yum clean all && sudo yum makecache fast
sudo yum install -y gcc-c++ make
sudo yum install -y nodejs