Unable to compile holochain

I followed the setup instructions in the holochain gym and got as far as running nix-shell to do the initial build. It seemed to successfully compile a number of components, but ultimately failed while attempting the following:

**Compiling** holochain v0.0.100 (/private/tmp/nix-build-holochain.drv-0/source/crates/holochain)

**error****: linking with `/nix/store/47vpv5i10dwfg1cf5wca1k40f982g5fm-clang-wrapper-7.1.0/bin/cc` failed: exit code: 1**
...
= note: Undefined symbols for architecture x86_64:
            "_SecTrustEvaluateWithError", referenced from:
                security_framework::trust::SecTrust::evaluate_with_error::h8bf8a2b2bf458c1e in libsecurity_framework-1af3fbf49fb0538d.rlib(security_framework-1af3fbf49fb0538d.security_framework.belch8t2-cgu.15.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          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 `holochain`
To learn more, run the command again with --verbose.

builder for '/nix/store/3ssp2ljw2cwdx7yi7im34clkir2351y1-holochain.drv' failed with exit code 101

**error:** build of '/nix/store/3ssp2ljw2cwdx7yi7im34clkir2351y1-holochain.drv', '/nix/store/fjhlpp00ibz23pglm3bhw0b7mc10jgns-lair-keystore.drv', '/nix/store/rmya4j3sz9f3h134kzbg7hairabi869i-holochain.drv' failed

I’m running this on my MacBook Pro with MacOS Big Sur Version 11.4.

Any suggestions for getting past this would be appreciated!

1 Like

It would be great if you could post this as an issue here, you’ll see one from me saying it fails on Catalina so a good title would be fails on Big Sur because last time the issues were similar but different. My Macbook Pro is 2012 and too old to upgrade :frowning:

done. Thanks for the suggestion.

2 Likes

Thanks! This is all really great to be able to bulletproof holonix. Ping @steveeJ

1 Like

Just to clarify… Stephen’s suggestion was to cross-post this issue on github (which is what my “done” referred to). I’m still hoping to get some suggestions on how to fix the compile problem (which is still open).

1 Like

Oh yeah okey, there is not much we can do for that until holonix fixes that issue upstream. The alternative for now is to install lair-keystore and holochain raw from their git repo with:

cargo install --git https://github.com/holochain/lair lair_keystore
cargo install --git https://github.com/holochain/holochain holochain

This assumes you already have rust installed.

1 Like

That worked! Thank you so much for your responsiveness, Guillem!

1 Like

Take into account that this holochain version will be out of date soon, and there is no guarantee about it working well with the gym… This is the reason why we use nix, to lock holochain versions and know that they will work in the appropriate repository.

I appreciate the caveats… for now, at least, the gym is working fine.

I’m wondering if it makes sense to report this as an issue on the holonix repo (in addition to the “gym” repo). It looks like the last holonix release was from Oct 2020, so I’m not sure if there is still active dev happening on holonix.

Yes there is, it’s just being fetched from github directly. I know Stevee is actively trying to get all the issues arising for people fixed, so this is a good process. Thanks :slight_smile: