Open galenzhao opened 4 years ago
the content of opencv header file:
namespace sfinae {
template<typename C, typename Ret, typename... Args>
struct has_parenthesis_operator
{
private:
template<typename T>
static CV_CONSTEXPR std::true_type check(typename std::is_same<typename std::decay<decltype(std::declval<T>().operator()(std::declval<Args>()...))>::type, Ret>::type*);
template<typename> static CV_CONSTEXPR std::false_type check(...);
typedef decltype(check<C>(0)) type;
public:
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900/*MSVS 2015*/)
static CV_CONSTEXPR bool value = type::value;
#else
// support MSVS 2013
static const int value = type::value;
#endif
};
} // namespace sfinae
cv::detail::PaniniPortraitWarper
This is not a part of OpenCV.
Please provide complete minimal reproducer.
in this file: https://github.com/opencv/opencv/blob/master/modules/stitching/include/opencv2/stitching/warpers.hpp
reproducer:
download OpenCV and OpenCV Contrib, config with:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_EXAMPLES=OFF .. \
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
-DPYTHON_EXECUTABLE:FILEPATH=`which python`
make && make install
all the dependency lib was installed via apt-get.
sudo apt-get update && sudo apt-get install -y \
autoconf \
build-essential \
bzip2 \
capnproto \
libcapnp-dev \
clang \
cmake \
curl \
ffmpeg \
git \
libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev \
libarchive-dev \
libbz2-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libffi-dev \
libglew-dev \
libgles2-mesa-dev \
libglfw3-dev \
libglib2.0-0 \
liblzma-dev \
libmysqlclient-dev \
libomp-dev \
libopencv-dev \
libpng16-16 \
libssl-dev \
libstdc++-arm-none-eabi-newlib \
libsqlite3-dev \
libtool \
libusb-1.0-0-dev \
libzmq3-dev \
libczmq-dev \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev \
libsystemd-dev \
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python-pip \
qt5-default \
screen \
sudo \
vim \
wget \
gcc-arm-none-eabi
sudo apt-get install build-essential \
cmake \
unzip \
pkg-config \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libv4l-dev \
libxvidcore-dev \
libx264-dev \
libgtk-3-dev \
libatlas-base-dev \
gfortran
Looks like it is not a problem of OpenCV build itself.
It is failed during building of user code:
In file included from selfdrive/camerad/cameras/camera_webcam.cc:13:
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:52:
it confused.
https://github.com/commaai/openpilot/blob/master/selfdrive/camerad/cameras/camera_webcam.cc
when the error occurs the webcam.cc file only tries to include an OpenCV header.
#include "camera_webcam.h"
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <pthread.h>
#include "common/util.h"
#include "common/timing.h"
#include "common/swaglog.h"
#include "buffering.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/videoio.hpp>
I'll look into other header files to see if there any related to this problem.
System information (version)
Detailed description
scons: warning: Could not detect qt, using moc executable as a hint (QTDIR=/usr) File "/home/galenzhao/openpilot/SConstruct", line 216, in
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o selfdrive/camerad/main.o -c -std=c++14 -DWEBCAM -g -fPIC -O2 -Wunused -Werror -Wno-deprecated-register -Wno-inconsistent-missing-override -Iexternal/tensorflow/include -I. -Iselfdrive -Iphonelibs/bzip2 -Iphonelibs/libyuv/include -Iphonelibs/openmax/include -Iphonelibs/json11 -Iphonelibs/curl/include -Iphonelibs/libgralloc/include -Iphonelibs/android_frameworks_native/include -Iphonelibs/android_hardware_libhardware/include -Iphonelibs/android_system_core/include -Iphonelibs/linux/include -Iphonelibs/snpe/include -Iphonelibs/nanovg -Iselfdrive/common -Iselfdrive/camerad -Iselfdrive/camerad/include -Iselfdrive/loggerd/include -Iselfdrive/modeld -Iselfdrive/sensord -Iselfdrive/ui -Icereal/messaging -Icereal -Iopendbc/can -Iphonelibs/json11 -I/usr/local/include/opencv4 selfdrive/camerad/main.cc
clang++ -o selfdrive/camerad/imgproc/utils.o -c -std=c++14 -DWEBCAM -g -fPIC -O2 -Wunused -Werror -Wno-deprecated-register -Wno-inconsistent-missing-override -Iexternal/tensorflow/include -I. -Iselfdrive -Iphonelibs/bzip2 -Iphonelibs/libyuv/include -Iphonelibs/openmax/include -Iphonelibs/json11 -Iphonelibs/curl/include -Iphonelibs/libgralloc/include -Iphonelibs/android_frameworks_native/include -Iphonelibs/android_hardware_libhardware/include -Iphonelibs/android_system_core/include -Iphonelibs/linux/include -Iphonelibs/snpe/include -Iphonelibs/nanovg -Iselfdrive/common -Iselfdrive/camerad -Iselfdrive/camerad/include -Iselfdrive/loggerd/include -Iselfdrive/modeld -Iselfdrive/sensord -Iselfdrive/ui -Icereal/messaging -Icereal -Iopendbc/can -Iphonelibs/json11 -I/usr/local/include/opencv4 selfdrive/camerad/imgproc/utils.cc
clang++ -o selfdrive/camerad/cameras/camera_webcam.o -c -std=c++14 -DWEBCAM -g -fPIC -O2 -Wunused -Werror -Wno-deprecated-register -Wno-inconsistent-missing-override -Iexternal/tensorflow/include -I. -Iselfdrive -Iphonelibs/bzip2 -Iphonelibs/libyuv/include -Iphonelibs/openmax/include -Iphonelibs/json11 -Iphonelibs/curl/include -Iphonelibs/libgralloc/include -Iphonelibs/android_frameworks_native/include -Iphonelibs/android_hardware_libhardware/include -Iphonelibs/android_system_core/include -Iphonelibs/linux/include -Iphonelibs/snpe/include -Iphonelibs/nanovg -Iselfdrive/common -Iselfdrive/camerad -Iselfdrive/camerad/include -Iselfdrive/loggerd/include -Iselfdrive/modeld -Iselfdrive/sensord -Iselfdrive/ui -Icereal/messaging -Icereal -Iopendbc/can -Iphonelibs/json11 -I/usr/local/include/opencv4 selfdrive/camerad/cameras/camera_webcam.cc
In file included from selfdrive/camerad/cameras/camera_webcam.cc:13:
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:52:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:54:
In file included from /usr/local/include/opencv4/opencv2/core/base.hpp:58:
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::PaniniPortraitWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function 'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter,
void, cv::detail::FisheyeWarper >::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::CompressedRectilinearWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function 'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter,
void, cv::detail::MercatorWarper >::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::SphericalWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::CompressedRectilinearPortraitWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::TransverseMercatorWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::StereographicWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function
'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter, void, cv::detail::CylindricalWarper
>::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function 'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter,
void, cv::detail::PaniniWarper >::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function 'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter,
void, cv::detail::PlaneWarper >::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:47:60: error: inline function 'cv::sfinae::has_parenthesis_operator<cv::DefaultDeleter,
void, cv::detail::AffineWarper >::check<cv::DefaultDeleter >' is not defined [-Werror,-Wundefined-inline]
template static CV_CONSTEXPR std::false_type check(...);
^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:49:22: note: used here
typedef decltype(check(0)) type;
^
12 errors generated.
scons: *** [selfdrive/camerad/cameras/camera_webcam.o] Error 1
scons: building terminated because of errors.
-- -- General configuration for OpenCV 4.3.0 ===================================== -- Version control: unknown
-- Extra modules: -- Location (extra): /home/galenzhao/opencv_contrib-4.3.0/modules -- Version control (extra): unknown
-- Platform: -- Timestamp: 2020-08-29T08:05:57Z -- Host: Linux 4.15.0-29-generic x86_64 -- CMake: 3.5.1 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make -- Configuration: RELEASE
-- CPU/HW features: -- Baseline: SSE SSE2 SSE3 -- requested: SSE3 -- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX -- requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX -- SSE4_1 (16 files): + SSSE3 SSE4_1 -- SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 -- FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX -- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX -- AVX2 (30 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 -- AVX512_SKX (6 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
-- C/C++: -- Built as dynamic libs?: YES -- C++ standard: 11 -- C++ Compiler: /usr/bin/c++ (ver 5.4.0) -- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /usr/bin/cc -- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release): -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,--gc-sections -Wl,--as-needed -- Linker flags (Debug): -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,--gc-sections -Wl,--as-needed -- ccache: NO -- Precompiled headers: NO -- Extra dependencies: dl m pthread rt -- 3rdparty dependencies:
-- OpenCV modules: -- To be built: alphamat aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto -- Disabled: world -- Disabled by dependency: - -- Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv hdf java js matlab ovis python2 sfm viz -- Applications: tests perf_tests apps -- Documentation: NO -- Non-free algorithms: YES
-- GUI: -- GTK+: YES (ver 3.18.9) -- GThread : YES (ver 2.48.2) -- GtkGlExt: NO -- VTK support: NO
-- Media I/O: -- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8) -- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80) -- WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202) -- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54) -- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.6) -- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1) -- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2_2) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES
-- Video I/O: -- DC1394: YES (2.2.4) -- FFMPEG: YES -- avcodec: YES (56.60.100) -- avformat: YES (56.40.101) -- avutil: YES (54.31.100) -- swscale: YES (3.1.101) -- avresample: YES (2.1.0) -- GStreamer: NO -- v4l/v4l2: YES (linux/videodev2.h)
-- Parallel framework: pthreads
-- Trace: YES (with Intel ITT)
-- Other third-party libraries: -- Intel IPP: 2020.0.0 Gold [2020.0.0] -- at: /home/galenzhao/opencv-4.3.0/build/3rdparty/ippicv/ippicv_lnx/icv -- Intel IPP IW: sources (2020.0.0) -- at: /home/galenzhao/opencv-4.3.0/build/3rdparty/ippicv/ippicv_lnx/iw -- Lapack: NO -- Eigen: YES (ver 3.2.92) -- Custom HAL: NO -- Protobuf: build (3.5.1)
-- OpenCL: YES (no extra features) -- Include path: /home/galenzhao/opencv-4.3.0/3rdparty/include/opencl/1.2 -- Link libraries: Dynamic load
-- Python 3: -- Interpreter: /home/galenzhao/.pyenv/shims/python3 (ver 3.8.2) -- Libraries: /home/galenzhao/.pyenv/versions/3.8.2/lib (ver 3.8.2) -- numpy: /home/galenzhao/.pyenv/versions/3.8.2/lib/python3.8/site-packages/numpy/core/include (ver 1.19.1) -- install path: lib/python3.8/site-packages/cv2/python-3.8
-- Python (for build): /home/galenzhao/.pyenv/shims/python3
-- Java: -- ant: NO -- JNI: NO -- Java wrappers: NO -- Java tests: NO
-- Install to: /usr/local
--