Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR)

I had an issue while installing headptrack with CMake when running cmake -DCMAKE_BUILD_TYPE=Release .. in heaptrack/build

-- Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR) 
CMake Error at 3rdparty/libbacktrace/CMakeLists.txt:160 (message):
  Could not find dwarf.h, try installing the dwarf or elfutils development
  package.


-- Configuring incomplete, errors occurred!
like image 327
Hugo Sohm Avatar asked Feb 07 '26 18:02

Hugo Sohm


2 Answers

The solution is to install the zstd dev package instead of the regular, here is the command:

sudo apt install -y libzstd-dev

The solution with the dwarf dev package for the second error:

sudo apt install libdwarf-dev 
like image 55
Hugo Sohm Avatar answered Feb 09 '26 09:02

Hugo Sohm


On Windows, I had to download zstd from the zstd Github releases page and add these arguments to cmake (adjust your zstd location): -D ZSTD_LIBRARY="C:/zstd-v1.5.6-win64/dll/libzstd.dll" -D ZSTD_INCLUDE_DIR="C:/zstd-v1.5.6-win64/include"

like image 21
Rok Povsic Avatar answered Feb 09 '26 10:02

Rok Povsic