最近在使用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.log Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake: (vcpkg_execute_required_process)
ports/opencv/portfile.cmake: (vcpkg_configure_cmake)
scripts/ports.cmake: (include) Error: Building package opencv: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: opencv:x64-windows
Vcpkg version: 0.0.-fd9b73987bf215f1d10acf4207c3cc637a1bcf2c Additionally, attach any relevant sections from the log files above.

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

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

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

4. 如何解决问题呢?

查看opencv-3.2.\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编译命令

vcpkg错误分析方法的更多相关文章

  1. [小菜随笔]新手使用appium+python进行自动化测试过程中webdriver.Remote报错的错误分析方法(带实例)

    很多人刚开始使用python+appium去执行APP自动化的时候经常会遇到webdriver.Remote,报错位置指向都是driver = webdriver.Remote('http://127 ...

  2. linux c段错误分析方法

    from:http://blog.csdn.net/adaptiver/article/details/37656507 一. 段错误原因分析 1 使用非法的指针,包括使用未经初始化及已经释放的指针( ...

  3. android ndk native错误分析方法

    使用ndk自带的工具进行分析, /mnt/d/Projects/linuxEnv/env/toolchains/aarch64-linux-android-4.9/bin/aarch64-linux- ...

  4. javaSE27天复习总结

    JAVA学习总结    2 第一天    2 1:计算机概述(了解)    2 (1)计算机    2 (2)计算机硬件    2 (3)计算机软件    2 (4)软件开发(理解)    2 (5) ...

  5. MySQL常见错误分析与解决方法总结

    MySQL常见错误分析与解决方法总结 一.Can't connect to MySQL server on 'localhost' (10061)翻译:不能连接到 localhost 上的mysql分 ...

  6. idea没有错误提示的解决方法(一直处于错误分析中)

    仅作记录,以防再次发生却不记得. 原文链接:https://blog.csdn.net/a755199443/article/details/90084316 问题描述:idea没有自动报错.例如随便 ...

  7. Firefox SVG getBBox方法返回'NS_ERROR_FAILURE'错误分析

    在SVG中,我们无法给Text元素设置Width和Height属性,因此无法直接获取Text元素的高和宽.如果想要给Text元素添加背景色,最简单的办法就是在Text元素的下面添加Rect,然后给Re ...

  8. eclipse一直卡住,出现 “android sdk content loader 0%” 卡住的错误分析及解决方法

    分析:这种问题之前没有遇到过,也不知道什么原因,直接去网上查询,打开www.stackoverflow.com,输入要查询问题的关键词,我们输入 “android sdk content loader ...

  9. R6010 -abort() has been called错误分析及其解决方法

    近期使用vs2010编程出现下面问题.在网上收集了大家的意见之后,整理了一下 导致出现这种原因有: 1.非法指针訪问和内存泄漏 2.大家再查查吧.一定是指针出现故障了.设置的指针范围跟你执行的不正确 ...

随机推荐

  1. 浅谈Java三大框架与应用

    前言:对于一个程序员来说,尤其是在java web端开发的程序员,三大框架:Struts+Hibernate+Spring是必须要掌握熟透的,因此,下面谈谈java三大框架的基本概念和原理. JAVA ...

  2. AI.框架理论.语义网.语言间距.孤单

    刷个博客,转载自于科学网:AI.框架理论.语义网.语言间距.孤单 一:引言: AI几乎是计算机科学家的梦想,自动化比计算机发展的要早的多.早期的自动化节省了大量人力,激发了人类懒惰的滋长和对自身进化缓 ...

  3. OpenCV视频进度播放控制

    本来打算把进度条嵌入MFC的PIC空间里面,结果显示进度条消失,看来还是不要这个样子了. 全局变量区域: //2.初始化进度条的位置 int G_slider_position = 0; CvCapt ...

  4. wx:for

    .JSPage({ data: { input_data: [ { id: 1, unique: "unique1" }, { id: 2, unique: "uniqu ...

  5. MessageFormat.format()用法

    1.java.text.Format的继承结构如下   2.MessageFormat模式 FormatElement { ArgumentIndex }:是从0开始的入参位置索引 { Argumen ...

  6. Xilinx 7系列FPGA部分重配置【2】

    在之前的“Xilinx 7系列FPGA部分重配置[1]”中已经较为详细地记录了分别在工程模式(Project Mode)和非工程模式(Non-Project Mode)下.使用7系列的Xilinx F ...

  7. Git创建本地分支并关联远程分支(一)

    默认,git项目只有一个分支,就是master,我们当然可以在本地创建多个分支,并推送到远程git管理平台上,或者将远程git管理平台上的其他分支拉取到自己电脑上. 一.查看本地已有的分支 进入到项目 ...

  8. yum的方式搭建mysql

    1.安装相应的软件yum install mysql : 安装mysql客户端 yum install mysql-server 安装服务端 yum install mysql-devel 安装相关的 ...

  9. 【剑指Offer】2、替换空格

      题目描述:   请实现一个函数,将一个字符串中的每个空格替换成"%20".例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy. ...

  10. 被遗忘的 Logrotate

    转自: http://huoding.com/2013/04/21/246 被遗忘的 Logrotate 发表于 2013-04-21 我发现很多人的服务器上都运行着一些诸如每天切分 Nginx 日志 ...