# Ziti-tunnel-sdk-c cmake build process doesn't pull in tertiary dependencies

**URL:** <https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239>\
**Category:** Building/Development\
**Created:** [May 5, 2023, 5:43pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239 "2023-05-05T17:43:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomc](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/tomc/32/977_2.png) [@tomc](https://openziti.discourse.group/u/tomc)\
**Post date:** [May 5, 2023, 5:43pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/1 "2023-05-05T17:43:39Z")

</div>

Previously (February 2023), the ziti-tunnel-sdk-c build would automatically fetch and compile dependencies. Attempting a cross-compile build today (May 5th), the process fails, reporting:

> using Unix Makefiles  
> cross-compiling FALSE  
> Project: tlsuv@v0.23.1  
> CMake Error at build-amd64/\_deps/tlsuv-src/CMakeLists.txt:75 (find\_package):  
> Could not find a package configuration file provided by "llhttp" with any  
> of the following names:
> 
> ```
> llhttpConfig.cmake
> llhttp-config.cmake
> 
> ```
> 
> Add the installation prefix of "llhttp" to CMAKE\_PREFIX\_PATH or set  
> "llhttp\_DIR" to a directory containing one of the above files. If "llhttp"  
> provides a separate development package or SDK, be sure it has been  
> installed.
> 
> -- Configuring incomplete, errors occurred!  
> See also "/mnt/build-amd64/CMakeFiles/CMakeOutput.log".

Are there revised build instructions someone can point me to?

---

<div class="post-metadata">

**Author:** ![tomc](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/tomc/32/977_2.png) [@tomc](https://openziti.discourse.group/u/tomc)\
**Post date:** [May 5, 2023, 5:46pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/2 "2023-05-05T17:46:05Z")

</div>

Resolving llhttp leads me to:

> CMake Error at build-amd64/\_deps/ziti-sdk-c-src/library/CMakeLists.txt:1 (find\_package):  
> By not providing "Findunofficial-sodium.cmake" in CMAKE\_MODULE\_PATH this  
> project has asked CMake to find a package configuration file provided by  
> "unofficial-sodium", but CMake did not find one.
> 
> Could not find a package configuration file provided by "unofficial-sodium"  
> with any of the following names:
> 
> ```
> unofficial-sodiumConfig.cmake
> unofficial-sodium-config.cmake
> 
> ```
> 
> Add the installation prefix of "unofficial-sodium" to CMAKE\_PREFIX\_PATH or  
> set "unofficial-sodium\_DIR" to a directory containing one of the above  
> files. If "unofficial-sodium" provides a separate development package or  
> SDK, be sure it has been installed.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [May 5, 2023, 5:47pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/3 "2023-05-05T17:47:24Z")

</div>

Hi @tomc, Welcome to the community! Thanks for the feedback.

The ziti-tunnel-sdk-c repo is most definitely in a state of flux… The ziti-sdk-c was updated to use vcpkg and it’s causing a wee bit of churn for people, for sure. We don’t have anything written up yet, but I’m sure we can get you building again until we settle it out…

@scareything or @ekoby anything else you want to add?

@tomc what OS are you building on and targetting?

---

<div class="post-metadata">

**Author:** ![tomc](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/tomc/32/977_2.png) [@tomc](https://openziti.discourse.group/u/tomc)\
**Post date:** [May 5, 2023, 5:49pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/4 "2023-05-05T17:49:10Z")

</div>

@TheLumberjack I’m building for ubuntu jammy amd64.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [May 5, 2023, 5:52pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/5 "2023-05-05T17:52:42Z")

</div>

Thanks. I’ll get you a short list of commands after I make sure they work and shoot them over.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [May 5, 2023, 6:10pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/6 "2023-05-05T18:10:48Z")

</div>

Ok here’s a condensed list of steps… I just used these locally.

```auto
export VCPKG_ROOT=/path/to/where/you/want/to/put/vcpkg
mkdir -p $VCPKG_ROOT
git clone git@github.com:microsoft/vcpkg.git $VCPKG_ROOT
sudo apt install zip -y
sudo apt-get install pkg-config -y
$VCPKG_ROOT/bootstrap-vcpkg.sh
cd /to/wherever/you/have/ziti-tunnel-sdk-c/
mkdir build
cd build
cmake --preset ci-linux-x64 ..
cmake build .

```

Note that cmake will now require you have env var VCPKG\_ROOT and it’s expected that this is the root of the vcpkg checkout (as shown in the steps listed above). Stating the obvious, but most of these are ‘one-time’ steps you’ll need to run.

You can also read up on vcpkg presets if you’re interested or need to change away from the ‘ci-linux-x64’ preset. The first time you do this

Hope that helps!

---

<div class="post-metadata">

**Author:** ![scareything](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/scareything/32/106_2.png) [@scareything](https://openziti.discourse.group/u/scareything)\
**Post date:** [May 5, 2023, 7:20pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/7 "2023-05-05T19:20:50Z")

</div>

fyi the file [HACKING.md](https://github.com/openziti/ziti-tunnel-sdk-c/blob/main/HACKING.md) talks about the conventional way to define your own presets, which may inherit from the presets in CMakePresets.json. Note I’ve seen the `"$comment"` field confuse some versions of cmake, so I’d omit that line from your preset file.

---

<div class="post-metadata">

**Author:** ![NicFragale](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/nicfragale/32/42_2.png) [@NicFragale](https://openziti.discourse.group/u/NicFragale)\
**Post date:** [May 25, 2023, 8:14pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/8 "2023-05-25T20:14:57Z")

</div>

Stumbled upon this very issue and lo- the answer be-ith here! I utilize a little utility I wrote for automation of openwrt building. ([NetFoundry/Utilities/OpenZITI-OWRT at main · NicFragale/NetFoundry · GitHub](https://github.com/NicFragale/NetFoundry/tree/main/Utilities/OpenZITI-OWRT)) and I’ll be making the appropriate update there to it as well. Thanks for asking this @tomc, and thank you for the answer @TheLumberjack !

---

<div class="post-metadata">

**Author:** ![smilindave26](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/smilindave26/32/185_2.png) [@smilindave26](https://openziti.discourse.group/u/smilindave26)\
**Post date:** [June 29, 2023, 10:28pm UTC](https://openziti.discourse.group/t/ziti-tunnel-sdk-c-cmake-build-process-doesnt-pull-in-tertiary-dependencies/1239/9 "2023-06-29T22:28:44Z")

</div>

> [@scareything](#):
>
> fyi the file [HACKING.md](https://github.com/openziti/ziti-tunnel-sdk-c/blob/main/HACKING.md) talks about the conventional way to define your own presets, which may inherit from the presets in CMakePresets.json. Note I’ve seen the `"$comment"` field confuse some versions of cmake, so I’d omit that line from your preset file.

Hacking.md has been moved to [https://github.com/openziti/ziti-sdk-c/blob/main/BUILD.md](https://github.com/openziti/ziti-sdk-c/blob/main/BUILD.md)
