Closed khurramHazen closed 5 years ago
same error occurred at 99% with a slightly different cmake config
$ make -j1
...
Scanning dependencies of target gen_opencv_python_source
[ 99%] Generate files for Python bindings and documentation
Note: Class Feature2D has more than 1 base class (not supported by Python C extensions)
Bases: cv::Algorithm, cv::class, cv::Feature2D, cv::Algorithm
Only the first base class will be used
[ 99%] Built target gen_opencv_python_source
Scanning dependencies of target opencv_python3
[ 99%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[ 99%] Linking CXX shared module ../../lib/python3/cv2.cpython-35m-x86_64-linux-gnu.so
[ 99%] Built target opencv_python3
Scanning dependencies of target opencv_annotation
[ 99%] Building CXX object apps/annotation/CMakeFiles/opencv_annotation.dir/opencv_annotation.cpp.o
[ 99%] Linking CXX executable ../../bin/opencv_annotation
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::allocate(unsigned long)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::_OutputArray::create(cv::Size_<int>, int, int, bool, int) const'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:93: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
CMakeFiles/Makefile2:10017: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
$ cmake \
> -D CMAKE_INSTALL_PREFIX=/home/khurram/miniconda3 \
> -D CMAKE_BUILD_TYPE=Release \
> -D CMAE_C_FLAGS="--Wno-unused" \
> -D CMAKE_CXX_FLAGS="-g -Wno-unused" \
> -D WITH_CUDA=ON \
> -D WITH_HALIDE=ON \
> -D ENABLE_FAST_MATH=ON \
> -D OPENCV_PYTHON3_VERSION=REQUIRED \
> -D PYTHON3_EXECUTABLE=/home/khurram/miniconda3/bin/python3.5m \
> -D PYTHON3_INCLUDE_DIR=/home/khurram/miniconda3/include/python3.5m \
> -D PYTHON3_LIBRARY=/home/khurram/miniconda3/lib/libpython3.5m.so \
> -D PYTHON3_NUMPY_INCLUDE_DIRS=/home/khurram/miniconda3/lib/python3.5/site-packages/numpy/core/include \
> -D PYTHON3_PACKAGES_PATH=/home/khurram/miniconda3/lib/python3.5/site-packages \
> -D OPENCV_ENABLE_NONFREE=ON \
> -D OPENCV_EXTRA_MODULES_PATH=/home/khurram/LIBRARIES/OPENCV400rc/opencv_contrib/modules \
> -D OPENCV_FORCE_PYTHON_LIBS=ON \
> -D BUILD_TESTS=OFF \
> -D BUILD_PERF_TESTS=OFF \
> -D BUILD_PROTOBUF=OFF \
> -D PROTOBUF_UPDATE_FILES=ON \
> -D PROTOBUF_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D PROTOBUF_LIBRARY=/home/khurram/miniconda3/lib/libprotobuf.so \
> -D PROTOBUF_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotobuf.so \
> -D PROTOBUF_LITE_LIBRARY=/home/khurram/miniconda3/lib/libprotobuf-lite.so \
> -D PROTOBUF_LITE_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotobuf-lite.so \
> -D PROTOBUF_PROTOC_EXECUTABLE=/home/khurram/miniconda3/bin/protoc \
> -D PROTOBUF_PROTOC_LIBRARY=/home/khurram/miniconda3/lib/libprotoc.so \
> -D PROTOBUF_PROTOC_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotoc.so \
> -D ZLIB_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D ZLIB_LIBRARY_RELEASE=/home/khurram/miniconda3/lib/libz.so.1.2.11 \
> -D TIFF_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D TIFF_LIBRARY_RELEASE=/home/khurram/miniconda3/lib/libtiff.so \
> -D PNG_PNG_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D PNG_LIBRARY_RELEASE=/home/khurram/miniconda3/lib/libpng.so \
> -D JPEG_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D JEPG_LIBRARY=/home/khurram/miniconda3/lib/libjpeg.so \
> -D INSTALL_CREATE_DISTRIB=ON \
> -D HALIDE_ROOT_DIR=/home/khurram/miniconda3/lib \
> -D Halide_DIR=/home/khurram/miniconda3/lib \
> -D HALIDE_INCLUDE_DIR=/home/khurram/miniconda3/include/Halide \
> -D HALIDE_LIBRARY=/home/khurram/miniconda3/lib/libHalide.so \
> -D BUILD_opencv_cudalegacy=OFF \
> -D BUILD_opencv_cudaobjdetect=OFF \
> -D BUILD_opencv_dnn_objdetect=OFF \
> -D BUILD_opencv_objdetect=ON \
> -D BUILD_opencv_xobjdetect=OFF \
> -D BUILD_opencv_world=OFF \
> -D BUILD_opencv_annotation=OFF \
> -D CUDA_FAST_MATH=ON \
> -D CUDA_NVCC_FLAGS='--expt-relaxed-constexpr' \
> -D CUDA_ARCH_BIN=5.2 \
> -D BUILD_opencv_python2=OFF \
> -D BUILD_opencv_python3=ON \
> -D HDF5_CXX_COMPILER_EXECUTABLE=/home/khurram/miniconda3/bin/h5c++ \
> -D HDF5_C_COMPILER_EXECUTABLE=/home/khurram/miniconda3/bin/h5cc \
> -D HDF5_C_INCLUDE_DIR=/home/khurram/miniconda3/include \
> -D HDF5_DIFF_EXECUTABLE=/home/khurram/miniconda3/bin/h5diff \
> -D HDF5_Fortran_COMPILER_EXECUTABLE=/home/khurram/miniconda3/bin/h5fc \
> -D HDF5_hdf5_LIBRARY_RELEASE=/home/khurram/miniconda3/lib/libhdf5.so \
> -D HDF5_z_LIBRARY_RELEASE=/home/khurram/miniconda3/lib/libz.so \
> -D WITH_OPENGL=ON \
> ..
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable exact version "2.7.12")
CMake Warning (dev) at cmake/OpenCVUtils.cmake:102 (find_package):
Ignoring EXACT since no version is requested.
Call Stack (most recent call first):
cmake/OpenCVDetectPython.cmake:58 (find_host_package)
cmake/OpenCVDetectPython.cmake:284 (find_python)
CMakeLists.txt:552 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /home/khurram/miniconda3/bin/python3.5m (found version "3.5.6")
-- Found PythonLibs: /home/khurram/miniconda3/lib/libpython3.5m.so (found suitable exact version "3.5.6")
-- Looking for ccache - not found
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WUNINITIALIZED
-- Performing Test HAVE_CXX_WUNINITIALIZED - Success
-- Performing Test HAVE_C_WUNINITIALIZED
-- Performing Test HAVE_C_WUNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_WNO_COMMENT
-- Performing Test HAVE_CXX_WNO_COMMENT - Success
-- Performing Test HAVE_C_WNO_COMMENT
-- Performing Test HAVE_C_WNO_COMMENT - Success
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_FFAST_MATH
-- Performing Test HAVE_CXX_FFAST_MATH - Success
-- Performing Test HAVE_C_FFAST_MATH
-- Performing Test HAVE_C_FFAST_MATH - Success
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS
-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_C_FFUNCTION_SECTIONS
-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success
-- Performing Test HAVE_CXX_FDATA_SECTIONS
-- Performing Test HAVE_CXX_FDATA_SECTIONS - Success
-- Performing Test HAVE_C_FDATA_SECTIONS
-- Performing Test HAVE_C_FDATA_SECTIONS - Success
-- Performing Test HAVE_CXX_MSSE (check file: cmake/checks/cpu_sse.cpp)
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2 (check file: cmake/checks/cpu_sse2.cpp)
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3 (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_CXX_MSSSE3 (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CXX_MSSSE3 - Success
-- Performing Test HAVE_CXX_MSSE4_1 (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CXX_MSSE4_1 - Success
-- Performing Test HAVE_CXX_MPOPCNT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CXX_MPOPCNT - Success
-- Performing Test HAVE_CXX_MSSE4_2 (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CXX_MSSE4_2 - Success
-- Performing Test HAVE_CXX_MF16C (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CXX_MF16C - Success
-- Performing Test HAVE_CXX_MFMA
-- Performing Test HAVE_CXX_MFMA - Success
-- Performing Test HAVE_CXX_MAVX (check file: cmake/checks/cpu_avx.cpp)
-- Performing Test HAVE_CXX_MAVX - Success
-- Performing Test HAVE_CXX_MAVX2 (check file: cmake/checks/cpu_avx2.cpp)
-- Performing Test HAVE_CXX_MAVX2 - Success
-- Performing Test HAVE_CXX_MAVX512F (check file: cmake/checks/cpu_avx512.cpp)
-- Performing Test HAVE_CXX_MAVX512F - Success
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD_MAVX512VL_MAVX512BW_MAVX512DQ (check file: cmake/checks/cpu_avx512skx.cpp)
-- Performing Test HAVE_CXX_MAVX512F_MAVX512CD_MAVX512VL_MAVX512BW_MAVX512DQ - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for memalign
-- Looking for memalign - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /home/khurram/miniconda3/lib/libz.so.1.2.11 (found suitable version "1.2.11", minimum required is "1.2.3")
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "90")
-- Found TIFF: /home/khurram/miniconda3/lib/libtiff.so (found version "4.0.9")
-- Found WebP: /usr/lib/x86_64-linux-gnu/libwebp.so
-- Found Jasper: /usr/lib/x86_64-linux-gnu/libjasper.so (found version "1.900.1")
-- Found ZLIB: /home/khurram/miniconda3/lib/libz.so.1.2.11 (found version "1.2.11")
-- Found PNG: /home/khurram/miniconda3/lib/libpng.so (found version "1.6.34")
-- Looking for /home/khurram/miniconda3/include/libpng/png.h
-- Looking for /home/khurram/miniconda3/include/libpng/png.h - not found
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- Checking for module 'gtk+-3.0'
-- No package 'gtk+-3.0' found
-- Checking for module 'gtk+-2.0'
-- Found gtk+-2.0, version 2.24.30
-- Checking for module 'gthread-2.0'
-- Found gthread-2.0, version 2.48.2
-- Checking for module 'gtkglext-1.0'
-- No package 'gtkglext-1.0' found
-- Checking for module 'gstreamer-base-1.0'
-- No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
-- No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
-- No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
-- No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
-- No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
-- Found gstreamer-base-0.10, version 0.10.36
-- Checking for module 'gstreamer-video-0.10'
-- Found gstreamer-video-0.10, version 0.10.36
-- Checking for module 'gstreamer-app-0.10'
-- Found gstreamer-app-0.10, version 0.10.36
-- Checking for module 'gstreamer-riff-0.10'
-- Found gstreamer-riff-0.10, version 0.10.36
-- Checking for module 'gstreamer-pbutils-0.10'
-- Found gstreamer-pbutils-0.10, version 0.10.36
-- Checking for module 'libdc1394-2'
-- Found libdc1394-2, version 2.2.4
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
-- Found libavcodec, version 58.19.100
-- Found libavformat, version 58.13.100
-- Found libavutil, version 56.15.100
-- Found libswscale, version 5.2.100
-- Checking for module 'libavresample'
-- No package 'libavresample' found
-- IPPICV: Download: ippicv_2019_lnx_intel64_general_20180723.tgz
-- found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold]
-- at: /home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/icv
-- found Intel IPP Integration Wrappers sources: 2019.0.0
-- at: /home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/iw
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- CUDA detected: 9.0
-- CUDA NVCC target flags: --expt-relaxed-constexpr;-gencode;arch=compute_52,code=sm_52;-D_FORCE_INLINES
-- Check size of int
-- Check size of int - done
-- Found MKL 2019.0.0 at: /home/khurram/miniconda3
-- LAPACK(MKL): LAPACK_LIBRARIES: /home/khurram/miniconda3/lib/libmkl_intel_lp64.so;/home/khurram/miniconda3/lib/libmkl_sequential.so;/home/khurram/miniconda3/lib/libmkl_core.so;/home/khurram/miniconda3/lib/libmkl_intel_lp64.so;/home/khurram/miniconda3/lib/libmkl_sequential.so;/home/khurram/miniconda3/lib/libmkl_core.so;/home/khurram/miniconda3/lib/libmkl_intel_lp64.so;/home/khurram/miniconda3/lib/libmkl_sequential.so;/home/khurram/miniconda3/lib/libmkl_core.so;-lpthread;-lm;-ldl
-- LAPACK(MKL): Support is enabled.
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Looking for dlerror in dl
-- Looking for dlerror in dl - found
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Failed
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- ADE: Download: v0.1.1c.zip
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Caffe: NO
-- Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR) (found version "3.6.0")
-- Protobuf: NO
-- Glog: YES
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Success
-- Checking for one of the modules 'freetype2'
-- Checking for one of the modules 'harfbuzz'
-- freetype2: YES
-- harfbuzz: YES
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /home/khurram/miniconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/khurram/miniconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.2")
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success
-- Checking SFM deps... TRUE
-- CERES support is disabled. Ceres Solver for reconstruction API is required.
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Performing Test HAVE_CXX_WNO_PARENTHESES
-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success
-- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_MAYBE_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
-- Performing Test HAVE_CXX_WNO_DEPRECATED
-- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Failed
-- freetype2: YES
-- harfbuzz: YES
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL - Success
-- Checking for modules 'tesseract;lept'
-- No package 'tesseract' found
-- No package 'lept' found
-- Tesseract: NO
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Failed
-- xfeatures2d/boostdesc: Download: boostdesc_bgm.i
-- xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Download: boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Download: boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Download: boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Download: boostdesc_lbgm.i
-- xfeatures2d/vgg: Download: vgg_generated_48.i
-- xfeatures2d/vgg: Download: vgg_generated_64.i
-- xfeatures2d/vgg: Download: vgg_generated_80.i
-- xfeatures2d/vgg: Download: vgg_generated_120.i
-- data: Download: face_landmark_model.dat
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Checking SFM deps... TRUE
-- CERES support is disabled. Ceres Solver for reconstruction API is required.
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Failed
-- Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD
-- Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Failed
--
-- General configuration for OpenCV 4.0.0-rc =====================================
-- Version control: 4.0.0-rc
--
-- Extra modules:
-- Location (extra): /home/khurram/LIBRARIES/OPENCV400rc/opencv_contrib/modules
-- Version control (extra): 4.0.0-rc
--
-- Platform:
-- Timestamp: 2018-11-17T22:24:38Z
-- Host: Linux 4.15.0-32-generic x86_64
-- CMake: 3.12.2
-- 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 (4 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (10 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- AVX512_SKX (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 5.4.0)
-- C++ flags (Release): -g -Wno-unused -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -g -Wno-unused -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -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-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -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-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: m pthread /home/khurram/miniconda3/lib/libHalide.so cudart_static -lpthread dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-9.0/lib64 -L/usr/lib/x86_64-linux-gnu
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudaoptflow cudastereo cudawarping cudev datasets dnn dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 python_bindings_generator reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab xfeatures2d ximgproc xphoto
-- Disabled: cudalegacy cudaobjdetect dnn_objdetect python2 world xobjdetect
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj cvv java js matlab ovis ts viz
-- Applications: apps
-- Documentation: NO
-- Non-free algorithms: YES
--
-- GUI:
-- GTK+: YES (ver 2.24.30)
-- GThread : YES (ver 2.48.2)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /home/khurram/miniconda3/lib/libz.so.1.2.11 (ver 1.2.11)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 90)
-- WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202)
-- PNG: /home/khurram/miniconda3/lib/libpng.so (ver 1.6.34)
-- TIFF: /home/khurram/miniconda3/lib/libtiff.so (ver 42 / 4.0.9)
-- 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.0)
-- HDR: YES
-- SUNRASTER: YES
-- PXM: YES
-- PFM: YES
--
-- Video I/O:
-- DC1394: YES (ver 2.2.4)
-- FFMPEG: YES
-- avcodec: YES (ver 58.19.100)
-- avformat: YES (ver 58.13.100)
-- avutil: YES (ver 56.15.100)
-- swscale: YES (ver 5.2.100)
-- avresample: NO
-- GStreamer:
-- base: YES (ver 0.10.36)
-- video: YES (ver 0.10.36)
-- app: YES (ver 0.10.36)
-- riff: YES (ver 0.10.36)
-- pbutils: YES (ver 0.10.36)
-- v4l/v4l2: linux/videodev2.h
--
-- Parallel framework: pthreads
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Intel IPP: 2019.0.0 Gold [2019.0.0]
-- at: /home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/icv
-- Intel IPP IW: sources (2019.0.0)
-- at: /home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/iw
-- Lapack: YES (/home/khurram/miniconda3/lib/libmkl_intel_lp64.so /home/khurram/miniconda3/lib/libmkl_sequential.so /home/khurram/miniconda3/lib/libmkl_core.so /home/khurram/miniconda3/lib/libmkl_intel_lp64.so /home/khurram/miniconda3/lib/libmkl_sequential.so /home/khurram/miniconda3/lib/libmkl_core.so /home/khurram/miniconda3/lib/libmkl_intel_lp64.so /home/khurram/miniconda3/lib/libmkl_sequential.so /home/khurram/miniconda3/lib/libmkl_core.so -lpthread -lm -ldl)
-- Halide: YES (/home/khurram/miniconda3/lib/libHalide.so /home/khurram/miniconda3/include/Halide)
-- Eigen: YES (ver 3.3.90)
-- Custom HAL: NO
-- Protobuf: /home/khurram/miniconda3/lib/libprotobuf.so (3.6.0)
--
-- NVIDIA CUDA: YES (ver 9.0, CUFFT CUBLAS NVCUVID FAST_MATH)
-- NVIDIA GPU arch: 52
-- NVIDIA PTX archs:
--
-- OpenCL: YES (no extra features)
-- Include path: /home/khurram/LIBRARIES/OPENCV34/opencv/3rdparty/include/opencl/1.2
-- Link libraries: Dynamic load
--
-- Python 3:
-- Interpreter: /home/khurram/miniconda3/bin/python3.5m (ver 3.5.6)
-- Libraries: /home/khurram/miniconda3/lib/libpython3.5m.so (ver 3.5.6)
-- numpy: /home/khurram/miniconda3/lib/python3.5/site-packages/numpy/core/include (ver 1.15.2)
-- packages path: /home/khurram/miniconda3/lib/python3.5/site-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Install to: /home/khurram/miniconda3
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/khurram/LIBRARIES/OPENCV34/opencv/build
I have tried multiple rebuilds with slightly different cmake configs (turning troubling modules off each time) but at the end same error occurs. In current case it occurs either at 99% mark (building opencv_annotation, which I have tried to turn off using BUILD_opencv_annotation=OFF, but I don't think there is any such flag) or at 100% (building cv2, I guess it is the python binding generation part). The error is same almost always. (libopencv_core undefined reference). One thing to note here is I am not building Protobuf instead I am trying to use pre-installed protobuf in miniconda folder using following flags and paths:
-D BUILD_PROTOBUF=OFF \
-D PROTOBUF_UPDATE_FILES=ON \
-D PROTOBUF_INCLUDE_DIR=/home/khurram/miniconda3/include \
-D PROTOBUF_LIBRARY=/home/khurram/miniconda3/lib/libprotobuf.so \
-D PROTOBUF_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotobuf.so \
-D PROTOBUF_LITE_LIBRARY=/home/khurram/miniconda3/lib/libprotobuf-lite.so \
-D PROTOBUF_LITE_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotobuf-lite.so \
-D PROTOBUF_PROTOC_EXECUTABLE=/home/khurram/miniconda3/bin/protoc \
-D PROTOBUF_PROTOC_LIBRARY=/home/khurram/miniconda3/lib/libprotoc.so \
-D PROTOBUF_PROTOC_LIBRARY_DEBUG=/home/khurram/miniconda3/lib/libprotoc.so \
Some examples of the errors are given below. (Same error-libopencv_core undefined reference to-at different build position)
[ 16%] Linking CXX executable ../../bin/example_phase_unwrapping_unwrap
cd /home/khurram/LIBRARIES/OPENCV34/opencv/build/modules/phase_unwrapping && /home/khurram/miniconda3/bin/cmake -E cmake_link_script CMakeFiles/example_phase_unwrapping_unwrap.dir/link.txt --verbose=1
/usr/bin/c++ -g -H -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 -Wno-narrowing -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 -Wl,--gc-sections CMakeFiles/example_phase_unwrapping_unwrap.dir/samples/unwrap.cpp.o -o ../../bin/example_phase_unwrapping_unwrap -L/usr/local/cuda-9.0/lib64 -Wl,-rpath,/usr/local/cuda-9.0/lib64:/home/khurram/LIBRARIES/OPENCV34/opencv/build/lib ../../lib/libopencv_phase_unwrapping.so.4.0.0 ../../lib/libopencv_highgui.so.4.0.0 ../../lib/libopencv_videoio.so.4.0.0 ../../lib/libopencv_imgcodecs.so.4.0.0 ../../lib/libopencv_imgproc.so.4.0.0 ../../lib/libopencv_core.so.4.0.0 ../../lib/libopencv_cudev.so.4.0.0
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::allocate(unsigned long)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::_OutputArray::create(cv::Size_<int>, int, int, bool, int) const'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
modules/phase_unwrapping/CMakeFiles/example_phase_unwrapping_unwrap.dir/build.make:90: recipe for target 'bin/example_phase_unwrapping_unwrap' failed
make[2]: *** [bin/example_phase_unwrapping_unwrap] Error 1
make[2]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
CMakeFiles/Makefile2:3110: recipe for target 'modules/phase_unwrapping/CMakeFiles/example_phase_unwrapping_unwrap.dir/all' failed
make[1]: *** [modules/phase_unwrapping/CMakeFiles/example_phase_unwrapping_unwrap.dir/all] Error 2
make[1]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
[100%] Building CXX object apps/version/CMakeFiles/opencv_version.dir/opencv_version.cpp.o
cd /home/khurram/LIBRARIES/OPENCV34/opencv/build/apps/version && /usr/bin/c++ -D__OPENCV_APPS=1 -D__OPENCV_BUILD=1 -I/home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/iw/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/build -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/core/include -I/home/khurram/LIBRARIES/OPENCV34/opencv_contrib/modules/cudev/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/apps/version/PRIVATE -I/home/khurram/LIBRARIES/OPENCV34/opencv/include/opencv -isystem /usr/local/include/eigen3 -isystem /home/khurram/miniconda3/include -g -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 -Wno-narrowing -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 -fPIE -std=c++11 -o CMakeFiles/opencv_version.dir/opencv_version.cpp.o -c /home/khurram/LIBRARIES/OPENCV34/opencv/apps/version/opencv_version.cpp
[100%] Linking CXX executable ../../bin/opencv_version
cd /home/khurram/LIBRARIES/OPENCV34/opencv/build/apps/version && /home/khurram/miniconda3/bin/cmake -E cmake_link_script CMakeFiles/opencv_version.dir/link.txt --verbose=1
/usr/bin/c++ -g -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 -Wno-narrowing -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 -Wl,--gc-sections CMakeFiles/opencv_version.dir/opencv_version.cpp.o -o ../../bin/opencv_version -L/usr/local/cuda-9.0/lib64 -Wl,-rpath,/usr/local/cuda-9.0/lib64:/home/khurram/LIBRARIES/OPENCV34/opencv/build/lib: -ldl -lm -lpthread -lrt ../../3rdparty/lib/libippiw.a ../../3rdparty/ippicv/ippicv_lnx/icv/lib/intel64/libippicv.a -lcudart_static -lpthread -ldl -lrt -lnppc -lnppial -lnppicc -lnppicom -lnppidei -lnppif -lnppig -lnppim -lnppist -lnppisu -lnppitc -lnpps -lcublas -lcufft -L/usr/local/cuda-9.0/lib64 -L/usr/lib/x86_64-linux-gnu ../../lib/libopencv_core.so.4.0.0 -lm -lpthread -lcudart_static -lpthread -lnppc -lnppial -lnppicc -lnppicom -lnppidei -lnppif -lnppig -lnppim -lnppist -lnppisu -lnppitc -lnpps -lcublas -lcufft ../../lib/libopencv_cudev.so.4.0.0
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::allocate(unsigned long)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::deallocate()'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::_OutputArray::create(cv::Size_<int>, int, int, bool, int) const'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
apps/version/CMakeFiles/opencv_version.dir/build.make:87: recipe for target 'bin/opencv_version' failed
make[3]: *** [bin/opencv_version] Error 1
make[3]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
CMakeFiles/Makefile2:10312: recipe for target 'apps/version/CMakeFiles/opencv_version.dir/all' failed
make[2]: *** [apps/version/CMakeFiles/opencv_version.dir/all] Error 2
make[2]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
CMakeFiles/Makefile2:10324: recipe for target 'apps/version/CMakeFiles/opencv_version.dir/rule' failed
make[1]: *** [apps/version/CMakeFiles/opencv_version.dir/rule] Error 2
make[1]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
Makefile:2511: recipe for target 'opencv_version' failed
make: *** [opencv_version] Error 2
[100%] Building CXX object apps/annotation/CMakeFiles/opencv_annotation.dir/opencv_annotation.cpp.o
cd /home/khurram/LIBRARIES/OPENCV34/opencv/build/apps/annotation && /usr/bin/c++ -D__OPENCV_APPS=1 -D__OPENCV_BUILD=1 -I/home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/icv/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/build/3rdparty/ippicv/ippicv_lnx/iw/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/build -isystem /usr/local/include/eigen3 -isystem /home/khurram/miniconda3/include -I/home/khurram/miniconda3/include/Halide -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/core/include -I/home/khurram/LIBRARIES/OPENCV34/opencv_contrib/modules/cudev/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/highgui/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/imgproc/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/imgcodecs/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/modules/videoio/include -I/home/khurram/LIBRARIES/OPENCV34/opencv/apps/annotation/PRIVATE -I/home/khurram/LIBRARIES/OPENCV34/opencv/include/opencv -g -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -fPIE -std=c++11 -o CMakeFiles/opencv_annotation.dir/opencv_annotation.cpp.o -c /home/khurram/LIBRARIES/OPENCV34/opencv/apps/annotation/opencv_annotation.cpp
/usr/bin/cmake: /home/khurram/miniconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[100%] Linking CXX executable ../../bin/opencv_annotation
cd /home/khurram/LIBRARIES/OPENCV34/opencv/build/apps/annotation && /usr/bin/cmake -E cmake_link_script CMakeFiles/opencv_annotation.dir/link.txt --verbose=1
/usr/bin/cmake: /home/khurram/miniconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/c++ -g -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -Wl,--gc-sections CMakeFiles/opencv_annotation.dir/opencv_annotation.cpp.o -o ../../bin/opencv_annotation -L/usr/local/cuda/lib64 -L/home/khurram/miniconda3/lib -ldl -lm -lpthread -lrt ../../3rdparty/lib/libippiw.a ../../3rdparty/ippicv/ippicv_lnx/icv/lib/intel64/libippicv.a -lHalide -lcudart -lnppc -lnppial -lnppicc -lnppicom -lnppidei -lnppif -lnppig -lnppim -lnppist -lnppisu -lnppitc -lnpps -lcublas -lcufft -L/usr/local/cuda/lib64 ../../lib/libopencv_highgui.so.4.0.0 ../../lib/libopencv_videoio.so.4.0.0 ../../lib/libopencv_imgcodecs.so.4.0.0 ../../lib/libopencv_imgproc.so.4.0.0 ../../lib/libopencv_core.so.4.0.0 ../../lib/libopencv_cudev.so.4.0.0 -Wl,-rpath,/usr/local/cuda/lib64:/home/khurram/miniconda3/lib:/home/khurram/LIBRARIES/OPENCV34/opencv/build/lib:
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::allocate(unsigned long)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::deallocate()'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::_OutputArray::create(cv::Size_<int>, int, int, bool, int) const'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:103: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
make[2]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
CMakeFiles/Makefile2:10150: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
make[1]: Leaving directory '/home/khurram/LIBRARIES/OPENCV34/opencv/build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
[ 99%] Built target opencv_python3
Scanning dependencies of target opencv_annotation
[ 99%] Building CXX object apps/annotation/CMakeFiles/opencv_annotation.dir/opencv_annotation.cpp.o
[ 99%] Linking CXX executable ../../bin/opencv_annotation
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::allocate(unsigned long)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::_OutputArray::create(cv::Size_<int>, int, int, bool, int) const'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
../../lib/libopencv_core.so.4.0.0: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:93: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
CMakeFiles/Makefile2:10017: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
@alalek Any suggestion?
String::allocate
Your build logs blame on code removed from OpenCV 4.0. It is available in 3.x only: https://github.com/opencv/opencv/blob/3.4.4/modules/core/include/opencv2/core/cvstd.hpp#L553
We can't fix that we can't reproduce on our side.
Perhaps you have installed OpenCV 3.x before somewhere/somehow.
You should investigate this problem yourself with help of make VERBOSE=1
and gcc -H
option (see previous issue for details).
OpenCV 3.4 was installed somehow. Removing it resolved the subjected issue.
System information (version)
Linux GT72S 4.15.0-32-generic #35~16.04.1-Ubuntu SMP Fri Aug 10 21:54:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
CMAKE STDOUT
Detailed description
System information (version)
Detailed description
Steps to reproduce