Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running nix-shell fails at error: could not compile const-random-macro on OSX Catalina #20

Closed
stephenpurkiss opened this issue Apr 5, 2021 · 6 comments

Comments

@stephenpurkiss
Copy link
Contributor

I am wondering if anyone else is running OSX Catalina and managed to get nix-shell working OK. Due to the age of my laptop (Mid-2012) I am unable to upgrade to Big Sur, I don't have much space left on the machine to do dual-boot, plus I believe I won't be the only one who will be using Catalina for Holochain dev so sticking with it for the moment, will have to rethink if can't sort this issue out though as I'm still stuck at the first exercise lol.

Previously I posted on the Big Sur issue however as I discover and learn more I see the issues don't seem to be as related as I thought, I had a little google again today and saw an issue on the rust language to do with hashing and wondering if it's providing clues so thought I'd post here in case it makes any more sense to those in the know as the holonix command works fine it's only when I run nix-shell in the developer exercises it breaks. But then again I'm not running nix-shell on anything else so haven't isolated this, not sure what else I could try so feel free to suggest something so I can see whether it's developer-exercises specific or not.

@stephenbpurkiss

I'm running Catalina 10.15.7...

Since this ticket is called "holonix fails on big sur (darwin 11.2.1)" and your report shows a different error message, you're likely dealing with a different issue than the reporter on this one. It would be helpful if you could file a new issue so we can deal with that separately.

From the Rust hashbrown issue:

Disclaimer: This is actually not an issue with hashbrown but with cargo.

Topic: no_std support

While hashbrown itself is able to compile successfully for no_std targets, and even uses the CI pipeline to verify its compatibility to the thumbv6m-none-eabi target, it might still trigger issues if used with other dependencies when the default ahash feature is enabled.

Issue

The dependency tree of ahash injects the getrandom crate if the default feature set is enabled. This crate is heavily platform dependent and does not support targets like the thumbv6 or thumbv7 families.

How does this happen?

