Holochain Forum

Facing issues while trying the Hello Holo tutorial

Hi im very new to holochain so im just trying out the basics with the Hello Holo tutorial but unfortunately i’ve not been successful. When trying to generate the zomes for the tutorial i get:

[nix-shell:~/Projects/holochain/coreconcepts/cc_tuts]$ hc package

CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR "
/home/kevin/target
CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR
“CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR”
Updating crates.io index
error: failed to select a version for the requirement toml = "= 0.5.0"
candidate versions found which didn’t match: 0.5.8, 0.5.7, 0.5.6, …
location searched: crates.io index
required by package holochain_logging v0.0.7
… which is depended on by holochain_core_types v0.0.51-alpha1
… which is depended on by hdk v0.0.51-alpha1
… which is depended on by hdk_proc_macros v0.0.51-alpha1
… which is depended on by hello v0.1.0 (/home/kevin/Projects/holochain/coreconcepts/cc_tuts/zomes/hello/code)
Error: Couldn’t traverse DNA in directory “/home/kevin/Projects/holochain/coreconcepts/cc_tuts”: command CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR was not successful

Been trying to find a solution on the forum but i did not come across any. All help would be much appreciated. Thanks : )

1 Like

Looks like the 0.5.0 version of the toml crate was yanked 10 days ago, making it unavailable for download. You should be able to change the line in the file cargo is complaining about from toml = "= 0.5.0" to toml = "0.5" (but it might take some searching around for the file, looks like the issue is in a deeply nested dependency)
Don’t have an environment on me right now so I can’t test it, unfortunately.

This looks like a pretty serious issue for newcomers to Holochain, hopefully it’ll be fixed soon.

paging @thedavidmeister about this because it looks like they’re the one responsible for this crate

2 Likes

thanks for the report, i’ll see what i can do

2 Likes

Thanks for helping me out @MightyAlex200…was really confused about this : )

thanks @thedavidmeister : )

@thedavidmeister have you found a solution to this? It must be somewhere in some config file deep in the dependency tree - I also can’t get past this. Tried searching for package holochain_logging v0.0.7. I’d flag this as high priority and I think it should be a quick fix.

1 Like

cc: @lucas.tauil and @paul

1 Like

Ok, so I tried diving into the deep end and drowned. I can setup the nix-shell environment with the any holonix release from github but that has the same problem. So I figured I might try to clone the holochain (RSM) repo, build and then use that with holonix built locally, but that ended up costing a lot of time with no success. Problem: the CLI binary hc is missing.

I noticed that the Cli crate is missing in current develop branch revision. I think that’s where the hc commands are defined. Does that mean that the setup is now markedly different from the last one? Can I set up a development environment with the most recent revision now without waiting for a release and if so I’d appreciate a few pointers? [FYI - I’ve gone through the holonix docs and also most of the readmes on github]

Perhaps my question is - when is RSM coming for enthusiastic newbies like myself to play with?

1 Like

It’s me again :wink:

I found out the better detailed guide here: https://github.com/holochain/holochain/blob/develop/docs/build_tutorial.md

nix-shell complained that it could not find hc-install (after running it inside the holochain directory).

So I went for the cargo install way. Two deps - pgk-config and libssl - do not get installed with the build. So I had to apt install them first.

The problem is that it takes months (more than 12 hrs on my notebook) to compile the whole thing. But it compiled. Is there a way of speeding that up?

However, I couldn’t compile any of the zomes in crates/wasm/wasm_workspace/. The compiler complains about the crate core not being found: error[E0463]: can't find crate for 'core' . This occurred while compiling packages cfg_if and itoa (and, I think, others not listed in the output).

@thedavidmeister I’d appreciate any pointers you can give.

Thanks

1 Like

If interested: I found the file in ~/.cargo/registry/index/github.com-1ecc6299db9ec823/.cache/ho/lo/holochain_logging and changed the toml requirement to 0.5.8 in multiple places, and could proceed from there. (I also made the adjustment in ~/.cargo/registry/src/github.com-1ecc6299db9ec823/holochain_logging-0.0.7/crates/holochain_logging/Cargo.toml, but not 100% sure that’s needed)

1 Like

Thanks @maparent.

1 Like

So, in case someone stumbles upon this as well, you build and install holochain and dna-utils with cargo install ... but to do the rest you need to be inside the nix shell. I had to install npm inside nix with nix-env -i nodejs. Otherwise I didn’t have it.

With elemental-chat the npm test failed. All else went as described in the docs up until the test.

1 Like

Hi! Mmm just wanted to say that all of this is getting worked on right now, and when we have the nix-shell happy path all this should become trivial. We also won’t have to compile the whole source code with that.

1 Like

Awesome! Thanks for the feedback @guillemcordoba

1 Like