Skip to content

can't find OpenVINOConfig.cmake file #3105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fake-alex opened this issue Apr 30, 2025 · 5 comments
Closed

can't find OpenVINOConfig.cmake file #3105

fake-alex opened this issue Apr 30, 2025 · 5 comments

Comments

@fake-alex
Copy link

fake-alex commented Apr 30, 2025

i am getting this error

-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.43.0") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native 
CMake Error at src/CMakeLists.txt:48 (find_package):
  By not providing "FindOpenVINO.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenVINO",
  but CMake did not find one.

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

    OpenVINOConfig.cmake
    openvino-config.cmake

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


-- Configuring incomplete, errors occurred!

after the command cmake ../whisper.cpp/ -DWHISPER_OPENVINO=ON and yes I did use source setupvars.sh and it did say [setupvars.sh] OpenVINO environment initialized

using whisper.cpp v1.7.5
cmake version 3.28.3

@peardox
Copy link

peardox commented May 1, 2025

What compiler you using?

I can give you instructions for MSVC + Ubuntu Linux, MacOS I've yet to figure

[Looking like you're after Linux from the .sh mention above]

@fake-alex
Copy link
Author

g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

@peardox
Copy link

peardox commented May 1, 2025

Referring to the README.md you will note they recommend using setupvars.sh - this didn't work for me either...

Quick answer - you're just missing one switch

-DOpenVINO_DIR="/path/to/openvino/runtime/cmake"

(You may also need sudo apt-get install libpugixml-dev libpugixml1v5 libtbb12 libtbb-dev)

Long answer - to make 100% sure you do the same as I did - the idiot instructions

(for other people of course)

To be sure you've got exactly what I have I used the 2023.0.0 link (their release page is way too long to find anything)
That link takes you here
Just above the Assets section you'll find link to their Download Archives
Follow the linux tree and you'll get a long list of release packages - though it's not the same release as the Ubuntu we're using the ubuntu22_2023 package works (they've not done a 2024 version). I specifically chose the x86_64 - this one
Download that - it should be noted that building from latest source is likely to cause compatibility issues (it did on Windows)

Now extract the downloaded archive somewhere sensible and you can use it. Personally I put it in ~/build_libs and renamed the directory to openvino

mkdir ~/build_lib
cd ~/build_lib
tar -zxvf ~/Downloads/l_openvino_toolkit_ubuntu22_2023.0.0.10926.b4452d56304_x86_64.tgz
mv l_openvino_toolkit_ubuntu22_2023.0.0.10926.b4452d56304_x86_64 openvino

Finally add the following to your cmake -B build line...

-DWHISPER_OPENVINO=1 -DOpenVINO_DIR="~/build_lib/openvino/runtime/cmake"

Lastly the library ~/build_libs/openvino/runtime/lib/intel64/libopenvino.so.2300 is linked to libwhisper.so
You will also need libpugixml.so.1 and libtbb.so.12 which can be obtained if you're missing them via...

sudo apt-get install libpugixml-dev libpugixml1v5 libtbb12 libtbb-dev

These non-standard dependencies may cause an issue if you're passing a release build around (did for me - missing on spare Linux box)

See below for full library list...

For Windows there are a few small changes

You want to follow the Windows link when you get to the archives and download the windows zip - this one
Make yourself a C:\build_libs directory, extract the archive there and rename the awkwardly named folder to openvino
Now your Windows cmake -B build line want's this version instead...

-DWHISPER_OPENVINO=1 -DOpenVINO_DIR="C:\build_libs\openvino\runtime\cmake"

There's a final gotcha for Windows

There are some dlls you need - if you followed instructions there'll be in C:\build_libs\openvino\runtime\bin\intel64.
You'll also need the dlls in C:\build_libs\openvino\runtime\3rdparty\tbb\bin - these ones you have to manually split out (unlike the intel directory) - pretty obviously _debug files go in Debug and the rest go in Release (I just copied the relevant ones to the intel directory for simplicity when doing repeated builds)

You'll definitely need openvino.dll and tbb12.dll - the others MAY be optional. Copy these to your build\bin dirctories
Tip - make an extra directory with just the required dlls in (until you find out you need others I guess)

Libraries in OpenVino (Linux version)

openvino archive...
./runtime/lib/intel64/libopenvino_auto_plugin.so
./runtime/lib/intel64/libopenvino_c.so.2023.0.0
./runtime/lib/intel64/libopenvino_ir_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_onnx_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_pytorch_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_tensorflow_frontend.so
./runtime/lib/intel64/libopenvino_tensorflow_lite_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_onnx_frontend.so
./runtime/lib/intel64/libopenvino_hetero_plugin.so
./runtime/lib/intel64/libopenvino_onnx_frontend.so.2300
./runtime/lib/intel64/libopenvino_tensorflow_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_paddle_frontend.so.2023.0.0
./runtime/lib/intel64/libopenvino_paddle_frontend.so
./runtime/lib/intel64/libopenvino_gapi_preproc.so
./runtime/lib/intel64/libopenvino_tensorflow_lite_frontend.so.2300
./runtime/lib/intel64/libopenvino_intel_gpu_plugin.so
./runtime/lib/intel64/libopenvino_ir_frontend.so.2300
./runtime/lib/intel64/libgna.so.3.5.0.1906
./runtime/lib/intel64/libopenvino_pytorch_frontend.so
./runtime/lib/intel64/libopenvino.so.2023.0.0
./runtime/lib/intel64/libopenvino_intel_gna_plugin.so
./runtime/lib/intel64/libopenvino_pytorch_frontend.so.2300
./runtime/lib/intel64/libopenvino_paddle_frontend.so.2300
./runtime/lib/intel64/libgna.so.3
./runtime/lib/intel64/libopenvino_tensorflow_frontend.so.2300
./runtime/lib/intel64/libopenvino_auto_batch_plugin.so
./runtime/lib/intel64/libopenvino_intel_cpu_plugin.so
./runtime/lib/intel64/libopenvino.so
./runtime/lib/intel64/libopenvino_c.so
./runtime/lib/intel64/libopenvino_c.so.2300
./runtime/lib/intel64/libopenvino.so.2300
./runtime/lib/intel64/libopenvino_tensorflow_lite_frontend.so

From experimentation it appears that only libopenvino.so.2300 is required (there are further dependencies however)

@peardox
Copy link

peardox commented May 1, 2025

Glad I answered this one - got my junky spare Linux box working with the optional libraries
Note - with OpenVino listed at the bottom of the grab

Image

Although CUDA is selected that machine has the GPU disabled - it's very old (c 2014) and the GPU makes the laptop power off after a few seconds (prob just needs re-pasting, I'll have to get it done sometime - really junky GPU though - 845m, but it should work)

Sadly the Vulkan driver for the intergated graphics actually makes the benchmark both faster and slower (only by a bit though). Faster Decode/Batch (they're both decodes), Slower Prompt

God knows where the CUDA Sysinfo came from - if the GPU were active it'd be Cuda Arch 500 (and a different lib)

*** My other laptop's a porche decent one :)

@fake-alex
Copy link
Author

it worked thanks
whatever the problem was, it was with the l_openvino_toolkit_ubuntu22_2024.6.0.17404.4c0f47d2335_x86_64.tgz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants