You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just unpacking onnxruntime-linux-x64-1.21.0.tgz (the gpu tgz has the same problem) to where the system expects libraries and include files (in my case /usr) and then trying to build against this release by using the provided CMake config fails with two errors:
onnxruntimeTargets-release.cmake sets IMPORTED_LOCATION_RELEASE to.../lib64/libonnxruntime.so.1.21.0. This does not correspond with the folder structure for the libraries in the tgz being lib, so the so-file can not be found.
onnxruntimeTargets.cmake sets INTERFACE_INCLUDE_DIRECTORIES to .../include/onnxruntime. This does not correspond with the folder structure for includes in the tgz being include, so the headers can not be found.
If I my voice my opinion: the CMake files expecting the headers in include/onnxruntime is a good thing as copying headers from different libraries directly into include has an overall high likelihood of name clashes between libraries.
CMake Error at /usr/lib/cmake/onnxruntime/onnxruntimeTargets.cmake:83 (message):
The imported target "onnxruntime::onnxruntime" references the file
"/usr/lib64/libonnxruntime.so.1.21.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/onnxruntime/onnxruntimeTargets.cmake"
but not all the files it references.
After fixing the wrong library path manually:
CMake Error in CMakeLists.txt:
Imported target "onnxruntime::onnxruntime" includes non-existent path
"/usr/include/onnxruntime"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
Visual Studio Version
No response
GCC / Compiler Version
12.3.0
The text was updated successfully, but these errors were encountered:
Zyrin
changed the title
[Build] Missbatch between CMake config and folder structure of onnxruntime-linux-x64-1.21.0.tgz
[Build] Missmatch between CMake config and folder structure of onnxruntime-linux-x64-1.21.0.tgz
Mar 12, 2025
Describe the issue
Just unpacking
onnxruntime-linux-x64-1.21.0.tgz
(the gpu tgz has the same problem) to where the system expects libraries and include files (in my case/usr
) and then trying to build against this release by using the provided CMake config fails with two errors:onnxruntimeTargets-release.cmake
setsIMPORTED_LOCATION_RELEASE
to.../lib64/libonnxruntime.so.1.21.0
. This does not correspond with the folder structure for the libraries in the tgz beinglib
, so the so-file can not be found.onnxruntimeTargets.cmake
setsINTERFACE_INCLUDE_DIRECTORIES
to.../include/onnxruntime
. This does not correspond with the folder structure for includes in the tgz beinginclude
, so the headers can not be found.If I my voice my opinion: the CMake files expecting the headers in
include/onnxruntime
is a good thing as copying headers from different libraries directly intoinclude
has an overall high likelihood of name clashes between libraries.Urgency
No response
Target platform
Linux (Ubuntu 22.04 in my case)
Build script
Error / output
Visual Studio Version
No response
GCC / Compiler Version
12.3.0
The text was updated successfully, but these errors were encountered: