# Why do I get "not finding compatible version with requested version ''"?

**URL:** https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707
**Category:** Usage
**Tags:** os:windows, comp:msvc, gen:makefiles, tool:cmake
**Created:** [March 17, 2023, 11:05pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707 "2023-03-17T23:05:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![theateist](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@theateist](https://discourse.cmake.org/u/theateist)
#### Post date: [March 17, 2023, 11:05pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/1 "2023-03-17T23:05:53Z")

</div>

I’m trying to build [tesseract](https://github.com/tesseract-robotics/tesseract) repo on Windows 10 22H2.

I was told to use `colcon` to build the repo. I’m new to `colcon` and `cmake`. I cloned the repo to `C:\Temp\colcon_ws\src` and ran `colcon build` from `x64 Native Tools Command Prompt for VS 2022` terminal. But, I get the cmake error below.  
Even if I use Cmake-Gui I still get that error message.

What could be wrong?

```auto
C:\Temp\colcon_ws>call install\local_setup.bat
C:\Temp\colcon_ws>colcon build
Starting >>> ros_industrial_cmake_boilerplate
Finished <<< ros_industrial_cmake_boilerplate [0.81s]
Starting >>> tesseract_common
--- stderr: tesseract_common
CMake Error at CMakeLists.txt:4 (find_package):
  Could not find a configuration file for package
  "ros_industrial_cmake_boilerplate" that is compatible with requested
  version "".

  The following configuration files were considered but not accepted:

    C:/Temp/colcon_ws/install/ros_industrial_cmake_boilerplate/lib/cmake/ros_industrial_cmake_boilerplate/ros_industrial_cmake_boilerplate-config.cmake, version: 0.4.6 (64bit)

---
Failed <<< tesseract_common [0.20s, exited with code 1]

Summary: 1 package finished [1.50s]
  1 package failed: tesseract_common
  1 package had stderr output: tesseract_common
  10 packages not processed
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)

C:\Temp\colcon_ws>

```

FYI, I was, however, able to build that repo on Linux. So, the problem has to be with how I use the cmake on Windows.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [March 18, 2023, 12:23am UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/2 "2023-03-18T00:23:51Z")

</div>

I think you’re probably in a 32bit build and it finds a 64bit build and (rightly) rejects it. Can you confirm that you’re trying to build your code in 64bit.

---

<div class="post-metadata">

### Author: ![theateist](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@theateist](https://discourse.cmake.org/u/theateist)
#### Post date: [March 18, 2023, 1:28am UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/3 "2023-03-18T01:28:03Z")

</div>

But, I start `x64 Native Tools Command Prompt for VS 2022 terminal` which is `x64`. What am I missing?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [March 18, 2023, 5:45am UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/4 "2023-03-18T05:45:19Z")

</div>

I see that, but can you check to see what CMake ends up finding? It _should_ be the 64-bit version, but maybe something else in the env is confusing it.

Another thing to try is passing `--debug-find` to CMake. Maybe that will help?

---

<div class="post-metadata">

### Author: ![theateist](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@theateist](https://discourse.cmake.org/u/theateist)
#### Post date: [March 20, 2023, 10:14pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/5 "2023-03-20T22:14:57Z")

</div>

I added `--debug-find` flag to CMake-GUI (instead of `x64 Native Tools Command Prompt for VS 2022` terminal) and it still gives me the same message. No new verbos text. To add `--debug-find` flag in CMake-GUI `CMAKE_MESSAGE_LOG_LEVEL` and `CMAKE_DEBUG_FIND_PACKAGE` entries as shown in the image.  
How do I check to see what CMake ends up finding?

 ![image](https://discourse.cmake.org/uploads/default/original/2X/4/44749da0f9060c0b1ef717f18979276554c4635f.png)

---

<div class="post-metadata">

### Author: ![theateist](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@theateist](https://discourse.cmake.org/u/theateist)
#### Post date: [March 21, 2023, 12:03pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/6 "2023-03-21T12:03:11Z")

</div>

The logs can be downloaded [here](https://drive.google.com/file/d/1e1dpM64TtG5kqOJLkI4C6lHpUDuf109k/view?usp=share_link)

---

<div class="post-metadata">

### Author: ![TaciturnJian](https://discourse.cmake.org/user_avatar/discourse.cmake.org/taciturnjian/32/3577_2.png) [@TaciturnJian](https://discourse.cmake.org/u/TaciturnJian)
#### Post date: [June 30, 2023, 1:49pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/7 "2023-06-30T13:49:41Z")

</div>

Maybe, use “project()” before “find\_package()” will fix this? Idk the reason, but I solved this problem, at least for now.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 1, 2023, 8:50pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707/8 "2023-07-01T20:50:48Z")

</div>

Oh, that’s probably on the `CMAKE_SIZEOF_VOID_P` check that (I think) gets generated in the compatibility checks for packages.
