microsoft / vcpkg

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

[opencv4] LINK : fatal error LNK1168: cannot open bin\opencv_mld.dll for writing #11075

Closed kerwinxu closed 3 years ago

kerwinxu commented 4 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install xxxx [vcvarsall.bat] Environment initialized for: 'x64'

E:\Program>vcpkg install opencv Computing installation plan... The following packages will be built and installed: opencv[core,dnn,jpeg,opengl,png,tiff,webp]:x64-windows

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:x64-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:x64-windows Vcpkg version: 2020.02.04-nohash

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

gvim E:\Program\vc\vcpkg\buildtrees\opencv4\install-x64-windows-dbg-out.log . . . Creating library lib\opencv_mld.lib and object lib\opencv_mld.exp

FINAL LINK: command "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\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.1 /machine:x64 /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\ml\CMakeFiles\opencv_ml.dir/intermediate.manifest modules\ml\CMakeFiles\opencv_ml.dir/manifest.res" failed (exit code 1168) with the following output: Microsoft (R) Incremental Linker Version 14.16.27038.0

Copyright (C) Microsoft Corporation. All rights reserved.

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

[222/498] "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe" /TP -DCVAPI_EXPORTS -DHAVE_IMGCODEC_HDR -DHAVE_IMGCODEC_PFM -DHAVE_IMGCODEC_PXM -DHAVE_IMGCODEC_SUNRASTER -DHAVE_WEBP -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D__OPENCV_BUILD=1 -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\include -Imodules\imgcodecs -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\core\include -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgproc\include -I. -IE:\Program\vc\vcpkg\installed\x64-windows\include /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 /MP4 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\imgcodecs\CMakeFiles\opencv_imgcodecs.dir\src\grfmt_bmp.cpp.obj /Fdlib\opencv_imgcodecsd.pdb /FS -c E:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src\grfmt_bmp.cpp

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27038 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

[223/498] "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe" /TP -DCVAPI_EXPORTS -DHAVE_IMGCODEC_HDR -DHAVE_IMGCODEC_PFM -DHAVE_IMGCODEC_PXM -DHAVE_IMGCODEC_SUNRASTER -DHAVE_WEBP -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D__OPENCV_BUILD=1 -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\include -Imodules\imgcodecs -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\core\include -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgproc\include -I. -IE:\Program\vc\vcpkg\installed\x64-windows\include /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 /MP4 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\imgcodecs\CMakeFiles\opencv_imgcodecs.dir\src\loadsave.cpp.obj /Fdlib\opencv_imgcodecsd.pdb /FS -c E:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src\loadsave.cpp

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27038 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

[224/498] cmd.exe /C "cd . && "D:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=modules\imgproc\CMakeFiles\opencv_imgproc.dir --rc="D:\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe" --mt="D:\Windows Kits\10\bin\10.0.17763.0\x64\mt.exe" --manifests -- "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\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\src\imgwarp.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\resize.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\accum.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\bilateral_filter.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\box_filter.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\filter.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_hsv.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_rgb.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\color_yuv.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\median_blur.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\morph.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\smooth.avx2.cpp.obj modules\imgproc\CMakeFiles\opencv_imgproc.dir\src\sumpixels.avx512_skx.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:x64 /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 && cd ."

Microsoft (R) Incremental Linker Version 14.16.27038.0

Copyright (C) Microsoft Corporation. All rights reserved.

Creating library lib\opencv_imgprocd.lib and object lib\opencv_imgprocd.exp

Microsoft (R) Incremental Linker Version 14.16.27038.0

Copyright (C) Microsoft Corporation. All rights reserved.

Creating library lib\opencv_imgprocd.lib and object lib\opencv_imgprocd.exp

[225/498] "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe" /TP -DCVAPI_EXPORTS -DHAVE_IMGCODEC_HDR -DHAVE_IMGCODEC_PFM -DHAVE_IMGCODEC_PXM -DHAVE_IMGCODEC_SUNRASTER -DHAVE_WEBP -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D__OPENCV_BUILD=1 -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\include -Imodules\imgcodecs -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\core\include -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgproc\include -I. -IE:\Program\vc\vcpkg\installed\x64-windows\include /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 /MP4 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\imgcodecs\CMakeFiles\opencv_imgcodecs.dir\src\grfmt_base.cpp.obj /Fdlib\opencv_imgcodecsd.pdb /FS -c E:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src\grfmt_base.cpp

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27038 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

