Pijul install error

Hi, i am trying to install pijul within msys32
how to solve this build error?

--
note that i had installed all libraries and tools for pijul:
pacman -S git make diffutils tar mingw-w64-i686-python2 mingw-w64-i686-gcc
pacman -S openssl-devel mingw-w64-i686-libsodium
https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.msi

MINGW32 ~
$ cargo install pijul
...
   Compiling thread_local v0.3.5
error: failed to run custom build command for `thrussh-libsodium v0.1.3`
process didn't exit successfully: `C:\msys32\tmp\cargo-installZRbNqS\release\build\thrussh-libsodium-8412f0127bd6033a\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=SODIUM_LIB_DIR
cargo:rerun-if-env-changed=SODIUM_STATIC

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"libsodium\"`: No such file or directory (os error 2)"', libcore\result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `pijul v0.10.1`, intermediate artifacts can be found at `C:\msys32\tmp\cargo-installZRbNqS`

Caused by:
  build failed

The package thrussh-libsodium can't find libsodium

To fix it yourself, you'll need to make this command work:

pkg-config --libs libsodium

which needs to be able to find libsodium.pc file on your machine. If you have it, you can set its directory in PKG_CONFIG_PATH env variable.

Another option may be to file a bug on https://nest.pijul.com/pijul_org/thrussh and have them worry about it and add a workaround to their build script :slight_smile:

1 Like

i am not sure it is the problem,
maybe someone at pijul should have to look their code:

MINGW32 ~
$ pkg-config --libs libsodium
-L/mingw32/lib -lsodium

MINGW32 ~
$ cat /mingw32/lib/pkgconfig/libsodium.pc
prefix=/mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libsodium
Version: 1.0.16
Description: A modern and easy-to-use crypto library

Libs: -L${libdir} -lsodium
Cflags: -I${includedir}