Holochain Forum

Holochain RSM on MacOS?

I was trying to get back online with zome development and started fiddling with nix-shell etc. No luck. For instance:

error[E0423]: expected value, found struct `GetOptions`
 --> /Users/kristoferlund/Documents/GitHub/holochain/.cargo/git/checkouts/hc-utils-b3d0a9967617de4f/7f65e8f/crates/hc-utils/src/get_header.rs:5:22
  |
5 |     match get(entry, GetOptions)? {
  |                      ^^^^^^^^^^ did you mean `GetOptions { /* fields */ }`?

error[E0423]: expected value, found struct `GetOptions`
  --> /Users/kristoferlund/Documents/GitHub/holochain/.cargo/git/checkouts/hc-utils-b3d0a9967617de4f/7f65e8f/crates/hc-utils/src/get_links_and_load_type.rs:15:64
   |
15 |             |link| match get_latest_entry(link.target.clone(), GetOptions) {
   |                                                                ^^^^^^^^^^ did you mean `GetOptions { /* fields */ }`?

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0423`.
error: could not compile `hc_utils`.

The README clearly states:

We are currently only supporting Linux at this time. You may or may not be able to successfully build and run Holochain on macOS.

:slight_smile: So, maybe I should just let it go and get myself a Linux setup? But… I recall having no trouble getting the first RSM version to run on mac.

I just wanted to check, has someone managed to get holochain to work on MacOS recently?

that problem is easy enough to fix. GetOptions has these two options now, which it looks like hc-utils that you’re pointing at hasn’t updated yet, or maybe double check that repo for any updates.
There’s GetOptions::content() and GetOptions::blocking() . blocking will go to the network for updates, and timeout if it can’t reach, but content will just look for the entry locally (which is supposed to be fine in the current full-sync DHT, but not in the future). This stuff seems to be up for discussion as there was a lot of dialogue around it in a PR not long ago.

1 Like

actually correction it is GetOptions::content() and GetOptions::latest() where latest will retrieve latest metadata

and the PR is here: https://github.com/holochain/holochain/pull/518

Thanks. GetOptions seems to have been replaced by Default::default() in commit below. But that change maybe was part of the PR you referenced?

Running nix-shell with the options --argstr flavor happDev seems to avoid above issue.

But, I run in to more problems.

Compiling lair_keystore_client v0.0.1-alpha.8
   Compiling holochain_wasmer_host v0.0.50
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/nix/sto 
...
...
...
re/c1spfc6wbipbk64akin9lsf3hihf12gy-rust/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f0244eb4ede32fb8.rlib" "-framework" "Security" "-framework" "Security" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: ld: framework not found Security
          clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: aborting due to previous error

error: could not compile `lair_keystore_client`.

Something about accessing macos system frameworks.

Tried installing the security package manually but am really in over my head when it comes to nix-shell/os/env.

nix-env -iA nixpkgs.darwin.Security

No effect.

I’m giving up for now.

2 Likes

I’ve opened a GH issue for this since I’ve had this as well.

I’ve been not using nix lately and having to operate outside of nix with Rust due to this.
There is also a report I’ve linked to from @tats_sato of this as well

2 Likes

I have the same error with macOS Mojave…

 note: ld: framework not found IOKit
          clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
     
 error: aborting due to previous error

seems that compile error has gone with the latest revision.

however now we are stuck with the lair-keystore issue…

  Using config file: /tmp/tmp-19841-2G56l12E7sfY/config.yaml
  Dec 21 00:19:54.639 ERROR lair_keystore_client: error=IpcClientConnectError("/private/tmp/tmp-19841-2G56l12E7sfY/keystore/socket", Os { code: 2, kind: NotFound, message: "No such file or directory" }) file="/Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/lair_keystore_client-0.0.1-alpha.8/src/lib.rs" line=42
  Error: could not connect to holochain conductor, please check that a conductor service is running and available at ws://localhost:1234
at WebSocket.socket.onerror (/Users/me/dev/holochain/demo-module/ui/node_modules/@holochain-open-dev/holochain-run-dna/dist/main.js:8053:24)
at WebSocket.onError (/Users/me/dev/holochain/demo-module/ui/node_modules/ws/lib/event-target.js:140:16)
at WebSocket.emit (events.js:315:20)
at ClientRequest.<anonymous> (/Users/me/dev/holochain/demo-module/ui/node_modules/ws/lib/websocket.js:579:15)
at ClientRequest.emit (events.js:315:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

for that lair issue… it should auto-install the version it needs, but if it doesn’t, you can manually install lair, and have it work…

cargo install --git https://github.com/holochain/lair --rev 0.0.1-alpha.8

For others who took a bold step and installed the latest build on the develop branch of holochain:
revision 3675b588de0aaf7eb9dc852b4012f3cfa5a27df7
It kind of works …

  1. dont use nix… lair and nix are not working together yet

  2. the first time you try to run the conductor with “holochain -i” it should upgrade lair to alpha.10

  3. if you get the error:
    Error: could not connect to holochain conductor, please check that a conductor service is running and available at ws://localhost:1234.
    its a timing issue… press ctrl-c and run it again… you should get a second error

     ERROR lair_keystore_client: error=IpcClientConnectError("/private/var/folders/.../keystore/socket", Os { code: 2, kind: NotFound, message: "No such file or directory" }) file="/Users/../lair/crates/lair_keystore_client/src/lib.rs" line=42
     Conductor ready.
     WARN holochain::conductor::api::api_cell: Using placeholder dpki
     Successfully installed app on port 8888
    

now you should be able to callzome etc…

  1. you might need to install lair_keystore_client
    at https://github.com/holochain/lair with cargo install ( latest version)

my recommendation is to generally use the holochain version in the repo :


and test with that … if its not too old
thus avoiding the cutting edge
1 Like

anyone @kristofer @pauldaoust @guillemcordoba @carolyn updates on whether RSM can work on Mac?

where can I found a walkthrough? the guides are confusing. and possibly not finished?

@pqcdev could you document what you have done so far and post where you have gotten stuck?

ooops! Just saw this other post you made: RSM on Mac