0

我目前正在开发一个 nodejs Web 应用程序,但在推送应用程序时遇到问题。

  1. 我已经安装了 CMake 和 Node-gyp
  2. 我试图通过 $ npm i opencv4nodejs /AND/ $ node ./install/install.js 安装 opencv4nodejs
  3. 我收到以下错误。

这是我到目前为止在我的操作系统上所做的:

平台

树莓派

Raspberry Pi 2 Model B Rev 1.1
Raspbian GNU/Linux 10 (buster)
node v16.13.1
npm v8.3.0
cmake v3.16.3
node-gyp@8.4.1
opencv4nodejs@5.6.0

运行 node-gyp build(以管理员身份)** 这就是崩溃的原因,给我留下了:

错误信息

ERR! gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@16.13.1 | linux | arm
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/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   '/usr/local/lib/node_modules/opencv4nodejs/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/16.13.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.13.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/opencv4nodejs',
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', '--jobs', 4 ]
In file included from /usr/include/c++/8/vector:69,
                 from /root/.cache/node-gyp/16.13.1/include/node/v8.h:27,
                 from /root/.cache/node-gyp/16.13.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:58,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/utils.h:3,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/core/HistAxes.h:4,
                 from ../cc/core/HistAxes.cc:5:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’} changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
                 from /root/.cache/node-gyp/16.13.1/include/node/v8.h:27,
                 from /root/.cache/node-gyp/16.13.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:58,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/utils.h:3,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/core/HistAxes.h:4,
                 from ../cc/core/HistAxes.cc:5:
/usr/include/c++/8/bits/stl_vector.h: In static member function ‘static bool FF::AbstractConverter<ConverterImpl>::unwrapTo(FF::AbstractConverter<ConverterImpl>::Type*, v8::Local<v8::Value>) [with ConverterImpl = FF::ArrayConverterImpl<FF::DoubleConverterImpl, double>]’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
../cc/core/Mat.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Mat::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../cc/core/Mat.cc:185:36: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
       if (numCols != -1 && numCols != colArray->Length()) {
                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
....


In file included from /usr/include/c++/8/vector:64,
                 from /root/.cache/node-gyp/16.13.1/include/node/v8.h:27,
                 from /root/.cache/node-gyp/16.13.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:58,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/utils.h:3,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/opencv_modules.h:1,
                 from ../cc/objdetect/HOGDescriptor.cc:1:
/usr/include/c++/8/bits/stl_vector.h: In static member function ‘static bool FF::ArrayConverterImpl<ElementConverterImpl, ElementCastType>::unwrap(FF::ArrayConverterImpl<ElementConverterImpl, ElementCastType>::Type*, v8::Local<v8::Value>) [with ElementConverterImpl = FF::DoubleConverterImpl; ElementCastType = double]’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~

In file included from /usr/include/c++/8/vector:69,
                 from /root/.cache/node-gyp/16.13.1/include/node/v8.h:27,
                 from /root/.cache/node-gyp/16.13.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:58,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/utils.h:3,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/opencv_modules.h:1,
                 from ../cc/face/FacemarkLBFParams.cc:1:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’} changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~

In file included from /usr/include/c++/8/vector:64,
                 from /root/.cache/node-gyp/16.13.1/include/node/v8.h:27,
                 from /root/.cache/node-gyp/16.13.1/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:58,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/utils.h:3,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /usr/local/lib/node_modules/opencv4nodejs/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/opencv_modules.h:1,
                 from ../cc/face/FacemarkLBFParams.cc:1:
/usr/include/c++/8/bits/stl_vector.h: In static member function ‘static Nan::NAN_SETTER_RETURN_TYPE FacemarkLBFParams::radius_m_setter(v8::Local<v8::String>, v8::Local<v8::Value>, Nan::NAN_SETTER_ARGS_TYPE)’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
gyp info ok
4

0 回答 0