Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opencv4[contrib]] build failure #10139

Closed
theoractice opened this issue Feb 19, 2020 · 26 comments
Closed

[opencv4[contrib]] build failure #10139

theoractice opened this issue Feb 19, 2020 · 26 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support requires:repro The issue is not currently repro-able

Comments

@theoractice
Copy link

Host Environment

  • OS: Win10
  • Compiler: VS2019

To Reproduce
Steps to reproduce the behavior:
vcpkg install opencv4[contrib] --recurse

Failure logs

D:\Coding\vcpkg (master -> origin)
⠕ vcpkg install opencv4[contrib] --recurse
Computing installation plan...
The following packages will be built and installed:
    opencv4[contrib,core,dnn,jpeg,opengl,png,tiff,webp]:x86-windows
Starting package 1/1: opencv4:x86-windows
Building package opencv4[contrib,core,dnn,jpeg,opengl,png,tiff,webp]:x86-windows...
-- Using cached D:/Coding/vcpkg/downloads/opencv-opencv-4.1.1.tar.gz
-- Using source at D:/Coding/vcpkg/buildtrees/opencv4/src/4.1.1-fb9e10326a
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz
-- Using cached D:/Coding/vcpkg/downloads/opencv-opencv_contrib-4.1.1.tar.gz
-- Using source at D:/Coding/vcpkg/buildtrees/opencv4/src/4.1.1-521dd00bd2
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: D:/Coding/vcpkg/downloads/tools/cmake-3.14.0-windows/cmake-3.14.0-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
    Working Directory: D:/Coding/vcpkg/buildtrees/opencv4/x86-windows-dbg
    See logs for more information:
      D:\Coding\vcpkg\buildtrees\opencv4\install-x86-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/opencv4/portfile.cmake:332 (vcpkg_install_cmake)
  scripts/ports.cmake:90 (include)


Error: Building package opencv4:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: opencv4:x86-windows
  Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

install-x86-windows-dbg-out.log

@theoractice theoractice added the category:port-bug The issue is with a library, which is something the port should already support label Feb 19, 2020
@cenit
Copy link
Contributor

cenit commented Feb 19, 2020

From your log:

LINK : fatal error LNK1168: cannot open bin\opencv_imgprocd.dll for writing

I also have spurious filesystem issues, unrelated to ports. May be related to something else?

@theoractice
Copy link
Author

theoractice commented Feb 20, 2020

@cenit

From your log:

LINK : fatal error LNK1168: cannot open bin\opencv_imgprocd.dll for writing

I also have spurious filesystem issues, unrelated to ports. May be related to something else?

What's weird about this problem is that it doesn't happen every time. If I build with --recurse option then the failure odds seems to increase a lot, but I cannot guarantee that...

@JackBoosY
Copy link
Contributor

Hi @theoractice, thanks for reporting this issue!
Could you add DISABLE_PARALLEL_CONFIGURE to vcpkg_configure_cmake in VCPKG_PATH/ports/opencv4/portfile.cmake and try again?

Thanks.

@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Feb 21, 2020
@theoractice
Copy link
Author

theoractice commented Feb 21, 2020

@JackBoosY Building always fail after I set the DISABLE_PARALLEL_CONFIGURE:

D:\Coding\vcpkg (master -> origin)
⠕ vcpkg install opencv4[contrib,ffmpeg] --recurse
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
The following packages will be built and installed:
    opencv4[contrib,core,dnn,ffmpeg,jpeg,opengl,png,tiff,webp]:x86-windows
