noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
821 stars 177 forks source link

Failed to locate correct Barretenberg. Package barretenberg was not found in the pkg-config search path. #1476

Closed vicyyn closed 1 year ago

vicyyn commented 1 year ago

Aim

Following this guide on how to compile from source: https://noir-lang.org/getting_started/nargo_installation/#option-4-compile-from-source

Expected Behavior

Building and testing
Assuming you are using direnv to populate your environment, building and testing the project can be done with the typical cargo build, cargo test, and cargo clippy commands. You'll notice that the cargo version matches the version we specify in flake.nix, which is 1.66.0 at the time of this writing.

Bug

error: failed to run custom build command for `barretenberg-sys v0.1.2`

Caused by:
  process didn't exit successfully: `/Users/vicyyn/noir/target/debug/build/barretenberg-sys-a0abcf97fedc9907/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=BARRETENBERG_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  Error: 
     0: Failed to locate correct Barretenberg. Package barretenberg was not found in the pkg-config search path.
        Perhaps you should add the directory containing `barretenberg.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'barretenberg' found
        Package barretenberg was not found in the pkg-config search path.
        Perhaps you should add the directory containing `barretenberg.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'barretenberg' found
        Package barretenberg was not found in the pkg-config search path.
        Perhaps you should add the directory containing `barretenberg.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'barretenberg' found.

  Location:
     /Users/vicyyn/.cargo/registry/src/github.com-1ecc6299db9ec823/barretenberg-sys-0.1.2/build.rs:40

To Reproduce

  1. Install direnv
  2. clone noir repo
  3. run "direnv allow"
  4. "Now, wait awhile for all the native dependencies to be built. This will take some time and direnv will warn you that it is taking a long time, but we just need to let it run." This happens instantly. Output is empty in the terminal.
  5. cargo build

Installation Method

Compiled from source

Nargo Version

nargo 0.5.1 (git version hash: 7f6dede414c46790545b1994713d1976c5623711, is dirty: false)

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

phated commented 1 year ago

@vicyyn it seems that you missed the install nix portion of https://noir-lang.org/getting_started/nargo_installation/#setting-up-your-environment - having direnv without nix is not enough.

vicyyn commented 1 year ago

I have nix installed

nix (Nix) 2.16.0

and direnv

vicyyn@192 noir % direnv --version
2.32.3
phated commented 1 year ago

and what's the output of direnv reload?

vicyyn commented 1 year ago

similar to 4. - The output is nothing

vicyyn@192 noir % direnv reload
vicyyn@192 noir % direnv allow
phated commented 1 year ago

If there are no outputs to direnv, that means nix isn't loaded. Perhaps the nix daemon is not available in the shell you are working within.

vicyyn commented 1 year ago
vicyyn@192 noir % nix-daemon
error: cannot bind to socket '/nix/var/nix/daemon-socket/socket': Address already in use

I reinstalled nix, Received this

---- oh no! --------------------------------------------------------------------
I back up shell profile/rc scripts before I add Nix to them.
I need to back up /etc/bashrc to /etc/bashrc.backup-before-nix,
but the latter already exists.

Here's how to clean up the old backup file:

1. Back up (copy) /etc/bashrc and /etc/bashrc.backup-before-nix
   to another location, just in case.

2. Ensure /etc/bashrc.backup-before-nix does not have anything
   Nix-related in it. If it does, something is probably quite
   wrong. Please open an issue or get in touch immediately.

3. Once you confirm /etc/bashrc is backed up and
   /etc/bashrc.backup-before-nix doesn't mention Nix, run:
   mv /etc/bashrc.backup-before-nix /etc/bashrc

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

ran

   mv /etc/bashrc.backup-before-nix /etc/bashrc

and now cargo build shows a different error

error: failed to run custom build command for `barretenberg-sys v0.1.2`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/Users/vicyyn/noir/target/debug/build/barretenberg-sys-a0abcf97fedc9907/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=BARRETENBERG_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rustc-link-search=native=/nix/store/qch02bysql1lzs8yh7vrkx4qa3sxy93c-libbarretenberg-0.1.0/lib
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rustc-link-search=/opt/homebrew/opt/libomp/lib
  cargo:rustc-link-lib=omp

  --- stderr
  /opt/homebrew/Cellar/llvm/16.0.4/bin/../include/c++/v1/cstdlib:144:9: error: no member named 'at_quick_exit' in the global namespace
  /opt/homebrew/Cellar/llvm/16.0.4/bin/../include/c++/v1/cstdlib:145:9: error: no member named 'quick_exit' in the global namespace
  Error: 
     0: Clang encountered an error during rust-bindgen: /opt/homebrew/Cellar/llvm/16.0.4/bin/../include/c++/v1/cstdlib:144:9: error: no member named 'at_quick_exit' in the global namespace
        /opt/homebrew/Cellar/llvm/16.0.4/bin/../include/c++/v1/cstdlib:145:9: error: no member named 'quick_exit' in the global namespace.

  Location:
     /Users/vicyyn/.cargo/registry/src/github.com-1ecc6299db9ec823/barretenberg-sys-0.1.2/build.rs:63

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                  ⋮ 10 frames hidden ⋮                              
    11: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual::hbc5ede1d06988444
        at <unknown source file>:<unknown line>
    12: build_script_build::main::h8252bf47dc98531a
        at <unknown source file>:<unknown line>
    13: core::ops::function::FnOnce::call_once::hce83ab9fc4183dda
        at <unknown source file>:<unknown line>
    14: std::sys_common::backtrace::__rust_begin_short_backtrace::h5c9fe8891590373d
        at <unknown source file>:<unknown line>
    15: std::rt::lang_start::{{closure}}::h41cad984de1b2960
        at <unknown source file>:<unknown line>
    16: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hf2f6b444963da11f
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287
    17: std::panicking::try::do_call::h9152231fddd58858
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
    18: std::panicking::try::hcc27eab3b8ee3cb1
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
    19: std::panic::catch_unwind::hca546a4311ab9871
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
    20: std::rt::lang_start_internal::{{closure}}::h4e65aa71fe685c85
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
    21: std::panicking::try::do_call::h61aea55fbdf97fc2
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
    22: std::panicking::try::hcfc3b62fb8f6215e
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
    23: std::panic::catch_unwind::h61a201e98b56a743
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
    24: std::rt::lang_start_internal::h91996717d3eb1d2a
        at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
    25: std::rt::lang_start::he0886fbca1364719
        at <unknown source file>:<unknown line>
    26: _main<unknown>
        at <unknown source file>:<unknown line>
warning: build failed, waiting for other jobs to finish...

This might not be related but I'm on a mac m1 MacOs 13.2.1

phated commented 1 year ago

/opt/homebrew/Cellar/llvm/16.0.4/bin/ indicates that an llvm from homebrew is being used, which is incorrect. The nix path needs to be prepended to the rest of your path so all of the nix tools are used (llvm, etc). I'm not sure where you have that problem on your system.

vicyyn commented 1 year ago

I'm trying on my linux machine right now. dotenv seems to work. nix is installed.

direnv: loading ~/noir/.envrc
direnv: using flake
direnv: export +AR +AR_FOR_BUILD +AS +AS_FOR_BUILD +BARRETENBERG_BIN_DIR +CC +CC_FOR_BUILD +CONFIG_SHELL +CXX +CXX_FOR_BUILD +HOST_PATH +IN_NIX_SHELL +LD +LD_FOR_BUILD +LIBCLANG_PATH +NIX_BINTOOLS +NIX_BINTOOLS_FOR_BUILD +NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_BUILD_TOP +NIX_CC +NIX_CC_FOR_BUILD +NIX_CC_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_CFLAGS_COMPILE_FOR_BUILD +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_INDENT_MAKE +NIX_LDFLAGS +NIX_LDFLAGS_FOR_BUILD +NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_STORE +NM +NM_FOR_BUILD +OBJCOPY +OBJCOPY_FOR_BUILD +OBJDUMP +OBJDUMP_FOR_BUILD +PKG_CONFIG +PKG_CONFIG_PATH +RANLIB +RANLIB_FOR_BUILD +READELF +READELF_FOR_BUILD +RUST_BACKTRACE +RUST_TEST_THREADS +SIZE +SIZE_FOR_BUILD +SOURCE_DATE_EPOCH +STARSHIP_SESSION_KEY +STARSHIP_SHELL +STRINGS +STRINGS_FOR_BUILD +STRIP +STRIP_FOR_BUILD +TEMP +TEMPDIR +TMP +TMPDIR +XDG_DATA_DIRS +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH
croot@soggy-cup:~/noir# cargo build
   Compiling barretenberg-sys v0.1.2
   Compiling noirc_driver v0.6.0 (/root/noir/crates/noirc_driver)
error: failed to run custom build command for `barretenberg-sys v0.1.2`

Caused by:
  process didn't exit successfully: `/root/noir/target/debug/build/barretenberg-sys-ec536e285e82b883/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=BARRETENBERG_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=SYSROOT
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rustc-link-search=native=/nix/store/057vnnsgc2dbb7cr0jly1i150h62w08x-libbarretenberg-0.1.0/lib
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=BARRETENBERG_STATIC
  cargo:rerun-if-env-changed=BARRETENBERG_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rustc-link-lib=omp

  --- stderr
  /nix/store/057vnnsgc2dbb7cr0jly1i150h62w08x-libbarretenberg-0.1.0/include/barretenberg/dsl/acir_proofs/c_bind.hpp:1:10: fatal error: 'cstdint' file not found
  Error: 
     0: Clang encountered an error during rust-bindgen: /nix/store/057vnnsgc2dbb7cr0jly1i150h62w08x-libbarretenberg-0.1.0/include/barretenberg/dsl/acir_proofs/c_bind.hpp:1:10: fatal error: 'cstdint' file not found.

  Location:
     /root/.cargo/registry/src/github.com-1ecc6299db9ec823/barretenberg-sys-0.1.2/build.rs:63

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                  ⋮ 5 frames hidden ⋮                               
     6: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual::h04505cdb8838ab27
        at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/result.rs:2108
     7: build_script_build::main::hf687d4f0e5bf346e
        at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/barretenberg-sys-0.1.2/build.rs:63
     8: core::ops::function::FnOnce::call_once::h17063cdf04ca7523
        at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251
                                  ⋮ 16 frames hidden ⋮                              
