Hi I'm trying to use opencv in my Node.js project so I decided to use opencv4nodejs. So I used brew to install cmake that is required to install mentioned module. But when I'm trying to install opencv4nodejs the following errors occurs:
...
...
...
Scanning dependencies of target opencv_text
[ 84%] Building CXX object modules/text/CMakeFiles/opencv_text.dir/src/erfilter.cpp.o
[ 84%] Building CXX object modules/tracking/CMakeFiles/opencv_tracking.dir/src/feature.cpp.o
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/include/tesseract/baseapi.h:26:
In file included from /usr/local/include/tesseract/apitypes.h:23:
/usr/local/include/tesseract/publictypes.h:33:1: error: unknown type name 'constexpr'
constexpr int kPointsPerInch = 72;
^
/usr/local/include/tesseract/publictypes.h:33:11: error: expected unqualified-id
constexpr int kPointsPerInch = 72;
^
/usr/local/include/tesseract/publictypes.h:38:1: error: unknown type name 'constexpr'
constexpr int kMinCredibleResolution = 70;
^
/usr/local/include/tesseract/publictypes.h:38:11: error: expected unqualified-id
constexpr int kMinCredibleResolution = 70;
^
/usr/local/include/tesseract/publictypes.h:40:1: error: unknown type name 'constexpr'
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/include/tesseract/publictypes.h:40:11: error: expected unqualified-id
constexpr int kMaxCredibleResolution = 2400;
^
/usr/local/include/tesseract/publictypes.h:45:1: error: unknown type name 'constexpr'
constexpr int kResolutionEstimationFactor = 10;
^
/usr/local/include/tesseract/publictypes.h:45:11: error: expected unqualified-id
constexpr int kResolutionEstimationFactor = 10;
^
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/include/tesseract/baseapi.h:30:
In file included from /usr/local/include/tesseract/resultiterator.h:27:
In file included from /usr/local/include/tesseract/ltrresultiterator.h:27:
/usr/local/include/tesseract/unichar.h:171:8: error: function definition does not declare parameters
char chars[UNICHAR_LEN]{};
^
/usr/local/include/tesseract/unichar.h:60:12: error: use of undeclared identifier 'chars'
memset(chars, 0, UNICHAR_LEN);
^
/usr/local/include/tesseract/unichar.h:78:15: error: use of undeclared identifier 'chars'
int len = chars[UNICHAR_LEN - 1];
^
/usr/local/include/tesseract/unichar.h:84:12: error: use of undeclared identifier 'chars'
return chars;
^
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/include/tesseract/baseapi.h:30:
/usr/local/include/tesseract/resultiterator.h:103:63: error: a space is required between consecutive right angle brackets (use '> >')
virtual std::vector<std::vector<std::pair<const char*, float>>>*
^
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/erfilter.cpp:43:
In file included from /Users/iwanowicz/Documents/testApp/node_modules/opencv-build/opencv/opencv_contrib/modules/text/src/precomp.hpp:54:
In file included from /usr/local/include/tesseract/baseapi.h:31:
/usr/local/include/tesseract/serialis.h:43:1: error: unknown type name 'constexpr'
constexpr size_t countof(T const (&)[N]) noexcept {
^
/usr/local/include/tesseract/serialis.h:43:17: error: expected ';' at end of declaration
constexpr size_t countof(T const (&)[N]) noexcept {
^
/usr/local/include/tesseract/serialis.h:43:18: error: C++ requires a type specifier for all declarations
constexpr size_t countof(T const (&)[N]) noexcept {
^
/usr/local/include/tesseract/serialis.h:43:26: error: use of undeclared identifier 'T'
constexpr size_t countof(T const (&)[N]) noexcept {
^
/usr/local/include/tesseract/serialis.h:43:41: error: expected ';' after top level declarator
constexpr size_t countof(T const (&)[N]) noexcept {
^
/usr/local/include/tesseract/serialis.h:55:40: error: unknown type name 'size_t'
bool DeSerialize(FILE* fp, char* data, size_t n = 1);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [modules/text/CMakeFiles/opencv_text.dir/src/erfilter.cpp.o] Error 1
make[1]: *** [modules/text/CMakeFiles/opencv_text.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/dls.cpp.o
ld: warning: building for macOS, but linking in object file (../../3rdparty/ippicv/ippicv_mac/icv/lib/intel64/libippicv.a(pscopye9as_l9.o)) built for
[ 89%] Built target opencv_calib3d
make: *** [all] Error 2
ERR! child process exited with code 2 (for more info, set '--loglevel silly')
npm WARN testapp#1.0.0 No description
npm WARN testapp#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build#0.1.9 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build#0.1.9 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/iwanowicz/.npm/_logs/2019-09-09T06_14_39_892Z-debug.log
As I understand there are some problems with building(?) opencv but I can`t find solutions for.
Could you help me finish the proces of installation opencv4nodejs?
Related
I'm running macOS Mojave (10.14.3).
After the upgrade to Mojave something in my system changed and I no longer can compile code having VTK and Qt.
A (not) working example can be found in the examples given by VTK.
It's worth to mention, that I can compile the other examples not involving qt.
I use homebrew to install everything I need.
Hier are the logs:
cmake ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTK_VERSION: 8.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chraibi/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build
and
make
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION'
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:23: error: expected unqualified-id
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:5: error: unknown type name 'Q_ENUM'
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:19: error: expected ';' at end of declaration list
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:35: error: use of undeclared identifier 'ControlType'
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:5: error: unknown type name 'Q_FLAG'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:12: error: duplicate member 'ControlTypes'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:21: note: previous declaration is here
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:25: error: expected ';' at end of declaration list
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:5: error: unknown type name 'Q_DECL_RELAXED_CONSTEXPR'
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW { bits.horPolicy = d; }
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:30: error: expected member name or ';' after declaration specifiers
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW { bits.horPolicy = d; }
~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:136:73: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const Q_DECL_NOTHROW {
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:153:58: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR int horizontalStretch() const Q_DECL_NOTHROW { return static_cast<int>(bits.horStretch); }
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:176:47: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR QSizePolicy(int i) Q_DECL_NOTHROW : data(i) { }
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:50: error: unknown type name 'Bits'
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b) { }
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:57: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b) { }
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:223:9: error: unknown type name 'Bits'
Bits bits;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/all] Error 2
make: *** [all] Error 2
Similar error I get with cmake -DCMAKE_CXX_COMPILER=g++-8, where g++-8 is installed with brew
Maybe I should mention, there is a software using vtk and qt that I can install via brew without any problems. The same software cannot be compiled directly (cmake --> make).
Could be something with my OS is wrong?
Just uninstall the duplicate QT installations on your system, like the older qt4 version. Credits to khrykin
Using CLion & mingw-w64(7.2.0) to compile https://github.com/CasterKKK/OpenGLStarter, get the following errors:
In file included from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/windows.h:70:0,
from C:/PROGRA~1/POSTGR~1/10/include/pthread.h:198,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:35,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/x86_64-w64-mingw32/bits/gthr.h:148,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/ext/atomicity.h:35,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/basic_string.h:39,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/string:52,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/stdexcept:39,
from D:/Workspaces/CppWorkspace/OpenGLEngine/lib/assimp/include/assimp/Exceptional.h:44,
from D:/Workspaces/CppWorkspace/OpenGLEngine/lib/assimp/include/assimp/BaseImporter.h:47,
from D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBLoader.h:49,
from D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBLoader.cpp:48:
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:185:20: error: expected identifier before numeric constant
SPOT,LOCAL,INFINITE
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:185:20: error: expected '}' before numeric constant
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:185:20: error: expected unqualified-id before numeric constant
In file included from D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBLoader.cpp:49:0:
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:188:30: error: 'Assimp::COB::ChunkInfo' is not a namespace or unscoped enum
using ChunkInfo::operator=;
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:189:11: error: expected unqualified-id before ')' token
Light() : Node(TYPE_LIGHT),angle(),inner_angle(),ltype(SPOT) {}
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:194:5: error: 'LightType' does not name a type; did you mean 'Light'?
LightType ltype;
^~~~~~~~~
Light
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:200:1: error: expected class-name before '{' token
{
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:201:11: error: 'ChunkInfo' has not been declared
using ChunkInfo::operator=;
^~~~~~~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h: In constructor 'Assimp::Camera::Camera()':
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:202:16: error: class 'Assimp::Camera' does not have any field named 'Node'
Camera() : Node(TYPE_CAMERA) {}
^~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:202:21: error: 'TYPE_CAMERA' was not declared in this scope
Camera() : Node(TYPE_CAMERA) {}
^~~~~~~~~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:202:21: note: suggested alternative: 'TP_TIMER'
Camera() : Node(TYPE_CAMERA) {}
^~~~~~~~~~~
TP_TIMER
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h: At global scope:
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:216:1: error: expected class-name before '{' token
{
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:217:11: error: 'ChunkInfo' has not been declared
using ChunkInfo::operator=;
^~~~~~~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:249:1: error: expected class-name before '{' token
{
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:260:37: error: 'Node' was not declared in this scope
typedef std::deque< std::shared_ptr<Node> > NodeList;
^~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:260:37: note: suggested alternative:
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:105:8: note: 'Assimp::COB::Node'
struct Node : public ChunkInfo
^~~~
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:260:41: error: template argument 1 is invalid
typedef std::deque< std::shared_ptr<Node> > NodeList;
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:260:43: error: template argument 1 is invalid
typedef std::deque< std::shared_ptr<Node> > NodeList;
^
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:260:43: error: template argument 2 is invalid
D:\Workspaces\CppWorkspace\OpenGLEngine\lib\assimp\code\COBScene.h:275:1: error: expected declaration before '}' token
} // end Assimp
^
mingw32-make.exe[3]: *** [lib\assimp\code\CMakeFiles\assimp.dir\build.make:1645: lib/assimp/code/CMakeFiles/assimp.dir/COBLoader.cpp.obj] Error 1
mingw32-make.exe[3]: *** Waiting for unfinished jobs....
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:332: lib/assimp/code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:89: CMakeFiles/OpenGLEngine.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:163: OpenGLEngine] Error 2
But if I open and compile it with Visual Studio 2017, it works fine...
Here is the CLion's setting:
I used the command line cmake -G"Visual Studio 15 2017 Win64" .. to compile the code, and it works fine, but I cannot set Visual Studio in CLion, for it cannot find C:\Program Files (x86)\Microsoft Visual Studio\2017\Community even my VS 2017 is right there, which is really weird...
The problem is that the project on Github was never build with mingw, thus the issues you are seeing. Better stick to VS or clang compilers.
When I try to install a module like Hiredis in this example, I have some v8 errors. This type of erros appears on others module installation, when the installation require a node-gyp rebuild.
I am on Fedora and:
- nodeJS v5.0.0
- node-gyp v0.10.6
- npm v3.3.6
npm install hiredis --save
> hiredis#0.2.0 install /home/thoms/Bureau/App/node_modules/livedb/node_modules/hiredis
> node-gyp rebuild
make: Entering directory '/home/thoms/Bureau/App/node_modules/livedb/node_modules/hiredis/build'
CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
CC(target) Release/obj.target/hiredis/deps/hiredis/read.o
AR(target) Release/obj.target/deps/hiredis.a
COPY Release/hiredis.a
CXX(target) Release/obj.target/hiredis/src/hiredis.o
In file included from ../../nan/nan_new.h:181:0,
from ../../nan/nan.h:74,
from ../src/reader.h:4,
from ../src/hiredis.cc:3:
../../nan/nan_implementation_12_inl.h: Dans la fonction membre statique ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../../nan/nan_implementation_12_inl.h:172:76: erreur: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
In file included from ../src/hiredis.cc:1:0:
/home/thoms/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: candidate: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
static Local<Signature> New(
^
/home/thoms/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/reader.h:4:0,
from ../src/hiredis.cc:3:
../../nan/nan.h: At global scope:
../../nan/nan.h:165:25: erreur: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../../nan/nan.h:160:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../../nan/nan.h:500:13: erreur: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:500:35: erreur: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: Dans la fonction ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:504:50: erreur: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:504:60: erreur: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: Dans la fonction ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:511:67: erreur: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../../nan/nan.h:25:0,
from ../src/reader.h:4,
from ../src/hiredis.cc:3:
/home/thoms/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/thoms/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: conversion of argument 3 would be ill-formed:
In file included from ../src/reader.h:4:0,
from ../src/hiredis.cc:3:
../../nan/nan.h:511:67: erreur: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../../nan/nan.h:25:0,
from ../src/reader.h:4,
from ../src/hiredis.cc:3:
/home/thoms/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/thoms/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: conversion of argument 2 would be ill-formed:
In file included from ../src/reader.h:4:0,
from ../src/hiredis.cc:3:
../../nan/nan.h:511:67: erreur: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h: Dans la fonction ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:515:29: erreur: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: Dans la fonction ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:522:12: erreur: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
hiredis.target.mk:102: recipe for target 'Release/obj.target/hiredis/src/hiredis.o' failed
make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 1
make: Leaving directory '/home/thoms/Bureau/App/node_modules/livedb/node_modules/hiredis/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.2.5-300.fc23.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/thoms/Bureau/App/node_modules/livedb/node_modules/hiredis
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:hiredis hiredis#0.2.0 install: `node-gyp rebuild`
npm WARN install:hiredis Exit status 1
> hiredis#0.4.1 install /home/thoms/Bureau/App/node_modules/hiredis
> node-gyp rebuild
make: Entering directory '/home/thoms/Bureau/App/node_modules/hiredis/build'
CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o
CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o
AR(target) Release/obj.target/deps/hiredis-c.a
COPY Release/hiredis-c.a
CXX(target) Release/obj.target/hiredis/src/hiredis.o
CXX(target) Release/obj.target/hiredis/src/reader.o
SOLINK_MODULE(target) Release/obj.target/hiredis.node
COPY Release/hiredis.node
make: Leaving directory '/home/thoms/Bureau/App/node_modules/hiredis/build'
unnamed#0.0.0 /home/thoms/Bureau/App
└── hiredis#0.4.1
smooth_opengl3.c:123:1: error: unknown type name 'PFNGLGENBUFFERSPROC'
PFNGLGENBUFFERSPROC gl_GenBuffers;
^
smooth_opengl3.c:124:1: error: unknown type name 'PFNGLBINDBUFFERPROC'
PFNGLBINDBUFFERPROC gl_BindBuffer;
^
smooth_opengl3.c:125:1: error: unknown type name 'PFNGLBUFFERDATAPROC'
PFNGLBUFFERDATAPROC gl_BufferData;
^
smooth_opengl3.c:126:1: error: unknown type name 'PFNGLCREATESHADERPROC'
PFNGLCREATESHADERPROC gl_CreateShader;
^
smooth_opengl3.c:127:1: error: unknown type name 'PFNGLSHADERSOURCEPROC'
PFNGLSHADERSOURCEPROC gl_ShaderSource;
^
smooth_opengl3.c:128:1: error: unknown type name 'PFNGLCOMPILESHADERPROC'
PFNGLCOMPILESHADERPROC gl_CompileShader;
^
smooth_opengl3.c:129:1: error: unknown type name 'PFNGLCREATEPROGRAMPROC'
PFNGLCREATEPROGRAMPROC gl_CreateProgram;
^
smooth_opengl3.c:130:1: error: unknown type name 'PFNGLATTACHSHADERPROC'
PFNGLATTACHSHADERPROC gl_AttachShader;
^
smooth_opengl3.c:131:1: error: unknown type name 'PFNGLLINKPROGRAMPROC'
PFNGLLINKPROGRAMPROC gl_LinkProgram;
^
smooth_opengl3.c:132:1: error: unknown type name 'PFNGLUSEPROGRAMPROC'
PFNGLUSEPROGRAMPROC gl_UseProgram;
^
smooth_opengl3.c:133:1: error: unknown type name 'PFNGLGETSHADERIVPROC'
PFNGLGETSHADERIVPROC gl_GetShaderiv;
^
smooth_opengl3.c:134:1: error: unknown type name 'PFNGLGETSHADERINFOLOGPROC'
PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog;
^
smooth_opengl3.c:135:1: error: unknown type name 'PFNGLGETPROGRAMIVPROC'
PFNGLGETPROGRAMIVPROC gl_GetProgramiv;
^
smooth_opengl3.c:136:1: error: unknown type name 'PFNGLGETPROGRAMINFOLOGPROC'
PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog;
^
smooth_opengl3.c:137:1: error: unknown type name 'PFNGLGETATTRIBLOCATIONPROC'
PFNGLGETATTRIBLOCATIONPROC gl_GetAttribLocation;
^
smooth_opengl3.c:138:1: error: unknown type name 'PFNGLVERTEXATTRIBPOINTERPROC'
PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer;
^
smooth_opengl3.c:139:1: error: unknown type name
'PFNGLENABLEVERTEXATTRIBARRAYPROC'
PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray;
^
smooth_opengl3.c:140:1: error: unknown type name 'PFNGLGETUNIFORMLOCATIONPROC'
PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation;
^
smooth_opengl3.c:141:1: error: unknown type name 'PFNGLUNIFORMMATRIX4FVPROC'
PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
In freeglut 3.0.0 there is no configure file.
I received this error when i compiled free glut (2.8.0) using (env CPPFLAGS="-I/opt/X11/include" LDFLAGS="-L/opt/X11/lib" ./configure) from this guide
A question related to this is also not helping Is it possible to build FreeGLUT on Mac OS X?
you could open progs/demos/smooth_opengl3/smooth_opengl3.c and search for PFNGLGENBUFFERSPROC
Now comment out #ifndef GL_VERSION_1_5 and #ifndef GL_VERSION_2_0 clauses. Rebuild and the errors should be gone.
I'm trying to install Cassandra cpp-driver in Ubuntu.
I've done the steps specified in DataStax C/C++ Driver for Apache Cassandra (Beta), but i keep getting the following compile error.
[ 1%] Building CXX object CMakeFiles/cassandra.dir/src/buffer_collection.cpp.o
In file included from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/session.hpp:29:0, from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/types.hpp:22, from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/buffer_collection.cpp:19:
/root/libraries/cass_cpp-driver/git2/cpp-driver/src/logger.hpp: In member function 'int cass::Logger::init()':
/root/libraries/cass_cpp-driver/git2/cpp-driver/src/logger.hpp:40:59: error: no matching function for call to 'cass::AsyncQueue<cass::MPMCQueue<cass::Logger::LogMessage*> >::init(uv_loop_t*, cass::Logger* const, void (&)(uv_async_t*, int))'
int init() { return log_queue_.init(loop(), this, on_log); }
^
/root/libraries/cass_cpp-driver/git2/cpp-driver/src/logger.hpp:40:59: note: candidate is:
In file included from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/event_thread.hpp:21:0,
from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/session.hpp:20,
from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/types.hpp:22,
from /root/libraries/cass_cpp-driver/git2/cpp-driver/src/buffer_collection.cpp:19:
/root/libraries/cass_cpp-driver/git2/cpp-driver/src/async_queue.hpp:34:7: note: int cass::AsyncQueue<Q>::init(uv_loop_t*, void*, uv_async_cb) [with Q = cass::MPMCQueue<cass::Logger::LogMessage*>; uv_loop_t = uv_loop_s; uv_async_cb = void (*)(uv_async_s*); uv_async_t = uv_async_s] <near match>
int init(uv_loop_t* loop, void* data, uv_async_cb async_cb) {
^
/root/libraries/cass_cpp-driver/git2/cpp-driver/src/async_queue.hpp:34:7: note: no known conversion for argument 3 from 'void(uv_async_t*, int) {aka void(uv_async_s*, int)}' to 'uv_async_cb {aka void (*)(uv_async_s*)}'
make[2]: *** [CMakeFiles/cassandra.dir/src/buffer_collection.cpp.o] Error 1
make[1]: *** [CMakeFiles/cassandra.dir/all] Error 2
make: *** [all] Error 2
I've already fixed this compile errors in Cassandra cpp-driver, by down-versioning libuv to version libuv-0.10, the compile errors will be gone.
It seems that the latest updates for libuv is not yet supported by Cassandra cpp-driver.