microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.16k stars 6.16k forks source link

[opencv3] Build error on x64-linux #36771

Open geo-ant opened 4 months ago

geo-ant commented 4 months ago

Package: opencv3[contrib,core,cuda,default-features,dnn,flann,gtk,jpeg,png,quirc,tiff,webp]:x64-linux@3.4.18#13

Host Environment

To Reproduce

vcpkg install opencv3[cuda] Failure logs

-- Using cached opencv-opencv-3.4.18.tar.gz.
-- Cleaning sources at /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/xxx/code/vcpkg/downloads/opencv-opencv-3.4.18.tar.gz
-- Applying patch 0001-disable-downloading.patch
-- Applying patch 0002-install-options.patch
-- Applying patch 0003-force-package-requirements.patch
-- Applying patch 0004-fix-eigen.patch
-- Applying patch 0005-fix-vtk9.patch
-- Applying patch 0006-fix-uwp.patch
-- Applying patch 0008-devendor-quirc.patch
-- Applying patch 0009-fix-protobuf.patch
-- Applying patch 0010-fix-uwp-tiff-imgcodecs.patch
-- Applying patch 0011-remove-python2.patch
-- Applying patch 0012-fix-zlib.patch
-- Applying patch 0019-missing-include.patch
-- Applying patch fix-tbb-error.patch
-- Applying patch 0020-fix-supportqnx.patch
-- Using source at /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean
-- Using cached opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz.
-- Using cached opencv-opencv_contrib-3.4.18.tar.gz.
-- Cleaning sources at /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-d0f469aece.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/xxx/code/vcpkg/downloads/opencv-opencv_contrib-3.4.18.tar.gz
-- Applying patch 0007-fix-hdf5.patch
-- Applying patch 0013-fix-ceres.patch
-- Applying patch 0016-fix-freetype-contrib.patch
-- Applying patch 0018-fix-depend-tesseract.patch
-- Using source at /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-d0f469aece.clean
-- Using cached opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat.
-- Configuring x64-linux
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /snap/cmake/1366/bin/cmake --build . --config Debug --target install -- -v -j13
    Working Directory: /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg
    See logs for more information:
      /home/xxx/code/vcpkg/buildtrees/opencv3/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/opencv3/portfile.cmake:408 (vcpkg_cmake_install)
  scripts/ports.cmake:170 (include)
/home/xxx/code/vcpkg/buildtrees/opencv3/install-x64-linux-dbg-out.log ``` Change Dir: '/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg' Run Build Command(s): /home/xxx/code/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j13 install [1/982] cd /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg && /snap/cmake/1366/bin/cmake -DCMAKE_HELPER_SCRIPT=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/OpenCVGenPkgConfig.info.cmake -P /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/cmake/OpenCVGenPkgconfig.cmake CMake Deprecation Warning at /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/cmake/OpenCVGenPkgconfig.cmake:113 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. [2/982] /usr/bin/c++ -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/cudev/include -I/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/cudev -I/home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/include -isystem /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg -fPIC -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-undef -Wno-missing-declarations -Wno-unused-function -Wno-unused-variable -Wno-enum-compare -Wno-shadow -g -O0 -DDEBUG -D_DEBUG -std=c++11 -fPIC -MD -MT modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o -MF modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o.d -o modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o -c /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/cudev/src/stub.cpp [3/982] : && /snap/cmake/1366/bin/cmake -E rm -f lib/libopencv_cudev3d.a && /usr/bin/ar qc lib/libopencv_cudev3d.a modules/cudev/CMakeFiles/opencv_cudev.dir/src/stub.cpp.o && /usr/bin/ranlib lib/libopencv_cudev3d.a && : [4/982] cd /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core && /snap/cmake/1366/bin/cmake -DMODULE_NAME=core -DCL_DIR=/home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/opencl -DOUTPUT=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/opencl_kernels_core.cpp -P /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/cmake/cl2cpp.cmake [5/982] cd /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda && /snap/cmake/1366/bin/cmake -E make_directory /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/. && /snap/cmake/1366/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D generated_file:STRING=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o -D generated_cubin_file:STRING=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o.cubin.txt -P /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o.Debug.cmake FAILED: modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o cd /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda && /snap/cmake/1366/bin/cmake -E make_directory /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/. && /snap/cmake/1366/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D generated_file:STRING=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o -D generated_cubin_file:STRING=/home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o.cubin.txt -P /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o.Debug.cmake nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced /home/xxx/code/vcpkg/buildtrees/opencv3/src/3.4.18-ee7654c938.clean/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 | function(_Functor&& __f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 | operator=(_Functor&& __f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.Debug.cmake:280 (message): Error generating file /home/xxx/code/vcpkg/buildtrees/opencv3/x64-linux-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o ninja: build stopped: subcommand failed. ```
LilyWangLL commented 3 months ago

I can reproduce this issue locally, I will investigate this issue soon.

geo-ant commented 1 month ago

Hi, I was wondering if there are any updates or if I should provide additional information?