Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
Asked Answered
H

2

11

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!
Hydrothorax answered 28/11, 2019 at 16:53 Comment(0)
H
13

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 
Hydrothorax answered 28/11, 2019 at 16:53 Comment(4)
Installing libzstd-dev didn't work for me. Installing zstd was fine for me: sudo apt install -y zstdVtol
This does not work. I am still unable to find zstd with find_package(ZSTD REQUIRED) on Ubuntu 22.04Bellaude
Have the same problem on OS X, this solution does not work. Any ideas?Sis
how do you do it on windows?Homophone
J
0

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"

Jacobah answered 30/7 at 15:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.