Starting package 1/1: opencv4:x86-windows
Building package opencv4[contrib,core,dnn,ffmpeg,jpeg,opengl,png,tiff,webp]:x86-windows...
-- Using cached D:/Coding/vcpkg/downloads/opencv-opencv-4.1.1.tar.gz
-- Using source at D:/Coding/vcpkg/buildtrees/opencv4/src/4.1.1-fb9e10326a
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz
-- Using cached D:/Coding/vcpkg/downloads/opencv-opencv_contrib-4.1.1.tar.gz
-- Using source at D:/Coding/vcpkg/buildtrees/opencv4/src/4.1.1-521dd00bd2
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/boostdesc/0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/xfeatures2d/vgg/151805e03568c9f490a5e3a872777b75-vgg_generated_120.i
-- Using cached D:/Coding/vcpkg/downloads/opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed
-- Restarting Build x86-windows-rel because of mt.exe file locking issue. Iteration: 1
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:114 (file):
  file failed to open for reading (No such file or directory):

    D:/Coding/vcpkg/-out-1.log
Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/opencv4/portfile.cmake:333 (vcpkg_install_cmake)
  scripts/ports.cmake:90 (include)


Error: Building package opencv4:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: opencv4:x86-windows
  Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

I don't have any antivirus software installed on my machine, even Windows Defender is disabled.

This is how I modified the portfile.cmake:

vcpkg_configure_cmake(
    DISABLE_PARALLEL_CONFIGURE
    PREFER_NINJA
    SOURCE_PATH ${SOURCE_PATH}
    OPTIONS
...

@JackBoosY
Copy link
Contributor

@theoractice Could you remove DISABLE_PARALLEL_CONFIGURE, go to VCPKG_PATH/buildtrees/opencv4/x86-windows-dbg/ and run the following command using cmd:

D:\Coding\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1424~1.283\bin\Hostx64\x86\link.exe  modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\approx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\bilateral_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\blend.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\box_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\canny.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\clahe.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_hsv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_lab.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_rgb.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_yuv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\colormap.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\connectedcomponents.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\contours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\convhull.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\cornersubpix.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\demosaicing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\deriv.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\distransform.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\drawing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\emd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\featureselect.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\floodfill.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\gabor.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\generalized_hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\geometry.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\grabcut.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hershey_fonts.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\histogram.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\intersection.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\linefit.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\lsd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\main.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\matchcontours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\median_blur.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\min_enclosing_triangle.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\moments.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\morph.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\phasecorr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\pyramids.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\rotcalipers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\samplers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\segmentation.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\shapedescr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\smooth.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\spatialgradient.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\subdivision2d.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\sumpixels.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\tables.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\templmatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\thresh.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\utils.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencl_kernels_imgproc.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\box_filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_hsv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_rgb.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_yuv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\median_blur.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\morph.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\smooth.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\vs_version.rc.res modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencv_imgproc_main.cpp.obj  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.1 /machine:X86  /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  lib\opencv_cored.lib opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

@theoractice
Copy link
Author

@JackBoosY

D:\Coding\vcpkg\buildtrees\opencv4\x86-windows-dbg (master -> origin)
⠕ D:\Coding\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1424~1.283\bin\Hostx64\x86\link.exe  modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\approx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\bilateral_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\blend.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\box_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\canny.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\clahe.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_hsv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_lab.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_rgb.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_yuv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\colormap.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\connectedcomponents.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\contours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\convhull.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\cornersubpix.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\demosaicing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\deriv.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\distransform.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\drawing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\emd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\featureselect.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\floodfill.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\gabor.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\generalized_hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\geometry.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\grabcut.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hershey_fonts.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\histogram.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\intersection.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\linefit.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\lsd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\main.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\matchcontours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\median_blur.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\min_enclosing_triangle.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\moments.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\morph.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\phasecorr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\pyramids.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\rotcalipers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\samplers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\segmentation.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\shapedescr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\smooth.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\spatialgradient.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\subdivision2d.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\sumpixels.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\tables.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\templmatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\thresh.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\utils.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencl_kernels_imgproc.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\box_filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_hsv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_rgb.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_yuv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\median_blur.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\morph.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\smooth.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\vs_version.rc.res modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencv_imgproc_main.cpp.obj  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.1 /machine:X86  /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  lib\opencv_cored.lib opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1424~1.283\bin\Hostx64\x86\link.exe modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\accum.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\approx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\bilateral_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\blend.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\box_filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\canny.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\clahe.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_hsv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_lab.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_rgb.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\color_yuv.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\colormap.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\connectedcomponents.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\contours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\convhull.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\cornersubpix.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\demosaicing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\deriv.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\distransform.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\drawing.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\emd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\featureselect.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\filter.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\floodfill.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\gabor.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\generalized_hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\geometry.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\grabcut.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hershey_fonts.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\histogram.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\hough.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\intersection.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\linefit.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\lsd.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\main.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\matchcontours.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\median_blur.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\min_enclosing_triangle.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\moments.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\morph.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\phasecorr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\pyramids.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\rotcalipers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\samplers.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\segmentation.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\shapedescr.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\smooth.dispatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\spatialgradient.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\subdivision2d.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\sumpixels.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\tables.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\templmatch.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\thresh.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\utils.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencl_kernels_imgproc.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\imgwarp.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\box_filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\filter.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_hsv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_rgb.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_yuv.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\median_blur.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\morph.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\smooth.sse4_1.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\corner.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.avx.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\vs_version.rc.res modules\imgproc\CMakeFiles\opencv_imgproc.dir\opencv_imgproc_main.cpp.obj /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.1 /machine:X86 /debug /INCREMENTAL /NODEFAULTLIB:libc /DEBUG lib\opencv_cored.lib opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:modules\imgproc\CMakeFiles\opencv_imgproc.dir/intermediate.manifest modules\imgproc\CMakeFiles\opencv_imgproc.dir/manifest.res" failed (exit code 1104) with the following output:
Microsoft (R) Incremental Linker Version 14.24.28316.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1104: 无法打开文件“opengl32.lib”

I think basically it says cannot open file “opengl32.lib”, however the opengl lib is there. I tried to reinstall opengl and this error still exists.

@theoractice
Copy link
Author

theoractice commented Feb 26, 2020

Today I gave it another try:
vcpkg install opencv[contrib,ffmpeg]
And I encounted the same failure notice as in #10195:

-- mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed
-- Restarting Build x64-windows-rel because of mt.exe file locking issue. Iteration: 1

However the build process continued and succeeded at last.
I am not using Administrator priviledge to run the build command so that may not be the cause.

@JackBoosY
Copy link
Contributor

@theoractice There may be some problems there, which is why this message is displayed : )

