pijul_org / pijul

#291 Cargo install fails.

Opened by vi, on June 30, 2018
vi commented on June 30, 2018
$ cargo install --force pijul
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing pijul v0.10.1
   Compiling libpijul v0.10.2
error[E0277]: the trait bound `T: rand_core::RngCore` is not satisfied
   --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/libpijul-0.10.2/src/lib.rs:177:30
177 |                 db: self.txn.fork(&mut self.rng, &branch.db)?,
    |                              ^^^^ the trait `rand_core::RngCore` is not implemented for `T`
    = help: consider adding a `where T: rand_core::RngCore` bound
    = note: required because of the requirements on the impl of `rand::Rng` for `T`

$ rustc --version
rustc 1.28.0-nightly (e3bf634e0 2018-06-28)
csi-adziahel commented on July 4, 2018

Master branch fails too

onio commented on July 6, 2018

this might be related

vegai commented on July 18, 2018

Will this be fixed at some point? I don't have a Pijul binary at the moment and cannot make one :-/

onio commented on July 20, 2018

I don't have a Pijul binary at the moment and cannot make on

Is there a way to configure cargo install in a way to set a specific dep version? In this case setting sanakirja to v0.8.16.

edit: Downloading the source code and installing (cd pijul && cargo install) that seem to work.

edit2: that's an outdated version (0.10.0) which isn't able to work with nest via ssh. But you can

  1. clone pijuls master via http: pijul clone https://nest.pijul.com/pijul_org/pijul
  2. replace in libpijul/Cargo.toml sanakirja = {path = ...} with sanakirja = "=0.8.16"
  3. install cargo install --force

edit3: still getting error: early eof when using nest+ssh (maybe outdated system dependencies? im on Ubuntu 16.4 LTS/libsodium v1.0.8)

edit4: upgrading to Ubuntu 18.04 LTS/libsodium v1.0.16 fixed that ssh problem.

cdisselkoen commented on July 23, 2018

cargo install pijul also fails for me with the error about RngCore. Both nightly and stable rust.

I tried @onio's solution bootstrapping from the 0.10.0 source. The 0.10.0 source failed to compile for me with the error linking with 'cc' failed: exit code 1, a very long command invocation, and note: ld: library not found for -llibsodium. I'm on macOS 10.13.6, I have installed libsodium (1.0.16) with brew install libsodium, I have set $SODIUM_LIB_DIR to /usr/local/Cellar/libsodium/1.0.16, and my $LD_LIBRARY_PATH includes /usr/local/Cellar/libsodium/1.0.16/lib which includes the files libsodium.a and libsodium.dylib.

Any help would be appreciated.

mrchico commented on July 25, 2018

Running into the same issue with RngCore. Chiming in simply to subscribe to this thread.

vegai commented on July 27, 2018
balrogboogie commented on August 4, 2018

@cdisselkoen looks like you probably have to install the libsodium-dev package: sudo apt install libsodium-dev and then try to build the 0.10.0 source again

cdisselkoen commented on August 4, 2018

Hi @balrogboogie, thanks for the suggestion. As I'm on macOS, my package manager is Homebrew rather than apt. I can't seem to find a libsodium-dev package in Homebrew, just libsodium. Also, since my error is a linker error, I'm a little confused why I would need more than the libsodium.a and libsodium.dylib files that brew installed for me -- I would think I'm just making some stupid mistake that's keeping the linker from finding these files, I'm just not sure what it is. I could try building libsodium from source, I suppose.

colemickens commented on August 21, 2018

This issue is blocking me from upgrading pijul on NixOS as well: https://github.com/NixOS/nixpkgs/issues/45367#issuecomment-414886984 (Note, specifically the 0.10.0 release)

keccak commented on August 26, 2018

Following the directions onio provided, it compiles, but I get these errors when running inside the pijul repository:

$ pijul log
error: NoDb
$ pijul branches
error: NoDb
$ RUST_BACKTRACE=1 pijul status
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:345:21
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:511
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:426
   6: rust_begin_unwind
             at libstd/panicking.rs:337
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:92
   8: core::panicking::panic
             at libcore/panicking.rs:53
   9: libpijul::record::<impl libpijul::backend::GenericTxn<sanakirja::transaction::MutTxn<'env, ()>, R>>::record_inode
  10: libpijul::record::<impl libpijul::backend::GenericTxn<sanakirja::transaction::MutTxn<'env, ()>, R>>::record_children
  11: libpijul::record::<impl libpijul::backend::GenericTxn<sanakirja::transaction::MutTxn<'env, ()>, T>>::record
  12: pijul::commands::status::run
  13: pijul::main
  14: std::rt::lang_start::{{closure}}
  15: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  16: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  17: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  18: main
  19: __libc_start_main
  20: _start
cdisselkoen commented on September 9, 2018

It looks like there are some patches merged to master that maybe fix the original issue (?) but cargo install still fails for me. Perhaps all we need is a new version published to crates.io?

merlin commented on October 17, 2018

This issue is preventing me from installing pijul on macOS.

kiliancs commented on October 21, 2018

Also unable to install pijul on macOS because of this issue.

onio commented on October 21, 2018

Downloading the source code and installing (cd pijul && cargo install) that seem to work.

kiliancs commented on October 21, 2018

Ah, was trying to find the source code in the nest to do that. I thought maybe there was a feature similar to GitHub where you can download a zip. Should have looked at the home page. That worked!

pmeunier commented on October 21, 2018

This will be fixed by just releasing the next version. Closing for now, feel free to reopen after 0.11 is out.