[226/498] "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe" /TP -DCVAPI_EXPORTS -DHAVE_IMGCODEC_HDR -DHAVE_IMGCODEC_PFM -DHAVE_IMGCODEC_PXM -DHAVE_IMGCODEC_SUNRASTER -DHAVE_WEBP -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D__OPENCV_BUILD=1 -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\include -Imodules\imgcodecs -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\core\include -IE:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgproc\include -I. -IE:\Program\vc\vcpkg\installed\x64-windows\include /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 /MP4 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fomodules\imgcodecs\CMakeFiles\opencv_imgcodecs.dir\src\utils.cpp.obj /Fdlib\opencv_imgcodecsd.pdb /FS -c E:\Program\vc\vcpkg\buildtrees\opencv4\src\4.1.1-fb9e10326a\modules\imgcodecs\src\utils.cpp

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27038 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

ninja: build stopped: subcommand failed.

but : dir E:\Program\vc\vcpkg\buildtrees\opencv4\x64-windows-dbg\bin > a

gvim a 驱动器 E 中的卷没有标签。 卷的序列号是 72F3-EAB2

E:\Program\vc\vcpkg\buildtrees\opencv4\x64-windows-dbg\bin 的目录

2020/04/29 11:00

. 2020/04/29 11:00 .. 2020/04/29 10:58 10,389,504 opencv_cored.dll 2020/04/29 10:58 99,693,864 opencv_cored.ilk 2020/04/29 10:58 23,793,664 opencv_cored.pdb 2020/04/29 10:58 1,521,152 opencv_flannd.dll 2020/04/29 10:58 6,861,904 opencv_flannd.ilk 2020/04/29 10:58 6,778,880 opencv_flannd.pdb 2020/04/29 11:00 14,938,624 opencv_imgprocd.dll 2020/04/29 11:00 94,948,768 opencv_imgprocd.ilk 2020/04/29 11:00 32,690,176 opencv_imgprocd.pdb 2020/04/29 11:00 2,004,480 opencv_mld.dll 2020/04/29 11:00 17,681,352 opencv_mld.ilk 2020/04/29 11:00 6,385,664 opencv_mld.pdb 12 个文件 317,688,032 字节 2 个目录 42,483,793,920 可用字节

i do not know why ? whay can not writing ? I turn off defender , I turn off other program , I use administor powershell . my vc 2017 language is english , i remove chinese language pack .

for ($i=1; $i -le 10; $i++) { vcpkg install opencv }

many times

Failure logs -Cut and past the appropriate build messages from the console output. -Please attach any additional failure logs mentioned in the console output.

Additional context Add any other context about the problem here, such as what you have already tried to resolve the issue.

NancyLi1013 commented 4 years ago

Hi @kerwinxu Thanks for posting this issue.

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

Please ensure that the build directory does not require administrator privileges and has sufficient space, and that the anti-virus software is turned off.

linquize commented 4 years ago

You must install Visual Studio English language pack

theoractice commented 4 years ago

I believe this is the same issue that I encountered a while ago, See #10139. The real problem is that every time you build opencv with a failure notice which tells you to check log file like install-x64-windows-dbg-out.log, it always give you the same error type: error LNK1168, but the dll module that the compiler "cannot open for writing" can be different. it can be any module in the opencv project. I think this happens quite randomly. @NancyLi1013 I have tried many times (including reinstalling Win10 and switching harddisks) and I am sure that this is not related to administrator privileges or disk spaces, and this error does not happen every time you build opencv. @linquize vcpkg cannot build anything without a VS English language pack. I was in his situation, so this is not related to that too. @kerwinxu The only good thing I can say is that I am now using the latest version of VS2019 and I rarely see opencv build fails. Maybe you can consider switching to VS2019.

NancyLi1013 commented 4 years ago

Hi all,

Thanks for joining the discussion about this issue.

I'm not sure what happened in this case now. It might be better to try this again after opencv4is updated to 4.3 in PR #11130.

JackBoosY commented 4 years ago

Hi @linquize, since opencv4 has been updated to 4.3, does this issue still exist?

NancyLi1013 commented 3 years ago

Closing this issue for now since there seems inactive for a long time. Please feel free to reopen this issue if it is still a problem for you.