Nix on MacOS Catalina

very weird, just delete the lock file and try again

that did more, but still:

error : linking with cc failed: exit code: 1

error: Could not compile syn.

warning: build failed, waiting for other jobs to finish…

error : linking with cc failed: exit code: 1

error: failed to compile holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain), intermediate artifacts can be found at /Users/Zeek/holochain/target

Caused by:

Could not compile proc-macro2.

To learn more, run the command again with --verbose.

proc-macro2 is part of rust itself not something we wrote :thinking:

is this the only output you get? i would expect more information

Installing holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)

error: failed to compile holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain), intermediate artifacts can be found at /Users/Zeek/holochain/target

Caused by:

failed to parse lock file at: /Users/Zeek/holochain/Cargo.lock

Caused by:

invalid serialized PackageId for key package.dependencies

this is what happens each time on new install

the other errors was after I deleted lock file and tried again

cargo install --path crates/holochain

Installing holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)

Updating git repository https://github.com/holochain/lmdb-rs.git

Updating git repository https://github.com/holochain/rkv.git

Updating git repository https://github.com/neonphog/tokio_safe_block_on.git

Updating crates.io index

Compiling proc-macro2 v1.0.24

Compiling syn v1.0.60

Compiling proc-macro-hack v0.5.19

Compiling libc v0.2.86

error : linking with cc failed: exit code: 1

|

= note : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error : aborting due to previous error

error: Could not compile proc-macro-hack.

warning: build failed, waiting for other jobs to finish…

error : linking with cc failed: exit code: 1

|

= note : “cc” “-m64” “-L” “/Users/Zeek/.rustup/toolchains/nightly-2019-01-24-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib” “/Users/Zeek/holochain/target/release/build/syn-8bd4dd5f89975531/build_script_build-8bd4dd5f89975531.build_script_build.6gd4s2hw-cgu.0.rcgu.o” “/Users/Zeek/.rustup/toolchains/nightly-2019-01-24-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-91da867d5d0289af.rlib” “-lSystem” “-lresolv” “-lc” “-lm”

= note : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error : aborting due to previous error

error: Could not compile syn.

warning: build failed, waiting for other jobs to finish…

error : linking with cc failed: exit code: 1

|

= note : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error : aborting due to previous error

error: Could not compile libc.

warning: build failed, waiting for other jobs to finish…

error : linking with cc failed: exit code: 1

|

= note : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error : aborting due to previous error

error: failed to compile holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain), intermediate artifacts can be found at /Users/Zeek/holochain/target

Caused by:

Could not compile proc-macro2.

To learn more, run the command again with --verbose.

install xcode https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

ah ok I had to sudo reset via CLI. now I get:

holochain % cargo install --path crates/holochain

**Installing** holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)

**Updating** git repository `https://github.com/holochain/lmdb-rs.git`

**Updating** git repository `https://github.com/holochain/rkv.git`

**Updating** git repository `https://github.com/neonphog/tokio_safe_block_on.git`

**Updating** crates.io index

**Compiling** proc-macro2 v1.0.24

**Compiling** syn v1.0.60

**Compiling** crunchy v0.2.2

**Compiling** proc-macro-hack v0.5.19

**Compiling** libc v0.2.86

**Compiling** serde_derive v1.0.123

**Compiling** memchr v2.3.4

**Compiling** proc-macro-nested v0.1.7

**Compiling** getrandom v0.1.16

**Compiling** version_check v0.9.2

**Compiling** tiny-keccak v2.0.2

**Compiling** autocfg v1.0.1

**Compiling** getrandom v0.2.2

**Compiling** serde v1.0.123

**Compiling** cfg-if v1.0.0

**Compiling** futures-sink v0.3.13

**Compiling** futures-core v0.3.13

**Compiling** pin-project-lite v0.2.4

**error[E0432]** **: unresolved import `core::task::Context`**

**-->** /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.13/src/future.rs:5:18

**|**

**5** **|** use core::task::{Context, Poll};

**|** **^^^^^^^** **no `Context` in `task`**
error[E0432]: unresolved imports `core::task::Context`, `core::task::RawWaker`, `core::task::RawWakerVTable`
  --> /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.13/src/task/mod.rs:10:22
   |
10 | pub use core::task::{Context, Poll, Waker, RawWaker, RawWakerVTable};
   |                      ^^^^^^^               ^^^^^^^^  ^^^^^^^^^^^^^^ no `RawWakerVTable` in `task`
   |                      |                     |
   |                      |                     no `RawWaker` in `task`
   |                      no `Context` in `task`
**Compiling** slab v0.4.2

**error[E0658]** **: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)**

**-->** /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-sink-0.3.13/src/lib.rs:14:1

**|**

**14** **|** extern crate alloc;

**|** **^^^^^^^^^^^^^^^^^^^**

**|**

**=** **help** : add #![feature(alloc)] to the crate attributes to enable