The underlying issue is an a long standing and well known cargo bug (rust-lang/cargo#5760) which automatically calculates a required feature set for each (sub-)dependency inside the dependency tree regardless of the dependency origin.

If ahash - with default feature set - is used, it will include the const-random crate and therefore the proc macro crate const-random-macro into the dependency tree. This will request the getrandom feature for the crates rand v^0.7 and indirectly also rand_core v^0.5.1.

As dependencies of proc macros are compiled for the host and not the target architecture this works fine as long as the host architecture is contained in the following list and the no_std build should be successful (as you can see inside the CI).

But it is going to fail as soon as one of the following two conditions are true:

  • The host architecture is not supported.
  • The target architecture is not supported and the dependency tree contains at least one non proc macro dependency, which requires either rand v^0.7 or rand_core v^0.5.1, because than the underlying cargo issue kicks in. Cargo is going to inject the getrandom feature requirement for these crates, originating from the dependency list of const-random-macro, into the other dependency so that cargo is trying to compile getrandom not only for the host architecture but also for the target architecture.

Request

As long as rust-lang/cargo#5760 is still a thing it would be great if at least the hashbrown documentation could get a warning paragraph explaining this topic including how to work around this issue.

Potential workarounds I can see:

  • hashbrown could introduce a way to disable the compile-time-rng feature of ahash if default features are disabled.
  • The relying crate could disable the ahash feature of hashbrown and reintroduce another hasher or ahash without compile-time-rng feature.

Both might result in ahash losing the compile time random seed for the hash values.

Here's the output - am using @tixel's new fork but it's the same error as before:

 ~/H/developer-exercises //  master /  nix-shell
these derivations will be built:
  /nix/store/gjds6y8dgzkymh0sh9bd22h04ffc1h7h-holochain.drv
  /nix/store/rv1q1h55jpjdacz572pc2bk4yg4g5m69-holochain.drv
building '/nix/store/gjds6y8dgzkymh0sh9bd22h04ffc1h7h-holochain.drv'...
unpacking sources
unpacking source archive /nix/store/pdn52ym8p7zl77knn6l8ndmm2lqw30g7-source
source root is source
unpacking source archive /nix/store/85b48hlafqzj77igbdvnywk33hv4ky7a-holochain-vendor.tar.gz
patching sources
Validating consistency between /private/tmp/nix-build-holochain.drv-0/source/Cargo.lock and /private/tmp/nix-build-holochain.drv-0/holochain-vendor.tar.gz/Cargo.lock
configuring
building
++ env CC_x86_64-apple-darwin=/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc CXX_x86_64-apple-darwin=/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/c++ CC_x86_64-apple-darwin=/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc CXX_x86_64-apple-darwin=/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/c++ cargo build -j 8 --release --target x86_64-apple-darwin --frozen --no-default-features --manifest-path=crates/holochain/Cargo.toml
   Compiling libc v0.2.88
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.61
   Compiling autocfg v1.0.1
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.123
   Compiling serde_derive v1.0.123
   Compiling log v0.4.14
   Compiling memchr v2.3.4
   Compiling version_check v0.9.2
   Compiling lazy_static v1.4.0
   Compiling typenum v1.12.0
   Compiling proc-macro-hack v0.5.19
   Compiling cfg-if v0.1.10
   Compiling bitflags v1.2.1
   Compiling cc v1.0.67
   Compiling getrandom v0.1.16
   Compiling getrandom v0.2.2
   Compiling byteorder v1.4.2
   Compiling proc-macro-nested v0.1.7
   Compiling ryu v1.0.5
   Compiling hashbrown v0.9.1
   Compiling itoa v0.4.7
   Compiling serde_json v1.0.64
   Compiling futures-core v0.3.13
   Compiling slab v0.4.2
   Compiling pin-project-lite v0.1.12
   Compiling ppv-lite86 v0.2.10
   Compiling pin-project-lite v0.2.6
   Compiling futures-sink v0.3.13
   Compiling futures-io v0.3.13
   Compiling futures-task v0.3.13
   Compiling autocfg v0.1.7
   Compiling unicode-segmentation v1.7.1
   Compiling pin-utils v0.1.0
   Compiling fnv v1.0.7
   Compiling crunchy v0.2.2
   Compiling smallvec v1.6.1
   Compiling tiny-keccak v2.0.2
   Compiling pin-project-internal v0.4.27
   Compiling bytes v0.5.6
   Compiling once_cell v1.7.2
   Compiling percent-encoding v2.1.0
   Compiling arrayvec v0.4.12
   Compiling scopeguard v1.1.0
   Compiling rayon-core v1.9.0
   Compiling regex-syntax v0.6.22
   Compiling matches v0.1.8
   Compiling core-foundation-sys v0.8.2
   Compiling bytes v1.0.1
   Compiling tinyvec_macros v0.1.0
   Compiling rand_core v0.4.2
   Compiling arrayref v0.3.6
   Compiling constant_time_eq v0.1.5
   Compiling arrayvec v0.5.2
   Compiling remove_dir_all v0.5.3
   Compiling untrusted v0.7.1
   Compiling spin v0.5.2
   Compiling subtle v2.4.0
   Compiling base64 v0.13.0
   Compiling either v1.6.1
   Compiling unicode-width v0.1.8
   Compiling paste v1.0.3
   Compiling strsim v0.8.0
   Compiling nodrop v0.1.14
   Compiling ansi_term v0.12.1
   Compiling httparse v1.3.5
   Compiling native-tls v0.2.7
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.11.0
   Compiling bytemuck v1.5.1
   Compiling str_stack v0.1.0
   Compiling cpuid-bool v0.2.0
   Compiling core-foundation-sys v0.7.0
   Compiling try-lock v0.2.3
   Compiling adler v1.0.2
   Compiling tower-service v0.3.1
   Compiling base64 v0.11.0
   Compiling gimli v0.23.0
   Compiling rustversion v1.0.4
   Compiling httpdate v0.3.2
   Compiling block-padding v0.2.1
   Compiling rustc-demangle v0.1.18
   Compiling object v0.23.0
   Compiling strum v0.18.0
   Compiling semver-parser v0.7.0
   Compiling encoding_rs v0.8.28
   Compiling doc-comment v0.3.3
   Compiling ident_case v1.0.1
   Compiling strsim v0.9.3
   Compiling mime v0.3.16
   Compiling crc32fast v1.2.1
   Compiling cranelift-entity v0.59.0
   Compiling cranelift-codegen-shared v0.59.0
   Compiling ipnet v2.3.0
   Compiling pkg-config v0.3.19
   Compiling anyhow v1.0.38
   Compiling linked-hash-map v0.5.4
   Compiling predicates-core v1.0.2
   Compiling target-lexicon v0.10.0
   Compiling dunce v1.0.1
   Compiling normalize-line-endings v0.3.0
   Compiling derive_builder v0.9.0
   Compiling async-trait v0.1.45
   Compiling difference v2.0.0
   Compiling subtle v1.0.0
   Compiling failure_derive v0.1.8
   Compiling treeline v0.1.0
   Compiling dtoa v0.4.7
   Compiling downcast v0.10.0
   Compiling same-file v1.0.6
   Compiling maybe-uninit v2.0.0
   Compiling fragile v1.0.0
   Compiling nix v0.15.0
   Compiling target-lexicon v0.9.0
   Compiling byte-tools v0.3.1
   Compiling wasmparser v0.51.4
   Compiling void v1.0.2
   Compiling opaque-debug v0.2.3
   Compiling hex v0.4.3
   Compiling fake-simd v0.1.2
   Compiling fallible-iterator v0.2.0
   Compiling utf-8 v0.7.5
   Compiling percent-encoding v1.0.1
   Compiling termcolor v1.1.2
   Compiling tracing-core v0.1.17
   Compiling sharded-slab v0.1.1
   Compiling indexmap v1.6.1
   Compiling num-traits v0.2.14
   Compiling crossbeam-utils v0.8.3
   Compiling num-integer v0.1.44
   Compiling memoffset v0.6.1
   Compiling rayon v1.5.0
   Compiling tokio v1.2.0
   Compiling miniz_oxide v0.4.4
   Compiling generic-array v0.14.4
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling ahash v0.6.3
   Compiling unicase v2.6.0
   Compiling futures-channel v0.3.13
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling heck v0.3.2
   Compiling thread_local v1.1.3
   Compiling lock_api v0.3.4
   Compiling unicode-bidi v0.3.4
   Compiling form_urlencoded v1.0.1
   Compiling tinyvec v1.1.1
   Compiling rand_core v0.3.1
   Compiling input_buffer v0.3.1
   Compiling ring v0.16.20
   Compiling sysinfo v0.15.9
   Compiling blake3 v0.1.5
   Compiling http v0.2.3
   Compiling blake2b_simd v0.5.11
   Compiling itertools v0.10.0
   Compiling textwrap v0.11.0
   Compiling rgb v0.8.25
   Compiling itertools v0.8.2
   Compiling regex-automata v0.1.9
   Compiling semver v0.9.0
   Compiling cranelift-codegen-meta v0.59.0
   Compiling yaml-rust v0.4.5
   Compiling lmdb-rkv-sys v0.11.0 (https://github.com/holochain/lmdb-rs.git#46043614)
   Compiling predicates-tree v1.0.2
   Compiling cranelift-bforest v0.59.0
   Compiling walkdir v2.3.1
   Compiling block-padding v0.1.5
   Compiling addr2line v0.14.1
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling unicode-normalization v0.1.17
   Compiling http-body v0.4.0
   Compiling http-body v0.3.1
   Compiling rustc_version v0.2.3
   Compiling matchers v0.0.1
   Compiling tracing-log v0.1.2
   Compiling env_logger v0.8.3
   Compiling want v0.3.0
   Compiling quote v1.0.9
   Compiling aho-corasick v0.7.15
   Compiling quick-xml v0.20.0
   Compiling time v0.1.43
   Compiling num_cpus v1.13.0
   Compiling atty v0.2.14
   Compiling iovec v0.1.4
   Compiling net2 v0.2.37
   Compiling rand_os v0.1.3
   Compiling rand_jitter v0.1.4
   Compiling dirs-sys v0.3.5
   Compiling signal-hook-registry v1.3.0
   Compiling parking_lot_core v0.7.2
   Compiling socket2 v0.3.19
   Compiling mio v0.7.9
   Compiling rand v0.4.6
   Compiling if-addrs v0.6.5
   Compiling errno v0.2.7
   Compiling page_size v0.4.2
   Compiling memmap v0.7.0
   Compiling paste-impl v0.1.18
   Compiling num-format v0.4.0
   Compiling generic-array v0.12.4
   Compiling security-framework-sys v2.1.1
   Compiling core-foundation v0.9.1
   Compiling security-framework-sys v0.4.3
   Compiling core-foundation v0.7.0
   Compiling raw-cpuid v7.0.4
   Compiling idna v0.2.2
   Compiling idna v0.1.5
   Compiling err-derive v0.2.4
   Compiling smallvec v0.6.14
   Compiling regex v1.4.3
   Compiling rmp v0.8.10
   Compiling float-cmp v0.8.0
   Compiling ordered-float v1.1.1
   Compiling crossbeam-channel v0.5.0
   Compiling crossbeam-epoch v0.9.3
   Compiling rand_core v0.5.1
   Compiling clap v2.33.3
   Compiling mio v0.6.23
   Compiling directories v3.0.1
   Compiling cranelift-codegen v0.59.0
   Compiling rand_core v0.6.2
   Compiling uuid v0.8.2
   Compiling parking_lot v0.10.2
   Compiling directories v2.0.2
   Compiling tempdir v0.3.7
   Compiling backtrace v0.3.56
   Compiling flate2 v1.0.20
   Compiling mime_guess v2.0.3
   Compiling const-random-macro v0.1.13
error: linking with `/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc` failed: exit code: 1
  |
  = note: "/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc" "-m64" "-arch" "x86_64" "-L" "/nix/store/mbmhlhhbcd6h3nwscfm6hyfi4g0adrvh-rust-1.48.0-2020-11-16-7eac88abb/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.0.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.1.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.10.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.11.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.12.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.13.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.14.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.15.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.2.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.3.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.4.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.5.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.6.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.7.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.8.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.const_random_macro.d2zy5i9r-cgu.9.rcgu.o" "-o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/libconst_random_macro-9a902a1dd1bff001.dylib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.bmm6ydvizzs08wt.rcgu.o" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/const_random_macro-9a902a1dd1bff001.9ffdv3kala9ku6t.rcgu.o" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" "-L" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps" "-L" "/nix/store/mbmhlhhbcd6h3nwscfm6hyfi4g0adrvh-rust-1.48.0-2020-11-16-7eac88abb/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/libgetrandom-2c5a0339f5242cec.rlib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/liblibc-629a0f50f5c933d3.rlib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/libcfg_if-89ba5a4e0fc60526.rlib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/libtiny_keccak-ce08384ede31f549.rlib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/libcrunchy-86147ad274e5e238.rlib" "/private/tmp/nix-build-holochain.drv-0/source/target/release/deps/liblazy_static-149280817e49accd.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libproc_macro-41f9768367436ba9.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libstd-688c1376a25c049d.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-078f89c2cdb6d46b.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libobject-fec020208bc1ad3c.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-38540dcacc9fd218.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libgimli-6f613179f618c598.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-4d1a5d7118aaeaf2.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-d88fab3b1b9d8356.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-a21754532a052f2f.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libunwind-2e9ebc4127641a96.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-82d0f961232a05ca.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/liblibc-370b1b71f08bac3c.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/liballoc-816106c1f35f5421.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-20f3a030f1a56a86.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libcore-60333aa00936c5ce.rlib" "/nix/store/2gpgkccqb22gchhcvaf73li8nyq0qcvi-rust/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-116aaeaea873ef94.rlib" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: ld: library not found for -liconv
          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 `const-random-macro`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...

@stephenpurkiss
Copy link
Contributor Author

So I've been doing a little more digging and learning a little more about how all this works and I'm wondering if the problem is to do with the version of holonix you're using doesn't have libiconv dependency as this was added by @steveej after I posted my issue - see holo-nixpkgs: bump to include libiconv dependency on darwin #212

I do not currently have the fu to figure out how I could test this theory locally.

@tixel
Copy link
Collaborator

tixel commented Apr 6, 2021

Just to make sure:
do you have the macos developer tools installed?
https://apps.apple.com/us/app/xcode/id497799835?mt=12

Another interesting link might be this one:
https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/

I don't run MacOS so I have no way of validating.

@stephenpurkiss
Copy link
Contributor Author

Just to make sure:
do you have the macos developer tools installed?
https://apps.apple.com/us/app/xcode/id497799835?mt=12

Yes ;) Although I did have a crisis of confidence the other week and wondered if I'd perhaps done a reinstall of OSX since I last played with code but it's there, xcode-select version 2373.

Another interesting link might be this one:
https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/

Interesting - it makes sense so I tried, ensured the environment variables were correctly added by echoing them but still the same error which is why I'm thinking it's where @steveej says:

In the meantime we merged something that will likely help with the libiconv linking, see #212.

...and in #212 @steveej says:
"I want to unblock the macOS devs with this PR"

So when I did some more digging today and saw the developer exercises are referencing a specific commit of holonix I realised this "unblocking" of macOS devs wouldn't be included in the one used here.

This is me presuming that liconv has something to do with libiconv. If not then I am incorrect in my assumptions.

  = note: ld: library not found for -liconv 
          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 `const-random-macro`

I don't run MacOS so I have no way of validating.

Really appreciate your time and attention, could very well have been that environment variable issue, good find!

@guillemcordoba
Copy link
Contributor

@stephenbpurkiss can you try again doing nix-shell from the master branch? I just bumped the holonix version, which should point to the latest develop and include the liconv fix. I think that should fix the issue, it should be very close to everything you get with nix-shell https://nightly.holochain.love.

@stephenpurkiss
Copy link
Contributor Author

Woo yay, got further than last time!

[nix-shell:~/Holoplay/holochain-gym/stephenbpurkiss/developer-exercises/basic/0.entries]$ ./run_tests.sh
 ****HOLOCHAIN-GYM RUNNING TESTS ****
Wrote bundle /Users/steve/Holoplay/holochain-gym/stephenbpurkiss/developer-exercises/basic/0.entries/workdir/exercise.dna

up to date, audited 176 packages in 1s

2 high severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

> [email protected] test
> TRYORAMA_LOG_LEVEL=info RUST_LOG=error RUST_BACKTRACE=1 TRYORAMA_HOLOCHAIN_PATH="holochain" ts-node src/index.ts

14:49:26 [tryorama] info: Using the following settings from environment variables:
14:49:26 [tryorama] info: {
  "adminInterfaceId": "tryorama-interface-admin",
  "appInterfaceId": "tryorama-interface-app",
  "stateDumpOnError": true,
  "zomeCallTimeoutMs": 90000,
  "conductorTimeoutMs": 125000,
  "strictConductorTimeout": false,
  "chooseFreePort": false,
  "logLevel": "info",
  "portRange": [
    33000,
    34000
  ],
  "legacy": false,
  "singletonAppId": "TRYORAMA_APP",
  "holochainPath": "holochain",
  "lairPath": "lair-keystore"
}
TAP version 13
# say a greeting
FIXME: ignoring onJoin
14:49:26 [tryorama] info: Spawning lair for test with keystore at:  /tmp/tmp.3kEwIhj8f2/tryorama/qbT8t4/keystore
14:49:26 [tryorama] info: Using conductor path:  holochain
14:49:26 [tryorama] info: Holochain version:     holochain 0.0.100

14:49:26 [tryorama] info: Conductor config path: /tmp/tmp.3kEwIhj8f2/tryorama/qbT8t4/conductor-config.yml
14:49:27 info:
☉☉☉ [[[CONDUCTOR c0]]]
☉
☉ ###HOLOCHAIN_SETUP###
☉ ###ADMIN_PORT:33000###
☉ ###HOLOCHAIN_SETUP_END###
☉
14:49:27 info:
★★★ [[[CONDUCTOR c0]]]
★ Conductor ready.
★
14:49:27 [tryorama] info: Conductor 'c0' process spawning completed.
App Port spun up on port  64836
ok 1 should be truthy
14:49:27 [tryorama] info: conductor 'c0' exited with code null
FIXME: ignoring onLeave

1..1
# tests 1
# pass  1

# ok

@guillemcordoba
Copy link
Contributor

Yes! All seems to work, closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants