The sound distributed version control system

#685 Mac m1 installation?

Opened by anchpop on May 16, 2022
anchpop on May 16, 2022

Hey, I’m trying to play with pijul! I first tried installing normally (with cargo install pijul --version "~1.0.0-alpha"), then under rosetta, but in both cases I get this error:

    Updating crates.io index
  Installing pijul v1.0.0-beta.2
   Compiling libc v0.2.125
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.38
   ...
   Compiling thrussh v0.33.5
   Compiling pijul v1.0.0-beta.2
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "arm64" ... "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: warning: ignoring file /usr/local/Cellar/xxhash/0.8.1/lib/libxxhash.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
          Undefined symbols for architecture arm64:
            "_XXH64_reset", referenced from:
                _ZSTD_seekable_decompress in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_decompress.o)
                _ZSTD_seekable_initCStream in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_compress.o)
                _ZSTD_seekable_endFrame in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_compress.o)
            "_XXH64_update", referenced from:
                _ZSTD_seekable_decompress in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_decompress.o)
                _ZSTD_seekable_compressStream in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_compress.o)
            "_XXH64_digest", referenced from:
                _ZSTD_seekable_decompress in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_decompress.o)
                _ZSTD_seekable_endFrame in libzstd_seekable-e82c3145229c8aeb.rlib(zstdseek_compress.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `pijul` due to previous error
error: failed to compile `pijul v1.0.0-beta.2`, intermediate artifacts can be found at `/var/folders/qv/h_703px137jfv8jpr328rgx00000gn/T/cargo-installkp5fWn`

Any idea how to resolve this? It seems like cargo isn’t building the executable under rosetta, but I’m not sure how to fix that.

Edit: Since I have nix I managed to install it with nix-env -i pijul, so no urgency

Jonathan on May 20, 2022

If you are using brew you can install the zstd formulae:

brew install zstd

Also you probably need to install xxhash as well:

brew install xxhash

I recommend you to install both: brew install zstd xxhash

Otherwise, you probably would need to compile and install from source.

After installing both packages, I was able to successfully compile pijul on M1 (without Rosetta), so I hope your installation succeeds as well.

hybras on May 21, 2022

I have made a homebrew package. Open a github issue whenever an updated version is needed. brew install hybras/tap/pijul

https://github.com/hybras/homebrew-tap/blob/main/Formula/pijul.rb

jmgd on June 18, 2022

Today (18/6/2022), I was able to install using the instructions only