**error[E0658]** **: use of unstable library feature 'futures_api': futures in libcore are unstable (see issue #50547)**

**-->** /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-sink-0.3.13/src/lib.rs:18:27

**|**

**18** **|** use core::task::{Context, Poll};

**|** **^^^^**

**|**

**=** **help** : add #![feature(futures_api)] to the crate attributes to enable

**error[E0658]** **: use of unstable library feature 'futures_api': futures in libcore are unstable (see issue #50547)**

**-->** /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-sink-0.3.13/src/lib.rs:63:66

**|**

**63** **|** fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>;

**|** **^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**

**|**

**=** **help** : add #![feature(futures_api)] to the crate attributes to enable
**error[E0658]** **: use of unstable library feature 'futures_api': futures in libcore are unstable (see issue #50547)**

**-->** /Users/Zeek/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.13/src/future.rs:53:57

**|**

**53** **|** impl<F, T, E> Sealed for F where F: ?Sized + Future<Output = Result<T, E>> {}

**|** **^^^^^^^^^^^^^^^^^^^^^**

**|**

**=** **help** : add #![feature(futures_api)] to the crate attributes to enable

**error** **: aborting due to 37 previous errors**

**Some errors occurred: E0432, E0658.**

**For more information about an error, try `rustc --explain E0432`.**

**error:** Could not compile `futures-core`.

**warning:** build failed, waiting for other jobs to finish...

**error** **: aborting due to 28 previous errors**

**Some errors occurred: E0432, E0658.**

**For more information about an error, try `rustc --explain E0432`.**

**error:** Could not compile `futures-sink`.

**warning:** build failed, waiting for other jobs to finish...

**error:** failed to compile `holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)`, intermediate artifacts can be found at `/Users/Zeek/holochain/target`

Caused by:

build failed

Well that sounds like a previous version of cargo, which version are you on?

I wouldn’t advise to delete the Cargo.lock file. It’ll get you into untested territory as the dependencies in the Cargo.toml aren’t all pinned.

@pqcdev if you go the cargo route I suggest you use the main branch on the holochain repository because we (for now manually) ensure that it builds on macOS in our Nix infrastructure that feeds HoloPortOS.

@steveeJ i suggested deleting the lock because it seemed to me like whatever was there is corrupt somehow

cargo 1.33.0-nightly (907c0febe 2019-01-20)

I followed cargo installation link that David gave me (altho I already had it from redux, perhaps its not updating properly?)

sounds like I should just get Linux… any suggestions on a good PC laptop to buy? or maybe how best I can go about this? unfortunately cant get a desktop bc I dont have a permanent home

I can use my Macbook for everyday stuff and the other comp for Happ building

many thanks to all of you!! :pray:

you can use docker to get linux on mac

cargo is rust though, it’s going to be the same tool on mac/linux

In that case a git checkout Cargo.lock should do help recover that. If that wouldn’t help the git data was probably damaged.

This is severely outdated. Have you tried rustup update?

I meant so I can use Nix

yes I’ve tried that, buutt… rustup default nightly worked

cargo --version
cargo 1.52.0-nightly (572e20153 2021-02-24)

however, still get:

cargo install --path crates/holochain

**Installing** holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)

**Updating** git repository `https://github.com/holochain/lmdb-rs.git`
**Updating** git repository `https://github.com/holochain/rkv.git`
**Updating** git repository `https://github.com/neonphog/tokio_safe_block_on.git`
**Updating** crates.io index
**Compiling** libc v0.2.86
**Compiling** proc-macro2 v1.0.24
**Compiling** syn v1.0.60
**Compiling** serde_derive v1.0.123
**error** **: linking with `cc` failed: exit code: 1**

**=** **note** : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

**error** **: aborting due to previous error**
**error** **:** could not compile `serde_derive`
To learn more, run the command again with --verbose.
**warning** **:** build failed, waiting for other jobs to finish...

**error** **:** failed to compile `holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)`, intermediate artifacts can be found at `/Users/Zeek/holochain/target`

Caused by:

build failed

oh I see, that’s a good start :smiley: however we don’t require nightly so you could do rustup install stable && rustup default stable && rustup uninstall nightly

Stating that I’m not an expert on macOS is a strong understatement, however I believe @thedavidmeister already pointed out the solution for the missing xcrun here:

stable worked!! hooray :tada: :confetti_ball: :fireworks: :pray: :pray: :hugs:

THANK YOU ALL SO MUCH

3 Likes

I’m glad to see something worked eventually.
Can you summarize here recommendations for this, based on your experience now, for future-readers?

Nix was unable to install due to error about unencrypted / read-only something weird. I had both Xcode and rust/cargo installed from redux but old versions that had trouble updating

Solution Summary

decided to use cargo method instead of Nix https://doc.rust-lang.org/cargo/getting-started/installation.html

make sure to sudo xcode-select --reset https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

also rustup update and if that does not work

then regular instructions:

git clone https://github.com/holochain/holochain

cd holochain

cargo install --path crates/holochain

should work! (might have to close and reopen terminal)

if you get:

"
Caused by:

failed to parse lock file at: /Users/username/holochain/Cargo.lock

Caused by:

invalid serialized PackageId for key package.dependencies
"
then use

3 Likes