noir: Failed to locate correct Barretenberg. Package barretenberg was not found in the pkg-config search path.
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
- Install direnv
- clone noir repo
- run “direnv allow”
- “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.
- 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
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
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