So, does this issue resolved?

@theoractice
Copy link
Author

theoractice commented Mar 4, 2020

@theoractice There may be some problems there, which is why this message is displayed : )

So, does this issue resolved?

The answer is NO. Recently I reinstalled Win10 and vcpkg, This time the following command
vcpkg install opencv[ffmpeg,contrib]
never succeeded.

Update: I tried for about 10 times and finally got one build completed with no error.

@theoractice
Copy link
Author

After the newest VS2019 update, the failure odds seems to have decreased a lot, but it still happens. Anyway, this issue is more likely to be VS related. I think I can close this issue now.

@JackBoosY
Copy link
Contributor

@theoractice Sorry for that, I still can't repro it. I think it may be due to conflicts caused by some libraries already installed in the system.

@luodaoyi
Copy link

luodaoyi commented Apr 11, 2022

[273/1299] cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\ml\CMakeFiles\opencv_ml.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  modules\ml\CMakeFiles\opencv_ml.dir\src\ann_mlp.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\boost.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\data.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\em.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\gbt.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\inner_functions.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\kdtree.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\knearest.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\lr.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\nbayes.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\rtrees.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\svm.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\svmsgd.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\testset.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\tree.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\vs_version.rc.res modules\ml\CMakeFiles\opencv_ml.dir\opencv_ml_main.cpp.obj  /out:bin\opencv_mld.dll /implib:lib\opencv_mld.lib /pdb:bin\opencv_mld.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG -LIBPATH:C:\PROGRA~1\NVIDIA~1\CUDA\v11.4\lib\x64 lib\opencv_cored.lib  cudart_static.lib  nppc.lib  nppial.lib  nppicc.lib  nppidei.lib  nppif.lib  nppig.lib  nppim.lib  nppist.lib  nppisu.lib  nppitc.lib  npps.lib  cublas.lib  cufft.lib  -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64"  cudart_static.lib  nppc.lib  nppial.lib  nppicc.lib  nppidei.lib  nppif.lib  nppig.lib  nppim.lib  nppist.lib  nppisu.lib  nppitc.lib  npps.lib  lib\opencv_cudevd.lib  cublas.lib  cufft.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
[274/1299] C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe   /TP -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\plot\src -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\plot\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\plot -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\cudev\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\core\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\imgproc\include -external:ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg -external:W0 /nologo /DWIN32 /D_WINDOWS /W4 /utf-8 /GR /MP   /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise /FS     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\plot\CMakeFiles\opencv_plot.dir\opencv_plot_main.cpp.obj /Fdlib\opencv_plotd.pdb /FS -c D:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\plot\opencv_plot_main.cpp
[275/1299] cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  @CMakeFiles\opencv_imgproc.rsp  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  && cd ."
FAILED: bin/opencv_imgprocd.dll lib/opencv_imgprocd.lib 
cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  @CMakeFiles\opencv_imgproc.rsp  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  && cd ."
FINAL LINK: command "C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe @CMakeFiles\opencv_imgproc.rsp /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64 /nologo /debug /INCREMENTAL /NODEFAULTLIB:libc /DEBUG /MANIFEST /MANIFESTFILE:modules\imgproc\CMakeFiles\opencv_imgproc.dir/intermediate.manifest modules\imgproc\CMakeFiles\opencv_imgproc.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'bin\opencv_imgprocd.dll'
[276/1299] C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe   /TP -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\phase_unwrapping\src -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\phase_unwrapping\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\phase_unwrapping -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\cudev\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\core\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\imgproc\include -external:ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg -external:W0 /nologo /DWIN32 /D_WINDOWS /W4 /utf-8 /GR /MP   /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise /FS     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\phase_unwrapping\CMakeFiles\opencv_phase_unwrapping.dir\src\histogramphaseunwrapping.cpp.obj /Fdlib\opencv_phase_unwrappingd.pdb /FS -c D:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\phase_unwrapping\src\histogramphaseunwrapping.cpp
[277/1299] cmd.exe /C "cd /D D:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\cudaarithm\CMakeFiles\cuda_compile_1.dir\src\cuda && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E make_directory D:/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/. && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D generated_file:STRING=D:/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_polar_cart.cu.obj -D generated_cubin_file:STRING=D:/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_polar_cart.cu.obj.cubin.txt -P D:/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_polar_cart.cu.obj.Debug.cmake"
polar_cart.cu
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).
D:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\core\include\opencv2/core/types.hpp(552): warning: field of class type without a DLL interface used in a class with a DLL interface

D:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\core\include\opencv2/core/types.hpp(554): warning: field of class type without a DLL interface used in a class with a DLL interface

@luodaoyi
Copy link

luodaoyi commented Apr 11, 2022

273/1299] cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\ml\CMakeFiles\opencv_ml.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  modules\ml\CMakeFiles\opencv_ml.dir\src\ann_mlp.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\boost.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\data.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\em.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\gbt.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\inner_functions.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\kdtree.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\knearest.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\lr.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\nbayes.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\rtrees.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\svm.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\svmsgd.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\testset.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\src\tree.cpp.obj modules\ml\CMakeFiles\opencv_ml.dir\vs_version.rc.res modules\ml\CMakeFiles\opencv_ml.dir\opencv_ml_main.cpp.obj  /out:bin\opencv_mld.dll /implib:lib\opencv_mld.lib /pdb:bin\opencv_mld.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG -LIBPATH:C:\PROGRA~1\NVIDIA~1\CUDA\v11.4\lib\x64 lib\opencv_cored.lib  cudart_static.lib  nppc.lib  nppial.lib  nppicc.lib  nppidei.lib  nppif.lib  nppig.lib  nppim.lib  nppist.lib  nppisu.lib  nppitc.lib  npps.lib  cublas.lib  cufft.lib  -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64"  cudart_static.lib  nppc.lib  nppial.lib  nppicc.lib  nppidei.lib  nppif.lib  nppig.lib  nppim.lib  nppist.lib  nppisu.lib  nppitc.lib  npps.lib  lib\opencv_cudevd.lib  cublas.lib  cufft.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
[274/1299] C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe   /TP -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\plot\src -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\plot\include -ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\plot -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-c35cb8696d.clean\modules\cudev\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\core\include -ID:\vcpkg\buildtrees\opencv4\src\4.5.5-f2b5f31c0d.clean\modules\imgproc\include -external:ID:\vcpkg\buildtrees\opencv4\x64-windows-dbg -external:W0 /nologo /DWIN32 /D_WINDOWS /W4 /utf-8 /GR /MP   /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise /FS     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\plot\CMakeFiles\opencv_plot.dir\opencv_plot_main.cpp.obj /Fdlib\opencv_plotd.pdb /FS -c D:\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\plot\opencv_plot_main.cpp
[275/1299] cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  @CMakeFiles\opencv_imgproc.rsp  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  && cd ."
FAILED: bin/opencv_imgprocd.dll lib/opencv_imgprocd.lib 
cmd.exe /C "cd . && D:\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe  @CMakeFiles\opencv_imgproc.rsp  /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64  /nologo    /debug /INCREMENTAL  /NODEFAULTLIB:libc /DEBUG  && cd ."
FINAL LINK: command "C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe @CMakeFiles\opencv_imgproc.rsp /out:bin\opencv_imgprocd.dll /implib:lib\opencv_imgprocd.lib /pdb:bin\opencv_imgprocd.pdb /dll /version:4.5 /machine:x64 /nologo /debug /INCREMENTAL /NODEFAULTLIB:libc /DEBUG /MANIFEST /MANIFESTFILE:modules\imgproc\CMakeFiles\opencv_imgproc.dir/intermediate.manifest modules\imgproc\CMakeFiles\opencv_imgproc.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'bin\opencv_imgprocd.dll'

