I am going to install DCAP On my linux server with Kernel : Intel(R) Xeon(R) Platinum 8370C CPU # 2.80GHz
when I run sudo ./sgx_linux_x64_driver_1.36.2.bin I get error :
'make' KDIR=/lib/modules/5.15.0-1023-azure/build....(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.36.2 not found
Error! Bad return status for module build on kernel: 5.15.0-1023-azure (x86_64)
Consult /var/lib/dkms/sgx/1.36.2/build/make.log for more information.
Does any one knows the reason?
cat /var/lib/dkms/sgx/1.36.2/build/make.log
DKMS make.log for sgx-1.36.2 for kernel 5.15.0-1023-azure (x86_64)
Wed 14 Dec 2022 11:57:05 AM UTC
make -C /lib/modules/5.15.0-1023-azure/build M=/var/lib/dkms/sgx/1.36.2/build CFLAGS_MODULE="-I/var/lib/dkms/sgx/1.36.2/build -I/var/lib/dkms/sgx/1.36.2/build/include" modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-1023-azure'
CC [M] /var/lib/dkms/sgx/1.36.2/build/encl.o
CC [M] /var/lib/dkms/sgx/1.36.2/build/main.o
/var/lib/dkms/sgx/1.36.2/build/main.c: In function ‘sgx_init’:
/var/lib/dkms/sgx/1.36.2/build/main.c:792:9: note: #pragma message: kernel version may not be supported
792 | #pragma message "kernel version may not be supported"
| ^~~~~~~
CC [M] /var/lib/dkms/sgx/1.36.2/build/driver.o
CC [M] /var/lib/dkms/sgx/1.36.2/build/ioctl.o
LD [M] /var/lib/dkms/sgx/1.36.2/build/intel_sgx.o
MODPOST /var/lib/dkms/sgx/1.36.2/build/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/sgx/1.36.2/build/intel_sgx.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:134: /var/lib/dkms/sgx/1.36.2/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/sgx/1.36.2/build/Module.symvers'
make[1]: *** [Makefile:1818: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1023-azure'
make: *** [Makefile:22: default] Error 2
I need to use module "ffi" in a node electron project. I can use "gyp" to rebuild it and use the library in node, but I cannot rebuild it using "electron-rebuild" and use it in electron.
I have run:
cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../
It gives me the following error.
(I have removed some warning since it is over the character limit of stack overflow. The whole log is in: https://github.com/electron/electron-rebuild/issues/308)
> cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
�ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ�����ӡ�/m�����ء�
Building assembly file ..\..\..\deps\libffi\src\x86\win64.asm
Assembling: ..\..\..\deps\libffi\src\x86\win64.asm
prep_cif.c
types.c
raw_api.c
java_raw_api.c
closures.c
ffi.c
win_delay_load_hook.cc
ffi.vcxproj -> D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\Release\\libffi.lib
ffi.cc
callback_info.cc
threaded_callback_invokation.cc
win32-dlfcn.cc
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2389): note: see declaration of 'v8::Value::ToBoolean' (compiling source file ..\src\callback_info.cc)c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2389): note: see declaration of 'v8::Value::ToBoolean' (compiling source file ..\src\threaded_callback_invokation.cc)
win_delay_load_hook.cc
..\src\callback_info.cc(208): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
d:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2275: 'v8::Object': illegal use of this type as an expression..\src\ffi.cc(63): warning C4996: 'Nan::ForceSet': was declared deprecated [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(3257): note: see declaration of 'v8::Object'd:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2065: 'target': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(64): warning C4996: 'Nan::ForceSet': was declared deprecated..\src\callback_info.cc(208): error C2761: 'void CallbackInfo::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)': member function redeclaration not allowed [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
d:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2448: 'CallbackInfo::Initialize': function-style initializer appears to be a function definition [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(184): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(184): error C2275: 'v8::Value': illegal use of this type as an expression [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2104): note: see declaration of 'v8::Value'
..\src\ffi.cc(184): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(185): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): error C2228: left of '.As' must have class/struct/union [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): note: type is 'unknown-type'
..\src\ffi.cc(189): error C2059: syntax error: ')' [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(228): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(228): error C2275: 'v8::Value': illegal use of this type as an expression [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2104): note: see declaration of 'v8::Value'
..\src\ffi.cc(228): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(229): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): error C2228: left of '.As' must have class/struct/union [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): note: type is 'unknown-type'
..\src\ffi.cc(233): error C2059: syntax error: ')' [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\study\RoboTerra\desktop\frontend\electron\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "D:\\ToolsF\\nodeJS\\node.exe" "D:\\study\\RoboTerra\\desktop\\frontend\\electron\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=5.0.6" "--arch=x64" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--msvs_version=2015"
gyp ERR! cwd D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok
Failed with exit code: 1
Error: �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ�����ӡ�/m�����ء�
Building assembly file ..\..\..\deps\libffi\src\x86\win64.asm
Assembling: ..\..\..\deps\libffi\src\x86\win64.asm
prep_cif.c
types.c
raw_api.c
java_raw_api.c
closures.c
ffi.c
win_delay_load_hook.cc
ffi.vcxproj -> D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\Release\\libffi.lib
ffi.cc
callback_info.cc
threaded_callback_invokation.cc
win32-dlfcn.cc
win_delay_load_hook.cc
..\src\callback_info.cc(208): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
d:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2275: 'v8::Object': illegal use of this type as an expression..\src\ffi.cc(63): warning C4996: 'Nan::ForceSet': was declared deprecated [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(3257): note: see declaration of 'v8::Object'd:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2065: 'target': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(64): warning C4996: 'Nan::ForceSet': was declared deprecated..\src\callback_info.cc(208): error C2761: 'void CallbackInfo::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)': member function redeclaration not allowed [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
d:\study\roboterra\desktop\frontend\electron\node_modules\nan\nan_maybe_43_inl.h(117): note: see declaration of 'Nan::ForceSet'
..\src\callback_info.cc(208): error C2448: 'CallbackInfo::Initialize': function-style initializer appears to be a function definition [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(184): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(184): error C2275: 'v8::Value': illegal use of this type as an expression [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2104): note: see declaration of 'v8::Value'
..\src\ffi.cc(184): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(185): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): error C2228: left of '.As' must have class/struct/union [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(189): note: type is 'unknown-type'
..\src\ffi.cc(189): error C2059: syntax error: ')' [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(228): error C2065: 'Handle': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(228): error C2275: 'v8::Value': illegal use of this type as an expression [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\users\tinynight\.electron-gyp\5.0.6\include\node\v8.h(2104): note: see declaration of 'v8::Value'
..\src\ffi.cc(228): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(229): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): error C2065: 'cif_buf': undeclared identifier [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): error C2228: left of '.As' must have class/struct/union [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(233): note: type is 'unknown-type'
..\src\ffi.cc(233): error C2059: syntax error: ')' [D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi\build\ffi_bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\study\RoboTerra\desktop\frontend\electron\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "D:\\ToolsF\\nodeJS\\node.exe" "D:\\study\\RoboTerra\\desktop\\frontend\\electron\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=5.0.6" "--arch=x64" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--msvs_version=2015"
gyp ERR! cwd D:\study\RoboTerra\desktop\frontend\electron\node_modules\ffi
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok
Failed with exit code: 1
at SafeSubscriber._error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\spawn-rx\lib\src\index.js:267:84)
at SafeSubscriber.__tryOrUnsub (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:156:26)
at Subscriber._error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:92:26)
at Subscriber.error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:72:18)
at SafeSubscriber._next (D:\study\RoboTerra\desktop\frontend\electron\node_modules\spawn-rx\lib\src\index.js:242:65)
at SafeSubscriber.__tryOrUnsub (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.next (D:\study\RoboTerra\desktop\frontend\electron\node_modules\rxjs\internal\Subscriber.js:143:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! test#1.0.0 rebuild: `cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the test#1.0.0 rebuild 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! C:\Users\TinyNight\AppData\Roaming\npm-cache\_logs\2019-07-03T10_13_29_447Z-debug.log
And the log file in the last line is:
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\ToolsF\\nodeJS\\node.exe',
1 verbose cli 'D:\\ToolsF\\nodeJS\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'rebuild' ]
2 info using npm#5.6.0
3 info using node#v8.10.0
4 verbose run-script [ 'prerebuild', 'rebuild', 'postrebuild' ]
5 info lifecycle test#1.0.0~prerebuild: test#1.0.0
6 info lifecycle test#1.0.0~rebuild: test#1.0.0
7 verbose lifecycle test#1.0.0~rebuild: unsafe-perm in lifecycle true
8 verbose lifecycle test#1.0.0~rebuild: PATH: D:\ToolsF\nodeJS\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\study\RoboTerra\desktop\frontend\electron\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Haskell\bin;D:\study\Courses\CS 456\Haskell8.2.2\8.2.2\lib\extralibs\bin;D:\study\Courses\CS 456\Haskell8.2.2\8.2.2\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;D:\study\Courses\CS 456\Haskell8.2.2\8.2.2\mingw\bin;D:\ToolsF\nodeJS\;C:\Users\TinyNight\.windows-build-tools\python27\;C:\Users\TinyNight\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin;C:\Users\TinyNight\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\TinyNight\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\TinyNight\AppData\Roaming\cabal\bin;D:\study\Courses\CS 456\Haskell8.2.2\stack\bin;C:\Users\TinyNight\AppData\Local\Microsoft\WindowsApps;D:\code\compiler\python3;D:\code\compiler\python2;C:\Users\TinyNight\AppData\Roaming\npm
9 verbose lifecycle test#1.0.0~rebuild: CWD: D:\study\RoboTerra\desktop\frontend\electron
10 silly lifecycle test#1.0.0~rebuild: Args: [ '/d /s /c',
10 silly lifecycle 'cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../' ]
11 silly lifecycle test#1.0.0~rebuild: Returned: code: 4294967295 signal: null
12 info lifecycle test#1.0.0~rebuild: Failed to exec rebuild script
13 verbose stack Error: test#1.0.0 rebuild: `cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../`
13 verbose stack Exit status 4294967295
13 verbose stack at EventEmitter.<anonymous> (D:\ToolsF\nodeJS\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (D:\ToolsF\nodeJS\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid test#1.0.0
15 verbose cwd D:\study\RoboTerra\desktop\frontend\electron
16 verbose Windows_NT 10.0.15063
17 verbose argv "D:\\ToolsF\\nodeJS\\node.exe" "D:\\ToolsF\\nodeJS\\node_modules\\npm\\bin\\npm-cli.js" "run" "rebuild"
18 verbose node v8.10.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 4294967295
22 error test#1.0.0 rebuild: `cd ./node_modules/.bin && electron-rebuild --force --module-dir=../../`
22 error Exit status 4294967295
23 error Failed at the test#1.0.0 rebuild script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4294967295, true ]
I have node v8.10.0, and
"dependencies": {
"electron": "^5.0.6",
"ffi": "^2.3.0",
"ref": "^1.3.5",
"ref-struct": "^1.1.0",
"windows-build-tools": "^4.0.0"
},
"devDependencies": {
"electron-rebuild": "^1.8.5"
}
This is because of the official version of FFI does not support electron 5. I asked on Github and got answered:
https://github.com/electron/electron-rebuild/issues/308
I used an old version of electron and succeed.
Official ffi does not support Electron 5 and Node v10. Try ffi-napi instead
i am trying to install opencv with opencv_contrib
i downloaded opencv and opencv_contrib from GitHub of the same branch (3.4)
i built the opencv and opencv_contrib with cmake, and evrey thing worked fine. but when i try to build the Opencv.sln i am getting errors and not all the modules are built ( i need the opencv_tracking module)
here are the errors i am getting:
enter Error 437 error C2039: 'isfinite' : is not a member of 'std'
C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 150 1 opencv_tracking
Error 46 error C2054: expected '(' to follow 'inline' C:\opencv-3.4\3rdparty\quirc\src\decode.c 409 1 quirc
Error 50 error C2054: expected '(' to follow 'inline' C:\opencv-3.4\3rdparty\quirc\src\decode.c 615 1 quirc
Error 2 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 22 1 quirc
Error 4 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 39 1 quirc
Error 5 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 49 1 quirc
Error 6 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 59 1 quirc
Error 7 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 69 1 quirc
Error 8 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 79 1 quirc
Error 9 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 89 1 quirc
Error 10 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 99 1 quirc
Error 11 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 109 1 quirc
Error 12 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 119 1 quirc
Error 13 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 129 1 quirc
Error 14 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 139 1 quirc
Error 15 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 149 1 quirc
Error 16 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 159 1 quirc
Error 17 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 169 1 quirc
Error 18 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 179 1 quirc
Error 19 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 189 1 quirc
Error 20 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 199 1 quirc
Error 21 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 209 1 quirc
Error 22 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 219 1 quirc
Error 23 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 229 1 quirc
Error 24 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 239 1 quirc
Error 25 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 249 1 quirc
Error 26 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 259 1 quirc
Error 27 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 269 1 quirc
Error 28 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 279 1 quirc
Error 29 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 289 1 quirc
Error 30 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 299 1 quirc
Error 31 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 309 1 quirc
Error 32 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 319 1 quirc
Error 33 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 329 1 quirc
Error 34 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 339 1 quirc
Error 35 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 349 1 quirc
Error 36 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 359 1 quirc
Error 37 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 369 1 quirc
Error 38 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 379 1 quirc
Error 39 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 389 1 quirc
Error 40 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 399 1 quirc
Error 41 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 409 1 quirc
Error 42 error C2059: syntax error : ',' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 419 1 quirc
Error 1 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 21 1 quirc
Error 44 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\decode.c 45 1 quirc
Error 45 error C2059: syntax error : '.' C:\opencv-3.4\3rdparty\quirc\src\decode.c 121 1 quirc
Error 67 error C2059: syntax error : '[' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 124 1 quirc
Error 3 error C2059: syntax error : '}' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 29 1 quirc
Error 43 error C2059: syntax error : '}' C:\opencv-3.4\3rdparty\quirc\src\version_db.c 430 1 quirc
Error 407 error C2065: 'HUGE_VALF' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\apriltag_quad_thresh.cpp 390 1 opencv_aruco
Error 408 error C2065: 'HUGE_VALF' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\apriltag_quad_thresh.cpp 445 1 opencv_aruco
Error 405 error C2065: 'INFINITY' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\zmaxheap.cpp 177 1 opencv_aruco
Error 406 error C2065: 'INFINITY' : undeclared identifier C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\aruco\src\zmaxheap.cpp 178 1 opencv_aruco
Error 62 error C2065: 'min' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 65 error C2065: 'min' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 82 1 quirc
Error 59 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 64 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 66 error C2065: 'newdim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 86 1 quirc
Error 56 error C2065: 'olddim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 63 error C2065: 'olddim' : undeclared identifier C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 51 error C2085: 'bits_remaining' : not in formal parameter list C:\opencv-3.4\3rdparty\quirc\src\decode.c 616 1 quirc
Error 47 error C2085: 'grid_bit' : not in formal parameter list C:\opencv-3.4\3rdparty\quirc\src\decode.c 410 1 quirc
Error 48 error C2143: syntax error : missing ';' before '{' C:\opencv-3.4\3rdparty\quirc\src\decode.c 410 1 quirc
Error 52 error C2143: syntax error : missing ';' before '{' C:\opencv-3.4\3rdparty\quirc\src\decode.c 616 1 quirc
Error 61 error C2146: syntax error : missing ';' before identifier 'min' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 58 error C2146: syntax error : missing ';' before identifier 'newdim' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 55 error C2146: syntax error : missing ';' before identifier 'olddim' C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 54 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 73 1 quirc
Error 57 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 74 1 quirc
Error 60 error C2275: 'size_t' : illegal use of this type as an expression C:\opencv-3.4\3rdparty\quirc\src\quirc.c 75 1 quirc
Error 200 error C2784: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : could not deduce template argument for 'const std::vector<_Tp> &' from 'const std::vector<_Ty>' C:\opencv-3.4\modules\dnn\src\nms.cpp 31 1 opencv_dnn
Error 202 error C2784: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : could not deduce template argument for 'const std::vector<_Tp> &' from 'const std::vector<_Ty>' C:\opencv-3.4\modules\dnn\src\nms.cpp 40 1 opencv_dnn
Error 199 error C2896: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : cannot use function template 'float cv::dnn::experimental_dnn_34_v9::rectOverlap(const T &,const T &)' as a function argument C:\opencv-3.4\modules\dnn\src\nms.cpp 31 1 opencv_dnn
Error 201 error C2896: 'void cv::dnn::NMSFast_(const std::vector<_Tp> &,const std::vector<_Ty> &,const float,const float,const float,const int,std::vector<int> &,float (__cdecl *)(const BoxType &,const BoxType &))' : cannot use function template 'float cv::dnn::experimental_dnn_34_v9::rectOverlap(const T &,const T &)' as a function argument C:\opencv-3.4\modules\dnn\src\nms.cpp 40 1 opencv_dnn
Error 439 error C3861: 'acosh': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 163 1 opencv_tracking
Error 440 error C3861: 'acosh': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 173 1 opencv_tracking
Error 438 error C3861: 'isfinite': identifier not found C:\opencv-3.4\opencv_contrib-3.4\opencv_contrib-3.4\modules\tracking\src\trackerCSRTUtils.cpp 150 1 opencv_tracking
Error 458 error LNK1104: cannot open file '..\..\..\..\lib\Debug\opencv_xobjdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\xobjdetect\tools\waldboost_detector\LINK opencv_waldboost_detector
Error 370 error LNK1104: cannot open file '..\..\3rdparty\lib\Debug\quircd.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_objdetect
Error 442 error LNK1104: cannot open file '..\..\lib\Debug\opencv_aruco343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\aruco\LINK opencv_test_aruco
Error 460 error LNK1104: cannot open file '..\..\lib\Debug\opencv_aruco343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\interactive-calibration\LINK opencv_interactive-calibration
Error 223 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn_objdetect\LINK opencv_dnn_objdetect
Error 244 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\text\LINK opencv_text
Error 396 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn\LINK opencv_perf_dnn
Error 443 error LNK1104: cannot open file '..\..\lib\Debug\opencv_dnn343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dnn\LINK opencv_test_dnn
Error 444 error LNK1104: cannot open file '..\..\lib\Debug\opencv_face343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\face\LINK opencv_test_face
Error 409 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\face\LINK opencv_face
Error 431 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\xobjdetect\LINK opencv_xobjdetect
Error 436 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_perf_objdetect
Error 445 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\objdetect\LINK opencv_test_objdetect
Error 448 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\traincascade\LINK opencv_traincascade
Error 453 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\apps\createsamples\LINK opencv_createsamples
Error 459 error LNK1104: cannot open file '..\..\lib\Debug\opencv_objdetect343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\dpm\LINK opencv_dpm
Error 361 error LNK1104: cannot open file '..\..\lib\Debug\opencv_text343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\datasets\LINK opencv_datasets
Error 446 error LNK1104: cannot open file '..\..\lib\Debug\opencv_text343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\text\LINK opencv_test_text
Error 441 error LNK1104: cannot open file '..\..\lib\Debug\opencv_tracking343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\tracking\LINK opencv_perf_tracking
Error 447 error LNK1104: cannot open file '..\..\lib\Debug\opencv_tracking343d.lib' C:\opencv-3.4\opencv-3.4-build\modules\tracking\LINK opencv_test_tracking
Error 461 error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134 5 INSTALL
thank you in advance.
i surpassed the errors by using a previous version (3.4.0)
to retain: never use the latest version.
I am getting following error when I run mingw32-make
D:\MAS\AppData\Local\Temp\ccksf6tI.s: Assembler messages:
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21573: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21575: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21577: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21579: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21581: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21583: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21585: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21587: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21589: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21591: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21593: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21595: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21597: Error: invalid register for .seh_savexmm
D:\MAS\AppData\Local\Temp\ccksf6tI.s:21599: Error: invalid register for .seh_savexmm
mingw32-make[2]: * [modules\dnn\CMakeFiles\opencv_dnn.dir\build.make:1016: modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx512_skx.cpp.obj] Error 1
mingw32-make[1]: * [CMakeFiles\Makefile2:4083: modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2
I have already tested by passing -fno-asynchronous-unwind-tables to cmake3.11
I am running windows 10 ver 1709
Try disabling Dispatched CPU optimizations by passing the -DCPU_DISPATCH= flag to CMake.
Edit: Your compiler doesn't support AVX optimizations. If you're building with CMake, clear the CPU_DISPATCH row of anything AVX-related.
I'm trying to install opencv with homebrew on OS 10.5.8 but I'm totally stumped by this error:
brew install -v opencv
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp:106:39: error: dispatch/dispatch.h: No such file or directory
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp: In function 'void cv::parallel_for_(const cv::Range&, const cv::ParallelLoopBody&, double)':
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp:267: error: 'dispatch_queue_t' was not declared in this scope
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp:267: error: expected `;' before 'concurrent_queue'
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp:268: error: 'concurrent_queue' was not declared in this scope
/tmp/opencv-Qk23/opencv-2.4.6.1/modules/core/src/parallel.cpp:268: error: 'dispatch_apply_f' was not declared in this scope
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
Any suggestions?