The sound distributed version control system

#275 [macOS] alpha.36 failed to build

Closed on January 29, 2021
tankf33der on January 17, 2021

I have installed alpha.31, failed build alpha.36

pager on macOS should be enabled in #256, I don’t know how it happened.

$ cargo install pijul --version 1.0.0-alpha.36
<SKIP>
   Compiling thrussh-libsodium v0.2.1
   Compiling thrussh-keys v0.20.2
   Compiling thrussh v0.32.4
   Compiling pijul v1.0.0-alpha.36
error[E0433]: failed to resolve: use of undeclared crate or module `pager`
   --> /Users/jelena/.cargo/registry/src/github.com-1ecc6299db9ec823/pijul-1.0.0-alpha.36/src/commands/mod.rs:118:17
    |
118 |                 pager::Pager::with_pager("less -RF").setup();
    |                 ^^^^^ use of undeclared crate or module `pager`

error[E0433]: failed to resolve: use of undeclared crate or module `pager`
   --> /Users/jelena/.cargo/registry/src/github.com-1ecc6299db9ec823/pijul-1.0.0-alpha.36/src/commands/mod.rs:121:17
    |
121 |                 pager::Pager::new().setup();
    |                 ^^^^^ use of undeclared crate or module `pager`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0433`.
error: failed to compile `pijul v1.0.0-alpha.36`, intermediate artifacts can be found at `/var/folders/vw/xbbg9w291d923zyhz03rbz840000gn/T/cargo-installnzgv4n`

Caused by:
  could not compile `pijul`

To learn more, run the command again with --verbose.
$
madjar on January 18, 2021

So, I can reproduce the issue with cargo install pijul --version 1.0.0-alpha.36, but I can also confirm that the issue is not present on main, whether I run nix build or cargo build.

The Cargo.toml of the release still contains the line

[target."cfg(target_os = \"linux\")".dependencies.pager], so the fix is not in the release

I don’t know the release process (I’m assuming it’s manual), so I can’t say if there is an issue there, or if it’s normal. Maybe @pmeunier can answer this.

tankf33der on January 21, 2021

I found latest version which can be build on macos now is alpha.31

Kerollmops on January 22, 2021

I found a solution to compile the latest version of pijul (pijul-1.0.0-alpha.37) by downloading the package from crates.io and modifying the Cargo.toml.

  • Download the crate’s tarball by visiting https://crates.io/api/v1/crates/pijul/1.0.0-alpha.37/download (it work in the browser but not with cURL).
  • Change the extension of the downloaded file from .crate into .tar.gz.
  • Extract the tarball by double-clicking on it. For example, you’ll get a folder, go inside.
  • Modify the Cargo.toml file like this:
- libpijul = { path = "../libpijul", version = "1.0.0-alpha.32", features = [ "tarball" ] }
+ libpijul = { version = "1.0.0-alpha.32", features = [ "tarball" ] }

- [target.'cfg(target_os = "linux")'.dependencies]
+ [target.'cfg(unix)'.dependencies]
  • Install the locally modified crate by doing a simple cargo install --path .

I hope it helps, Note that I used nix-env and installed the pkg-config, libsodium, openssl, xxHash, zstd packages. I tried using nix-shell, but there was a linker error (missing cc), so I go outside of the nix-shell and found out that it was compiling well.

tankf33der on January 29, 2021

alpha.38 built ok.

tankf33der closed this discussion on January 29, 2021