warning: build failed, waiting for other jobs to finish...

I'm having a different error when running cargo build

phated commented 1 year ago

Yeah, the nix and direnv are working in that trace (it printed the env vars that were set), but barretenberg is messed up. I'm not sure what's wrong with it.

You can try building with nix build -L . to see if the problem is a difference with your impure environment since that command will build in a pure shell.

This also assumes you haven't tried to update barretenberg, which I believe is broken against noir right now.

vicyyn commented 1 year ago

nix build -L . and nix flake check -L work fine. But this is not optimal for development environment as my rust-analyzer is not working due to barretenberg. Is there another way around this?

phated commented 1 year ago

nix build -L . and nix flake check -L work fine.

It sounds like your environment is messed up still. I'm not sure what misconfigurations your system would have to cause this but it seems like you might be using the wrong clang/llvm still

vicyyn commented 1 year ago

Was able to solve the clang issue.

vicyyn@192 ~ % clang --version
Homebrew clang version 16.0.4
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
vicyyn@192 ~ % rm -rf /opt/homebrew/opt/llvm/bin
vicyyn@192 ~ % clang
clang: error: no input files
vicyyn@192 ~ % clang --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

But I have this error in build now.

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/krb5/sbin:/nix/var/nix/profiles/default/bin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vicyyn/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/vicyyn/.nargo/bin:/Users/vicyyn/.nargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/ct/80wg7k7d20x866nwzlkm6bmc0000gn/T/nix-shell.ovoICb/rustcJry41j/symbols.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.13e1x546eevrz0o5.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.13mbchrnk8uj3zj7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.15pitoh3znfvz659.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.18bbafplym9v1z30.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1fhyzp6eor5y1org.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1hcofczuxg04aigq.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1m594uirfm5svfsk.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1nzkddvrsuyi02t.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1tefj0m90fi7lym7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1u54c2myk95b2l8l.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1up6i3hsf80wkpw8.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1vaigsuetlxpy3bt.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1vknu8csbsq3cr1y.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1w7nc0h8thgptqnr.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.226y6xpifiebrwlq.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.22q83zx25br5wuxp.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.254eyig23zzg45e5.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.27cj9sgr5bmfq1gp.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.289yz7ziv90tmers.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2bivuvq3s4z1yf8w.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2eom9nawo70f44kv.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2gn964jfdkmybdrr.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2i3rq2j6h057juzp.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2ihqpx0lgweowlwv.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2pky8insetqa6w4j.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2q5bq20hnv2me3sy.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2r2592a2t34pajy3.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2ruxiymsljix8qv7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2s19ij60qyk9o4h2.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2s1cxeei55w04jva.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2u8u4stkr4gi0npk.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2v0x8gyq5lbq5bur.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.2w5vetzlzhwdju5y.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.34fduhhpldk7042w.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.358obkbfymcr1h41.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.36g83snmrfgknv21.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.38grw8ro8wfpgo6q.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.38i4nxylidqvrhf2.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3at2rebregiv6top.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3ayoqu1lronc1v3p.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3bua338k3kfyqtpc.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3fgw7ig3klx5nqpv.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3kpreqq91on2t87y.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3kuwgbw9pkig78oj.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3kyym30ea9xatu8b.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3llxksnvek92awt8.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3mo2oqf166qtgtjr.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3omwjqsshgcq3lxa.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3qoihh0ycgcv1wr7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3rc4g7vfhbo8wl42.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3ro4b368ljg71570.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3s83sbdxf5qdn409.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3t2r4zxaqz6a4xq6.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3uqergo4oh44d1mw.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.3yqxvhxjzuky4at5.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.40td8f922atqe0jg.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4192m2xbhzp50nxd.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.45a6ztj8yqiwazus.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.465zqn8x9p4siael.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.46fmka93ez2aosmr.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.499ppwb6bpk3hw4z.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4ahw0tnscaid0bzg.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4b7efmh5k9j9hr1i.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4cl5dljkpmux7shl.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4dx0umzkdjbpzafd.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4f2j99cg4hiw0ufj.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4g3s33hg7ez6nig7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4i1y1j12zy964psw.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4jekdgtseghnvt3x.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4l67pa4aw2c0fa93.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4md9awgycgbcpff2.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4nvctwn6qiapdmuf.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4oyunivdtixjdbse.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4r250saq0nlqbfjm.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4uqzrdomvlifnsdh.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4x0qoid2hduvwevo.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.4yghhil04akj9w8f.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.53hbqk1m3o4i1gg7.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.544zvhpbl9h7ft85.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.549wy9vk4k37u3sa.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.54aebv3reu4059wx.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.54xibe1u77bmrif4.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.559q6nd1huf6x47t.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.56g3rwvbgima6qw9.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5c2h3mgouccfd0eh.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5cwi0t0udo0rg103.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5d3776wnxefszx9n.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5dztc1berzi2rt5j.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5e5els2enk56fnik.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5ei6cls0sqhvrog0.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.5g7fzl643xkzi7yq.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.aq4mmv9ahxebp34.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.bp90pwojhwe63e5.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.d1gl10j2xzw5r0s.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.etgvp8ak5d4kqsn.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.gxgq5kv78wt8h2c.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.h8sa5jjz9sloq0.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.hybpl8kprs3j53c.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.jcx2j9dq6n23aaz.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.m1gxwdtdmhs2ojr.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.nyxzhd7x82jgojj.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.t07lplri6el362o.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.wccjjyxs3frhvvt.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.x9w12v8zbqykxy.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.yqij1h747904meo.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.z8ek8dqi6hn752l.rcgu.o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83.1n9hxz9fpivt19n3.rcgu.o" "-L" "/Users/vicyyn/noir/target/debug/deps" "-L" "/nix/store/qch02bysql1lzs8yh7vrkx4qa3sxy93c-libbarretenberg-0.1.0/lib" "-L" "/opt/homebrew/opt/libomp/lib" "-L" "/Users/vicyyn/noir/target/debug/build/link-cplusplus-2e2b35394c7e41e1/out" "-L" "/Users/vicyyn/noir/target/debug/build/ring-43877f863170c145/out" "-L" "/Users/vicyyn/noir/target/debug/build/psm-f6ed3222c1c78326/out" "-L" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/vicyyn/noir/target/debug/deps/libdirs-13ed31b484ccee0f.rlib" "/Users/vicyyn/noir/target/debug/deps/libdirs_sys-b5f3d0444749a2ca.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libtest-79798f8bc2cbcea7.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgetopts-14448737315dae10.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunicode_width-8845bd393351f705.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_std-98d8745eac912bf0.rlib" "/Users/vicyyn/noir/target/debug/deps/libnargo-68e570ad81289df7.rlib" "/Users/vicyyn/noir/target/debug/deps/libtempdir-54c2583c1bbc9453.rlib" "/Users/vicyyn/noir/target/debug/deps/libremove_dir_all-425de2fb82a64163.rlib" "/Users/vicyyn/noir/target/debug/deps/librand-ab28d10c3adf0489.rlib" "/Users/vicyyn/noir/target/debug/deps/libcolor_eyre-2e5429260afa2828.rlib" "/Users/vicyyn/noir/target/debug/deps/libcolor_spantrace-9144b484e11c193d.rlib" "/Users/vicyyn/noir/target/debug/deps/libtracing_error-9982cba921e011c5.rlib" "/Users/vicyyn/noir/target/debug/deps/libtracing_subscriber-a4a1f4ca5bf6bca1.rlib" "/Users/vicyyn/noir/target/debug/deps/libthread_local-8a45f5e12e3f680b.rlib" "/Users/vicyyn/noir/target/debug/deps/libsharded_slab-64ee37593fd14193.rlib" "/Users/vicyyn/noir/target/debug/deps/liblazy_static-83101c3f38f90bda.rlib" "/Users/vicyyn/noir/target/debug/deps/libowo_colors-b78a744ea2243941.rlib" "/Users/vicyyn/noir/target/debug/deps/libeyre-e50ae16c6900789d.rlib" "/Users/vicyyn/noir/target/debug/deps/libindenter-4760dc693d4532f2.rlib" "/Users/vicyyn/noir/target/debug/deps/libbacktrace-bc50cae51efc2130.rlib" "/Users/vicyyn/noir/target/debug/deps/libobject-84c218e20a029b79.rlib" "/Users/vicyyn/noir/target/debug/deps/libaddr2line-cf2159ac64e41e10.rlib" "/Users/vicyyn/noir/target/debug/deps/libgimli-77a95a74cfc71ed6.rlib" "/Users/vicyyn/noir/target/debug/deps/librustc_demangle-a94ff50aacb86bab.rlib" "/Users/vicyyn/noir/target/debug/deps/libnoirc_driver-b83e39b8b268f618.rlib" "/Users/vicyyn/noir/target/debug/deps/libnoirc_evaluator-905f749d1ac96449.rlib" "/Users/vicyyn/noir/target/debug/deps/libconst_format-8d0b9f2f2d6b5aa6.rlib" "/Users/vicyyn/noir/target/debug/deps/libclap-59dd6bb9129b65fc.rlib" "/Users/vicyyn/noir/target/debug/deps/libstrsim-1d92c1b9154bd37d.rlib" "/Users/vicyyn/noir/target/debug/deps/libis_terminal-54c624d6c7aecb9d.rlib" "/Users/vicyyn/noir/target/debug/deps/librustix-9502246de831575b.rlib" "/Users/vicyyn/noir/target/debug/deps/liberrno-a87959ba3074a858.rlib" "/Users/vicyyn/noir/target/debug/deps/libio_lifetimes-a2d465486646f3ae.rlib" "/Users/vicyyn/noir/target/debug/deps/libclap_lex-db2e8ed2d8380a74.rlib" "/Users/vicyyn/noir/target/debug/deps/libos_str_bytes-e38c5a50f45161e7.rlib" "/Users/vicyyn/noir/target/debug/deps/libbitflags-db251be28b645073.rlib" "/Users/vicyyn/noir/target/debug/deps/libacvm_backend_barretenberg-fbb046c308fc66d6.rlib" "/Users/vicyyn/noir/target/debug/deps/libbincode-6ee3b578a7c80172.rlib" "/Users/vicyyn/noir/target/debug/deps/libbarretenberg_sys-16efa99389168281.rlib" "/Users/vicyyn/noir/target/debug/deps/liblink_cplusplus-cc7e54d6f9264f78.rlib" "/Users/vicyyn/noir/target/debug/deps/libreqwest-dd5da4df84209269.rlib" "/Users/vicyyn/noir/target/debug/deps/librustls_pemfile-78327310da4dceae.rlib" "/Users/vicyyn/noir/target/debug/deps/libhyper_rustls-a1a2e5c3146d8f83.rlib" "/Users/vicyyn/noir/target/debug/deps/libserde_urlencoded-04e7008bce45e2ec.rlib" "/Users/vicyyn/noir/target/debug/deps/libwebpki_roots-ead211ee56038775.rlib" "/Users/vicyyn/noir/target/debug/deps/libbase64-a3eb3cca48085744.rlib" "/Users/vicyyn/noir/target/debug/deps/libipnet-87e6be073ecf469d.rlib" "/Users/vicyyn/noir/target/debug/deps/libtokio_rustls-d5607395e18c6436.rlib" "/Users/vicyyn/noir/target/debug/deps/libmime-4660a196f0c1166e.rlib" "/Users/vicyyn/noir/target/debug/deps/libencoding_rs-d5c4b6939edb2f1d.rlib" "/Users/vicyyn/noir/target/debug/deps/librustls-e86630239cb55b3f.rlib" "/Users/vicyyn/noir/target/debug/deps/libsct-3fad45169da3a40b.rlib" "/Users/vicyyn/noir/target/debug/deps/libwebpki-f22d83bea21e9354.rlib" "/Users/vicyyn/noir/target/debug/deps/libring-68fa17232ef498b2.rlib" "/Users/vicyyn/noir/target/debug/deps/libuntrusted-51538acef47dc584.rlib" "/Users/vicyyn/noir/target/debug/deps/libhyper-0ad7bd96b68491d5.rlib" "/Users/vicyyn/noir/target/debug/deps/libwant-f6f92b54206717f7.rlib" "/Users/vicyyn/noir/target/debug/deps/libtry_lock-bb4d5568da5b854e.rlib" "/Users/vicyyn/noir/target/debug/deps/libhttparse-521db4e85a805b39.rlib" "/Users/vicyyn/noir/target/debug/deps/libh2-186d3a7d1f3e50b8.rlib" "/Users/vicyyn/noir/target/debug/deps/libslab-5c3986f0e286af8f.rlib" "/Users/vicyyn/noir/target/debug/deps/libtokio_util-44e9de91fea0ec99.rlib" "/Users/vicyyn/noir/target/debug/deps/libfutures_sink-57d92d205b1b471b.rlib" "/Users/vicyyn/noir/target/debug/deps/libtower_service-9e8dbc737702f60c.rlib" "/Users/vicyyn/noir/target/debug/deps/libtracing-60bb291403f63181.rlib" "/Users/vicyyn/noir/target/debug/deps/libtracing_core-8ad98bfebdc24aa5.rlib" "/Users/vicyyn/noir/target/debug/deps/libfutures_channel-a74ef35aa95fbc91.rlib" "/Users/vicyyn/noir/target/debug/deps/libfutures_util-9589bf14ff7f95c1.rlib" "/Users/vicyyn/noir/target/debug/deps/libfutures_task-16c69c10debbdbe2.rlib" "/Users/vicyyn/noir/target/debug/deps/libpin_utils-6ee83bb450b98aad.rlib" "/Users/vicyyn/noir/target/debug/deps/libtokio-9c7d364263d7458f.rlib" "/Users/vicyyn/noir/target/debug/deps/libsocket2-ece39f5bcc320639.rlib" "/Users/vicyyn/noir/target/debug/deps/libmemchr-bb72f8062bbce14f.rlib" "/Users/vicyyn/noir/target/debug/deps/libmio-f9118f426c136486.rlib" "/Users/vicyyn/noir/target/debug/deps/libhttp_body-31f8e8b134c138a9.rlib" "/Users/vicyyn/noir/target/debug/deps/libpin_project_lite-35edb34ea5f9acfb.rlib" "/Users/vicyyn/noir/target/debug/deps/liblog-5fd769579e9030d9.rlib" "/Users/vicyyn/noir/target/debug/deps/libfutures_core-d209fbbe893f7b6f.rlib" "/Users/vicyyn/noir/target/debug/deps/liburl-fe8fb7c0668ced7e.rlib" "/Users/vicyyn/noir/target/debug/deps/libidna-a1668ee47246cc2c.rlib" "/Users/vicyyn/noir/target/debug/deps/libunicode_normalization-6e2bb38dd01036b5.rlib" "/Users/vicyyn/noir/target/debug/deps/libtinyvec-0b89085d1f2e7018.rlib" "/Users/vicyyn/noir/target/debug/deps/libtinyvec_macros-cf559c84d18675a3.rlib" "/Users/vicyyn/noir/target/debug/deps/libunicode_bidi-33a67d8ff08a51ec.rlib" "/Users/vicyyn/noir/target/debug/deps/libform_urlencoded-b2081ac697ba5ba6.rlib" "/Users/vicyyn/noir/target/debug/deps/libpercent_encoding-67c4cf6a9248b057.rlib" "/Users/vicyyn/noir/target/debug/deps/libhttp-38033ce1f5216c9e.rlib" "/Users/vicyyn/noir/target/debug/deps/libbytes-09b9056a3c22bd3c.rlib" "/Users/vicyyn/noir/target/debug/deps/libfnv-cab126d19eea586c.rlib" "/Users/vicyyn/noir/target/debug/deps/libbytesize-37fbf779de5da013.rlib" "/Users/vicyyn/noir/target/debug/deps/libserde_big_array-75867729ea652689.rlib" "/Users/vicyyn/noir/target/debug/deps/libnoirc_frontend-0fa0f772f2aa29d5.rlib" "/Users/vicyyn/noir/target/debug/deps/libsmall_ord_set-cc1c00be5627793d.rlib" "/Users/vicyyn/noir/target/debug/deps/libsmallvec-711a54746f54ef57.rlib" "/Users/vicyyn/noir/target/debug/deps/libarena-80fece4b0c593e75.rlib" "/Users/vicyyn/noir/target/debug/deps/libgenerational_arena-efe08763a1912258.rlib" "/Users/vicyyn/noir/target/debug/deps/libcfg_if-f46f32cdc459e2c3.rlib" "/Users/vicyyn/noir/target/debug/deps/libnoirc_abi-3b99759200298011.rlib" "/Users/vicyyn/noir/target/debug/deps/libserde_json-119d59846a54ebd2.rlib" "/Users/vicyyn/noir/target/debug/deps/libryu-8d29cd283ca472ba.rlib" "/Users/vicyyn/noir/target/debug/deps/libitoa-7cc336f72b39a277.rlib" "/Users/vicyyn/noir/target/debug/deps/libtoml-01b267004a3adf41.rlib" "/Users/vicyyn/noir/target/debug/deps/libtoml_edit-3d367670a1e71c91.rlib" "/Users/vicyyn/noir/target/debug/deps/libserde_spanned-231294f59c83c009.rlib" "/Users/vicyyn/noir/target/debug/deps/libwinnow-3fcd359bd93d4388.rlib" "/Users/vicyyn/noir/target/debug/deps/libtoml_datetime-d82ac0ad57db0596.rlib" "/Users/vicyyn/noir/target/debug/deps/libsmol_str-c7c2f5f0471ba9c6.rlib" "/Users/vicyyn/noir/target/debug/deps/librustc_hash-6f3e11a3edc0a100.rlib" "/Users/vicyyn/noir/target/debug/deps/libnoirc_errors-90aa5284ea84709d.rlib" "/Users/vicyyn/noir/target/debug/deps/libchumsky-c325c39d334d5efa.rlib" "/Users/vicyyn/noir/target/debug/deps/libstacker-450c21c22c32269c.rlib" "/Users/vicyyn/noir/target/debug/deps/libpsm-8c3239528650ffcd.rlib" "/Users/vicyyn/noir/target/debug/deps/libhashbrown-082dbf75f8daee08.rlib" "/Users/vicyyn/noir/target/debug/deps/libahash-aa6ea19b4b0914f3.rlib" "/Users/vicyyn/noir/target/debug/deps/libgetrandom-c28b16832eb02606.rlib" "/Users/vicyyn/noir/target/debug/deps/liblibc-5eb5e7f7dcd5e350.rlib" "/Users/vicyyn/noir/target/debug/deps/libfm-955991d992699659.rlib" "/Users/vicyyn/noir/target/debug/deps/librust_embed-3d605c0ca0d09521.rlib" "/Users/vicyyn/noir/target/debug/deps/librust_embed_utils-f4d27e355a98d8bf.rlib" "/Users/vicyyn/noir/target/debug/deps/libwalkdir-bcb2892e48cadc10.rlib" "/Users/vicyyn/noir/target/debug/deps/libsame_file-0cc4c693de161007.rlib" "/Users/vicyyn/noir/target/debug/deps/libcodespan-156ffc2e462a2c39.rlib" "/Users/vicyyn/noir/target/debug/deps/libcodespan_reporting-c0aeec788c84f4b3.rlib" "/Users/vicyyn/noir/target/debug/deps/libunicode_width-9def9a0988f39d35.rlib" "/Users/vicyyn/noir/target/debug/deps/libtermcolor-7cce68b8b8324d98.rlib" "/Users/vicyyn/noir/target/debug/deps/libiter_extended-e936498dcd77ef84.rlib" "/Users/vicyyn/noir/target/debug/deps/libacvm-a2b80a91e7b01a10.rlib" "/Users/vicyyn/noir/target/debug/deps/libacvm_stdlib-777b5584a40480c4.rlib" "/Users/vicyyn/noir/target/debug/deps/libk256-83d12a93b09b742a.rlib" "/Users/vicyyn/noir/target/debug/deps/libsha2-1ee7cb549dabe9d0.rlib" "/Users/vicyyn/noir/target/debug/deps/libopaque_debug-945d6946b9e26600.rlib" "/Users/vicyyn/noir/target/debug/deps/libblock_buffer-020d4e536a53c3c9.rlib" "/Users/vicyyn/noir/target/debug/deps/libecdsa-ce8a167aec77c07d.rlib" "/Users/vicyyn/noir/target/debug/deps/libhmac-4b7f43bc6fbfe701.rlib" "/Users/vicyyn/noir/target/debug/deps/libcrypto_mac-9194a4f6f21affdb.rlib" "/Users/vicyyn/noir/target/debug/deps/libsignature-1202fe8db3fbfd9d.rlib" "/Users/vicyyn/noir/target/debug/deps/libelliptic_curve-11bb4d531dc6583e.rlib" "/Users/vicyyn/noir/target/debug/deps/libdigest-1c991026a3d5a392.rlib" "/Users/vicyyn/noir/target/debug/deps/libpkcs8-6018d9bcd526b9ff.rlib" "/Users/vicyyn/noir/target/debug/deps/libder-8ca32fc5985d7544.rlib" "/Users/vicyyn/noir/target/debug/deps/libconst_oid-b7f30130c2c801a8.rlib" "/Users/vicyyn/noir/target/debug/deps/libgroup-1a6ba98349cf1b27.rlib" "/Users/vicyyn/noir/target/debug/deps/libff-396bceca8cbc6771.rlib" "/Users/vicyyn/noir/target/debug/deps/librand_core-4656263e188c8b68.rlib" "/Users/vicyyn/noir/target/debug/deps/libbitvec-43b2dcfc584f6393.rlib" "/Users/vicyyn/noir/target/debug/deps/libfunty-3eb864a6af64bd7d.rlib" "/Users/vicyyn/noir/target/debug/deps/libwyz-3ce3524a22c15aca.rlib" "/Users/vicyyn/noir/target/debug/deps/libradium-8443765881d60ed7.rlib" "/Users/vicyyn/noir/target/debug/deps/libsha3-d03375d4fd9892cf.rlib" "/Users/vicyyn/noir/target/debug/deps/libkeccak-3eea6210bf619c5b.rlib" "/Users/vicyyn/noir/target/debug/deps/libsha2-eb970aec3001ac4a.rlib" "/Users/vicyyn/noir/target/debug/deps/libblake2-4a60dec190da4874.rlib" "/Users/vicyyn/noir/target/debug/deps/libindexmap-952a922fb6578594.rlib" "/Users/vicyyn/noir/target/debug/deps/libhashbrown-2f145e4531681896.rlib" "/Users/vicyyn/noir/target/debug/deps/libacir-b846335b314575bd.rlib" "/Users/vicyyn/noir/target/debug/deps/librmp_serde-ee38e63b3e461402.rlib" "/Users/vicyyn/noir/target/debug/deps/librmp-46e32aff515026fb.rlib" "/Users/vicyyn/noir/target/debug/deps/libbyteorder-1bffa0e95bf8eb3e.rlib" "/Users/vicyyn/noir/target/debug/deps/libthiserror-e706a8be01617707.rlib" "/Users/vicyyn/noir/target/debug/deps/libflate2-f08e534e1e792bf4.rlib" "/Users/vicyyn/noir/target/debug/deps/libminiz_oxide-b1d67632d3c17518.rlib" "/Users/vicyyn/noir/target/debug/deps/libadler-c10191aa85fa97be.rlib" "/Users/vicyyn/noir/target/debug/deps/libcrc32fast-18018f7b01d4cf91.rlib" "/Users/vicyyn/noir/target/debug/deps/libacir_field-91e68877dc5cab22.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_bn254-54e02d2da378d06e.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_ec-414040db2422653c.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_poly-fcd864b46bed69c5.rlib" "/Users/vicyyn/noir/target/debug/deps/libhashbrown-734966340db407ad.rlib" "/Users/vicyyn/noir/target/debug/deps/libahash-ac2242f52b9b67db.rlib" "/Users/vicyyn/noir/target/debug/deps/libonce_cell-67964ae305e55169.rlib" "/Users/vicyyn/noir/target/debug/deps/libitertools-7609338d59008e14.rlib" "/Users/vicyyn/noir/target/debug/deps/libeither-ac52829f76dd7da2.rlib" "/Users/vicyyn/noir/target/debug/deps/libhex-c16ba2eba8c03bf0.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_ff-3a772e6abe1997f6.rlib" "/Users/vicyyn/noir/target/debug/deps/libzeroize-52dcd05807ae1695.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_serialize-bddc330eb24a64c8.rlib" "/Users/vicyyn/noir/target/debug/deps/libdigest-66cdf800c0d6f549.rlib" "/Users/vicyyn/noir/target/debug/deps/libsubtle-2e00dc381aa26415.rlib" "/Users/vicyyn/noir/target/debug/deps/libblock_buffer-292afb74da3e6097.rlib" "/Users/vicyyn/noir/target/debug/deps/libcrypto_common-c935f83ccdb1236f.rlib" "/Users/vicyyn/noir/target/debug/deps/libgeneric_array-22140fc1a5eafd45.rlib" "/Users/vicyyn/noir/target/debug/deps/libtypenum-1dab4f5cd4783bdc.rlib" "/Users/vicyyn/noir/target/debug/deps/libnum_bigint-eb9e99cb1b697101.rlib" "/Users/vicyyn/noir/target/debug/deps/libnum_integer-4663a960d84b7d13.rlib" "/Users/vicyyn/noir/target/debug/deps/libark_std-d3fa13b83f43f18e.rlib" "/Users/vicyyn/noir/target/debug/deps/libnum_traits-71ede2436e19bb43.rlib" "/Users/vicyyn/noir/target/debug/deps/librand-608952562cad8548.rlib" "/Users/vicyyn/noir/target/debug/deps/librand_chacha-3dc2654f3206682e.rlib" "/Users/vicyyn/noir/target/debug/deps/libppv_lite86-1ed5fbc7df8fbc61.rlib" "/Users/vicyyn/noir/target/debug/deps/librand_core-8b108c4ab86ed941.rlib" "/Users/vicyyn/noir/target/debug/deps/libcfg_if-edf77ddee1cc9d88.rlib" "/Users/vicyyn/noir/target/debug/deps/libserde-750631198eadbf98.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-bbb34fdc76849e75.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-e41c824887d8159b.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-b09606eb0dd7294b.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-76750a67d9c865d8.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-cb09c50a4870b1ca.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-a32904124371a559.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-980bd38e7c5463c1.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-0ae7d64836b89372.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-49c3adda225456f2.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-bea0fc5e745e2485.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-ffcdcd42dedf62f3.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-91dade5af3113381.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-61b8a3d45b3b24c0.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-cd1f01f097a5016f.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-0fc6bb0e7822d4e1.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-1e87ca26633c74ac.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-e5603c6d12f5e46b.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-94322c45aa090f07.rlib" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-90099c6af476d811.rlib" "-lomp" "-lc++" "-framework" "Security" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/vicyyn/noir/target/debug/deps/nargo_cli-a8f9ef2b43809a83" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: warning: directory not found for option '-L/opt/homebrew/opt/libomp/lib'
          ld: library not found for -lomp
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
phated commented 1 year ago

Apple clang version 14.0.0 (clang-1400.0.29.202)

This is still the incorrect version of clang. Both the clang and omp that must be used must come from nix. You need to look at your $PATH and figure out why nix stuff is not at the beginning (if direnv is indeed populating the env...the output should be the same from linux).

phated commented 1 year ago

Looking at the link flags you posted, the nix env is indeed not being populated in your environment. See your path? PATH="/Users/vicyyn/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/krb5/sbin:/nix/var/nix/profiles/default/bin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vicyyn/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/vicyyn/.nargo/bin:/Users/vicyyn/.nargo/bin"

Note that one of your previous messages said that nix was updating bashrc file, but if you are on an M1 Mac, the default shell is zsh, so you'd need to make sure everything was added to your zshrc files.

vicyyn commented 1 year ago

Works! Thanks :)

phated commented 1 year ago

What was the solution? Was nix being loaded in bash instead of zsh?