[MacPorts] #53427: opencv build error on 10.9.5
MacPorts
noreply at macports.org
Sat Jan 28 15:36:43 UTC 2017
#53427: opencv build error on 10.9.5
----------------------+--------------------
Reporter: RJVB | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: haspatch | Port: opencv
----------------------+--------------------
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.
--
Ticket URL: <https://trac.macports.org/ticket/53427>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list