Yuzu: Yuzu compilation fails on Windows with Unknown CMake command "conan_check" error

Created on 22 Jun 2020  路  8Comments  路  Source: yuzu-emu/yuzu

Yuzu failed to be configured on Windows 10 following the guide Method I: MSVC Build for Windows.

CMake 3.18.0, conan 1.24.0

  Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
  Target architecture: x86_64
  Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.71")
  Could NOT find Catch2 (missing: Catch2_INCLUDE_DIR Catch2_VERSION) (Required is at least version "2.11")
  Could NOT find fmt (missing: fmt_LIBRARY fmt_INCLUDE_DIR fmt_VERSION) (Required is at least version "6.2")
  Could NOT find lz4 (missing: lz4_LIBRARY lz4_INCLUDE_DIR) (Required is at least version "1.8")
  Could NOT find nlohmann_json (missing: nlohmann_json_INCLUDE_DIR nlohmann_json_VERSION)    (Required is at least version "3.7")
  Could NOT find opus (missing: opus_LIBRARY opus_INCLUDE_DIR) (Required is at least version "1.3")
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.2")
  Could NOT find zstd (missing: zstd_LIBRARY zstd_INCLUDE_DIR zstd_VERSION) (Required is at least version "1.4")
  Using bundled binaries at D:/project/yuzu-master/build/externals/qt-5.12.0-msvc2017_64
  CMake Warning at CMakeLists.txt:228 (find_package):
  By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SDL2", but
  CMake did not find one.

  Could not find a package configuration file provided by "SDL2" with any of
  the following names:

    SDL2Config.cmake
    sdl2-config.cmake

  Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
  "SDL2_DIR" to a directory containing one of the above files.  If "SDL2"
  provides a separate development package or SDK, be sure it has been
  installed.


Packages boost/1.72.0;catch2/2.11.0;fmt/6.2.0;lz4/1.9.2;nlohmann_json/3.7.3;opus/1.3.1;zlib/1.2.11;zstd/1.4.4;sdl2/2.0.12@bincrafters/stable not found!
CMake Error at CMakeLists.txt:251 (conan_check):
  Unknown CMake command "conan_check".

Configuring incomplete, errors occurred!
See also "D:/project/yuzu-master/build/CMakeFiles/CMakeOutput.log".

Most helpful comment

This is an old issue but I encountered it again recently with version 1.28.0 of conan. Apart from requiring the right version of conan, check that the conan.cmake file that is downloaded via CMake in your build directory (or${CMAKE_BINARY_DIR}) is not blank, as mine was. There seems to be a problem with the way CMake downloads the file; maybe it just creates the file and does not download it, I'm not sure.
In this case, just download the cmake file from https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake and overwrite the one in the build directory with the correct file, or just copy paste the code to the existing file, whichever way suits you better.

All 8 comments

Are you sure you installed Conan? https://conan.io/downloads.html

Are you sure you installed Conan? https://conan.io/downloads.html

Conan is fetched from https://github.com/conan-io/conan/releases/download/1.24.0/conan-win-64_1_24_0.exe, and

$ conan --version
Conan version 1.24.0

this is because some conan related urls are blocked by GFW, try using a proxy. Conan urls are basicly inaccessable from China for unknown reason

this is because some conan related urls are blocked by GFW, try using a proxy. Conan urls are basicly inaccessable from China for unknown reason

How to setup? I tried ssr, but same problem.

this is because some conan related urls are blocked by GFW, try using a proxy. Conan urls are basicly inaccessable from China for unknown reason

How to setup? I tried ssr, but same problem.

I also opened the SSR, and added a proxy to conan's configuration file(USER.conanconan.conf), but it still does not work.

Besides锛孖 found a solution on stackoverflow( https://stackoverflow.com/questions/62024613/cmake-errors-using-conan-in-the-yuzu-generator )
The CMakeLists.txt of the yuzu repository (found at the parent directory) requires version 1.24.0 of conan, while the latest is 1.25.2. I assume you have installed the latest version. Change line 252 from: conan_check(VERSION 1.24.0 REQUIRED) to: conan_check(VERSION 1.25.2 REQUIRED)
But it also does not work.

this is because some conan related urls are blocked by GFW, try using a proxy. Conan urls are basicly inaccessable from China for unknown reason

How to setup? I tried ssr, but same problem.

I also opened the SSR, and added a proxy to conan's configuration file(USER.conanconan.conf), but it still does not work.
Besides锛孖 found a solution on stackoverflow( https://stackoverflow.com/questions/62024613/cmake-errors-using-conan-in-the-yuzu-generator )
The CMakeLists.txt of the yuzu repository (found at the parent directory) requires version 1.24.0 of conan, while the latest is 1.25.2. I assume you have installed the latest version. Change line 252 from: conan_check(VERSION 1.24.0 REQUIRED) to: conan_check(VERSION 1.25.2 REQUIRED)
But it also does not work.

@spacejumpunreal is right, thanks a lot.
After I used a VPN via SS, the compilation finally succeeded. I recommend you may try to choose a VPS.

this is because some conan related urls are blocked by GFW, try using a proxy. Conan urls are basicly inaccessable from China for unknown reason
How to setup? I tried ssr, but same problem.
I also opened the SSR, and added a proxy to conan's configuration file(USER.conanconan.conf), but it still does not work.
Besides锛孖 found a solution on stackoverflow( https://stackoverflow.com/questions/62024613/cmake-errors-using-conan-in-the-yuzu-generator )
The CMakeLists.txt of the yuzu repository (found at the parent directory) requires version 1.24.0 of conan, while the latest is 1.25.2. I assume you have installed the latest version. Change line 252 from: conan_check(VERSION 1.24.0 REQUIRED) to: conan_check(VERSION 1.25.2 REQUIRED)
But it also does not work.

@spacejumpunreal is right, thanks a lot.
After I used a VPN via SS, the compilation finally succeeded. I recommend you may try to choose a VPS.

Did you compile successfully with VPN锛烞ut I can't.

  1. I also opened the SSR, and added a proxy to conan's configuration file(user_dir.conanconan.conf), but it still does not work.
  2. I found a solution on stackoverflow( https://stackoverflow.com/questions/62024613/cmake-errors-using-conan-in-the-yuzu-generator ), he said that maybe the conan's version in CMakeLists.txt was wrong, and I changed it to the local conan's version, but it still didn't work.

This is an old issue but I encountered it again recently with version 1.28.0 of conan. Apart from requiring the right version of conan, check that the conan.cmake file that is downloaded via CMake in your build directory (or${CMAKE_BINARY_DIR}) is not blank, as mine was. There seems to be a problem with the way CMake downloads the file; maybe it just creates the file and does not download it, I'm not sure.
In this case, just download the cmake file from https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake and overwrite the one in the build directory with the correct file, or just copy paste the code to the existing file, whichever way suits you better.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoseGuzmanHN picture JoseGuzmanHN  路  3Comments

some-username-here1 picture some-username-here1  路  5Comments

ReinUsesLisp picture ReinUsesLisp  路  3Comments

ANIMEFANATIC91 picture ANIMEFANATIC91  路  4Comments

Dane0 picture Dane0  路  5Comments