Opened 8 years ago
Closed 4 years ago
#53427 closed defect (worksforme)
opencv build error on 10.9.5
Reported by: | RJVB (René Bertin) | Owned by: | stromnov (Andrey Stromnov) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | mkae (Marko Käning) |
Port: | opencv |
Description
The recent (openmaintainer) upgrade to 3.2.0 seems to be missing a patch to allow building on 10.9.5 with the "stock" AppleClang compiler.
Without the attached patch I get the following error:
:info:build cd /path/to/opencv/work/build/modules/highgui && /usr/bin/clang++ -DCVAPI_EXPORTS -DHIGHGUI_EXPORTS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_TESTCASE_BUILDDIR=\"/path/to/opencv/work/build\" -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -D__OPENCV_BUILD=1 -I/path/to/opencv/work/build/modules/highgui -I/path/to/opencv/work/opencv-3.2.0/modules/highgui -I/path/to/opencv/work/build/Accelerate -I/path/to/opencv/work/build -isystem /opt/local/include/eigen3 -isystem /opt/local/include -iframework /opt/local/libexec/qt5/Library/Frameworks -isystem /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers -isystem /opt/local/share/qt5/mkspecs/macx-clang -isystem /opt/local/libexec/qt5/Library/Frameworks/QtGui.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /opt/local/libexec/qt5/Library/Frameworks/QtWidgets.framework/Headers -isystem /opt/local/libexec/qt5/Library/Frameworks/QtTest.framework/Headers -isystem /opt/local/libexec/qt5/Library/Frameworks/QtConcurrent.framework/Headers -isystem /opt/local/libexec/qt5/Library/Frameworks/QtOpenGL.framework/Headers -I/path/to/opencv/work/opencv-3.2.0/modules/highgui/include -I/path/to/opencv/work/opencv-3.2.0/modules/highgui/src -I/path/to/opencv/work/opencv-3.2.0/modules/core/include -I/path/to/opencv/work/opencv-3.2.0/modules/imgproc/include -I/path/to/opencv/work/opencv-3.2.0/modules/imgcodecs/include -I/path/to/opencv/work/opencv-3.2.0/modules/videoio/include -O3 -march=native -g -DNDEBUG -I/opt/local/include -stdlib=libc++ -fsigned-char -arch x86_64 -mmacosx-version-min=10.9 -fPIC -fPIC -std=gnu++11 -o CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o -c /path/to/opencv/work/opencv-3.2.0/modules/highgui/src/window_QT.cpp :info:build /path/to/opencv/work/opencv-3.2.0/modules/highgui/src/window_QT.cpp:106:66: error: non-constant-expression cannot be narrowed from type 'int' to 'float' in initializer list [-Wc++11-narrowing] :info:build CvFont f = {nameFont,color,style,NULL,NULL,NULL,0,0,0,weight,spacing,pointSize}; :info:build ^~~~~~~ :info:build /path/to/opencv/work/opencv-3.2.0/modules/highgui/src/window_QT.cpp:106:66: note: override this message by inserting an explicit cast :info:build CvFont f = {nameFont,color,style,NULL,NULL,NULL,0,0,0,weight,spacing,pointSize}; :info:build ^~~~~~~ :info:build static_cast<float>( ) :info:build 1 error generated. :info:build make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
Clang is kind enough to indicate the fix, which is trivial and safe.
Attachments (1)
Change History (7)
Changed 8 years ago by RJVB (René Bertin)
Attachment: | patch-cpp11-narrowing-error.diff added |
---|
comment:1 Changed 8 years ago by mf2k (Frank Schima)
Cc: | stromnov removed |
---|---|
Owner: | set to stromnov |
Status: | new → assigned |
comment:2 Changed 8 years ago by mkae (Marko Käning)
Cc: | mkae added |
---|
comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)
comment:5 Changed 4 years ago by mascguy (Christopher Nielsen)
comment:6 Changed 4 years ago by raimue (Rainer Müller)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
This port has been building successfully on 10.9 for quite a while. Can this be closed?