博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vcpkg错误分析方法
阅读量:5025 次
发布时间:2019-06-12

本文共 2883 字,大约阅读时间需要 9 分钟。

最近在使用vcpkg时,经常会碰到CMake错误。 有些以前能编译通过的包, 过一段时间又不能编译错误了。 错误提示一般是CMake错误, 弄得很郁闷。

我采用以下步骤解决了问题:

  1. 分析错误
  2. 查看错误日志
  3. 查看cmake文件
  4. 手工处理错误

下面是我opencv编译错误解决过程:

1.  执行vcpkg命令

PS D:\Develop\GitOthers\vcpkg> ./vcpkg install opencv

2.  错误信息

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:43 (message):     ......     See logs for more information:      D:\Develop\GitOthers\vcpkg\buildtrees\opencv\config-x64-windows-rel-out.log      D:\Develop\GitOthers\vcpkg\buildtrees\opencv\config-x64-windows-rel-err.logCall Stack (most recent call first):  scripts/cmake/vcpkg_configure_cmake.cmake:170 (vcpkg_execute_required_process)  ports/opencv/portfile.cmake:36 (vcpkg_configure_cmake)  scripts/ports.cmake:72 (include)Error: Building package opencv:x64-windows failed with: BUILD_FAILEDPlease ensure you're using the latest portfiles with `.\vcpkg update`, thensubmit an issue at https://github.com/Microsoft/vcpkg/issues including:  Package: opencv:x64-windows  Vcpkg version: 0.0.81-fd9b73987bf215f1d10acf4207c3cc637a1bcf2cAdditionally, attach any relevant sections from the log files above.

3. 查看错误日志(XXX-err.log)

CMake Warning at 3rdparty/ippicv/downloader.cmake:56 (message):  ICV: Local copy of ICV package has invalid MD5 hash:  0d1682bf35ca5cd296a7cc795d30ecc8 (expected:  04e81ce5d0e329c3fbc606ae32cad44d)Call Stack (most recent call first):  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)  cmake/OpenCVFindIPP.cmake:243 (include)  cmake/OpenCVFindLibsPerf.cmake:37 (include)  CMakeLists.txt:564 (include)CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file):  file DOWNLOAD HASH mismatch    for file: [D:/Develop/GitOthers/vcpkg/buildtrees/opencv/src/opencv-3.2.0/3rdparty/ippicv/downloads/windows-04e81ce5d0e329c3fbc606ae32cad44d/ippicv_windows_20151201.zip]      expected hash: [04e81ce5d0e329c3fbc606ae32cad44d]        actual hash: [57ed63670f6763ece0d789f9cb52d952]             status: [28;"Timeout was reached"]Call Stack (most recent call first):  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)  cmake/OpenCVFindIPP.cmake:243 (include)  cmake/OpenCVFindLibsPerf.cmake:37 (include)  CMakeLists.txt:564 (include)CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):  ICV: Failed to download ICV package: ippicv_windows_20151201.zip.  Status=28;"Timeout was reached"Call Stack (most recent call first):  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)  cmake/OpenCVFindIPP.cmake:243 (include)  cmake/OpenCVFindLibsPerf.cmake:37 (include)  CMakeLists.txt:564 (include)

查看日志, 发现原来是有个文件下载不完整, 造成了后续操作无法完成。

 4. 如何解决问题呢?

查看opencv-3.2.0\3rdparty\ippicv\downloader.cmake文件,找到相应的下载文件,手动下载 ippicv_windows_20151201.zip 下载完成后,将文件复制到 D:/Develop/GitOthers/vcpkg/buildtrees/opencv/src/opencv-3.2.0/3rdparty/ippicv/downloads/windows-04e81ce5d0e329c3fbc606ae32cad44d/ippicv_windows_20151201.zip
然后再次执行vcpkg编译命令

 

转载于:https://www.cnblogs.com/yaoyu126/p/7267071.html

你可能感兴趣的文章
hdu 1010 dfs搜索
查看>>
搭建wamp环境,数据库基础知识
查看>>
android中DatePicker和TimePicker的使用
查看>>
SpringMVC源码剖析(四)- DispatcherServlet请求转发的实现
查看>>
Android中获取应用程序(包)的大小-----PackageManager的使用(二)
查看>>
Codeforces Gym 100513M M. Variable Shadowing 暴力
查看>>
浅谈 Mybatis中的 ${ } 和 #{ }的区别
查看>>
CNN 笔记
查看>>
版本更新
查看>>
SQL 单引号转义
查看>>
start
查看>>
实现手机扫描二维码页面登录,类似web微信-第三篇,手机客户端
查看>>
PHP socket客户端长连接
查看>>
7、shell函数
查看>>
【转】Apache Jmeter发送post请求
查看>>
Nginx 基本 安装..
查看>>
【凸优化】保留凸性的几个方式(交集、仿射变换、投影、线性分式变换)
查看>>
NYOJ-613//HDU-1176-免费馅饼,数字三角形的兄弟~~
查看>>
TFS --- GrantBackup Plan Permissions Error
查看>>
傅里叶级数与积分方程
查看>>