@luodaoyi
Copy link

LINK : fatal error LNK1104: cannot open file 'bin\opencv_imgprocd.dll'

@JackBoosY
Copy link
Contributor

@luodaoyi This issue is normally due to permissions, antivirus or disk space.

@luodaoyi
Copy link

@luodaoyi This issue is normally due to permissions, antivirus or disk space.

I think is not. Because I try this in 4 different computer. There are same issue except different file.

@cenit
Copy link
Contributor

cenit commented Apr 12, 2022

same antivirus on all pc? try to disable it from scanning vcpkg folder

@luodaoyi
Copy link

same antivirus on all pc? try to disable it from scanning vcpkg folder
antivirus was disable. like microsoft or others

@JackBoosY
Copy link
Contributor

Can you please try to use another disk instead of c:\?

@theoractice
Copy link
Author

It's been two years and I can promise that with vs2022, I never ran into this problem again.

@JackBoosY
Copy link
Contributor

We received lots of this kind of issues, such as:
#23835
#23712

Factors that can cause this issue:

  1. Antivirus (both your own and company-installed).
  2. Insufficient disk capacity.
  3. Insufficient permissions: Unable to create file.

@luodaoyi
Copy link

luodaoyi commented Apr 13, 2022

Cuda 11.6 not support cudnn. https://developer.nvidia.com/rdp/cudnn-archive
Only cuda 11.6 support vs2022 . https://developer.nvidia.com/cuda-toolkit-archive

I find this service look likes Antivirus :

  1. AlibabaProtect
  2. AliPaladin

I will delete it (do this)

sc delete AlibabaProtect
sc delete AliPaladin

delete the same name .sys file on %systemroot%\system32\drivers
and delete the forlder with %SystemDrive%\Program Files (x86)\AlibabaProtect

Fucking alibaba !!!!

@cenit
Copy link
Contributor

cenit commented Apr 13, 2022

cudnn 8.4 supports cuda 11.6 and is already out

@luodaoyi
Copy link

cudnn 8.4 supports cuda 11.6 and is already out

Really? I'm try

@JackBoosY
Copy link
Contributor

So is the LNK1104 problem gone now?

@luodaoyi
Copy link

So is the LNK1104 problem gone now?

Yes! Thank you !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

4 participants