# Building pijul for target x86\_64-pc-windows-msvc with vcpkg

**URL:** <https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497>\
**Category:** Development\
**Created:** [June 10, 2020, 7:36am UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497 "2020-06-10T07:36:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![o01eg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/o01eg/32/96_2.png) [@o01eg](https://discourse.pijul.org/u/o01eg)\
**Post date:** [June 10, 2020, 7:36am UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/1 "2020-06-10T07:36:11Z")

</div>

vcpkg dropped support for MSVC 2017 and requires MSVC 2019. Packages required to install are `llvm[clang]`, `nettle`, `openssl`, `libsodium`.

I set environments:

```auto
set VCPKGRS_DYNAMIC=1
set SODIUM_LIB_DIR=%VCPKG_ROOT%\installed\x64-windows\lib\
set LLVM_CONFIG_PATH=%VCPKG_ROOT%\installed\x64-windows\bin\llvm-config.exe

```

Next I’ve downloaded pijul from [https://crates.io/api/v1/crates/pijul/0.12.2/download](https://crates.io/api/v1/crates/pijul/0.12.2/download) and patched to use [https://gitlab.com/sequoia-pgp/nettle-sys/-/merge\_requests/5](https://gitlab.com/sequoia-pgp/nettle-sys/-/merge_requests/5)

All dependencies include `libpijul` are building but `pijul` itself produce error:

```auto
error[E0599]: no method named `add_identity` found for unit type `()` in the cur
rent scope
   --> src\commands\ssh_auth_attempts.rs:220:48
    |
220 | return Either::A(agent.add_identity(&key, cons).fr
om_err().and_then(
    | ^^^^^^^^^^^^ method not fou
nd in `()`

```

---

<div class="post-metadata">

**Author:** ![o01eg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/o01eg/32/96_2.png) [@o01eg](https://discourse.pijul.org/u/o01eg)\
**Post date:** [June 10, 2020, 12:44pm UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/2 "2020-06-10T12:44:27Z")

</div>

Also I cann’t correctly build `thrussh-libsodium` `0.1.4` so I need pijul to use `0.2.0` version.

---

<div class="post-metadata">

**Author:** ![o01eg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/o01eg/32/96_2.png) [@o01eg](https://discourse.pijul.org/u/o01eg)\
**Post date:** [June 10, 2020, 1:06pm UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/3 "2020-06-10T13:06:48Z")

</div>

What about to make a minor update for old 0.21 `thrussh` to use 0.2.0 `thrussh-libsodium` which supports windows?

---

<div class="post-metadata">

**Author:** ![o01eg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/o01eg/32/96_2.png) [@o01eg](https://discourse.pijul.org/u/o01eg)\
**Post date:** [June 11, 2020, 2:09pm UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/4 "2020-06-11T14:09:28Z")

</div>

I’ve managed to build `pijul-0.12.2` for `x86_64-pc-windows-msvc`.

I had to patch `nettle-sys`, `cryptovec-0.5.3`, `thrussh-libsodium-0.2.0`, `thrussh-keys-0.11.9`, `thrussh-0.21.5`, and `pijul-0.12.2`, but it works and I can download repositories from the nest via SSH.

---

<div class="post-metadata">

**Author:** ![FrankDMartinez](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FrankDMartinez](https://discourse.pijul.org/u/FrankDMartinez)\
**Post date:** [December 15, 2020, 9:36pm UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/5 "2020-12-15T21:36:52Z")

</div>

Since there are currently no official Windows binaries, would You be in a position to share the full list of steps You had to use to create a working Pijul? I think it would go a long way to helping Others.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![o01eg](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/o01eg/32/96_2.png) [@o01eg](https://discourse.pijul.org/u/o01eg)\
**Post date:** [December 15, 2020, 10:21pm UTC](https://discourse.pijul.org/t/building-pijul-for-target-x86-64-pc-windows-msvc-with-vcpkg/497/6 "2020-12-15T22:21:49Z")

</div>

I suppose it should work now with updated components.
