-
Notifications
You must be signed in to change notification settings - Fork 34
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
fix: add notes on requirements to run example #13
base: main
Are you sure you want to change the base?
Conversation
Maybe there is a better way to fix or document this, but for devs currently using a cargo installed by package manager i.e homebrew the example commands will fail. Noting for now mostly if anyone else runs into this too :)
- Ensure `echo $CC` returns `gcc` #prerequisites i.e apples gcc distributed with xcode and | ||
- Ensure `which gcc` returns `/usr/bin/gcc` (MacOSX users) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Damn. I had no idea $CC and gcc needed to be configured. Just thought xcrun would handle choosing the right stuff. Out of curiosity what happened when these were not configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm maybe a little odd :) running gcc-11 because I use some stuff with my neovim that needs it. I would imagine typically this might not be an issue. Afaik typically CC=gcc for standard macos install.
Here is the full trace
❯ $HOME/.cargo/bin/cargo +nightly run -r -F parallel,asm,gpu --example brainfuck -- prove ./examples/brainfuck/hello_world.bf --dst ./hello_world.proof
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Users/admin/Git_Downloads/Web3/Projects/ministark/gpu-poly/Cargo.toml
workspace: /Users/admin/Git_Downloads/Web3/Projects/ministark/Cargo.toml
warning: /Users/admin/Git_Downloads/Web3/Projects/ministark/gpu-poly/Cargo.toml: unused manifest key: target.cfg(target_arch = "aarch64").bench
Compiling serde v1.0.147
Compiling objc_exception v0.1.2
Compiling ark-ff v0.3.0 (https://github.com/arkworks-rs/algebra#a4362f92)
Compiling thiserror v1.0.37
Compiling textwrap v0.11.0
Compiling plotters-svg v0.3.3
Compiling clap_lex v0.2.4
Compiling heck v0.3.3
Compiling indexmap v1.9.1
Compiling ciborium-ll v0.2.0
The following warnings were emitted during compilation:
warning: extern/exception.m: In function 'RustObjCExceptionThrow':
warning: extern/exception.m:5:5: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
warning: 5 | @throw exception;
warning: | ^~~~~~
warning: extern/exception.m:4:32: warning: parameter 'exception' set but not used [-Wunused-but-set-parameter]
warning: 4 | void RustObjCExceptionThrow(id exception) {
warning: | ~~~^~~~~~~~~
error: failed to run custom build command for `objc_exception v0.1.2`
Caused by:
process didn't exit successfully: `/Users/admin/Git_Downloads/Web3/Projects/ministark/target/release/build/objc_exception-34f6154be5fcf3f7/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("aarch64-apple-darwin")
OPT_LEVEL = Some("3")
HOST = Some("aarch64-apple-darwin")
cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
CC_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
CC_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = Some("gcc-11")
cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
CFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
CFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh")
running: "gcc-11" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-Wall" "-Wextra" "-o" "/Users/admin/Git_Downloads/Web3/Projects/ministark/target/release/build/objc_exception-ab1b56d750c21f1f/out/extern/exception.o" "-c" "extern/exception.m"
cargo:warning=extern/exception.m: In function 'RustObjCExceptionThrow':
cargo:warning=extern/exception.m:5:5: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
cargo:warning= 5 | @throw exception;
cargo:warning= | ^~~~~~
cargo:warning=extern/exception.m:4:32: warning: parameter 'exception' set but not used [-Wunused-but-set-parameter]
cargo:warning= 4 | void RustObjCExceptionThrow(id exception) {
cargo:warning= | ~~~^~~~~~~~~
exit status: 1
--- stderr
error occurred: Command "gcc-11" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-Wall" "-Wextra" "-o" "/Users/admin/Git_Downloads/Web3/Projects/ministark/target/release/build/objc_exception-ab1b56d750c21f1f/out/extern/exception.o" "-c" "extern/exception.m" with args "gcc-11" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
zsh: exit 101 $HOME/.cargo/bin/cargo +nightly run -r -F parallel,asm,gpu --example brainfuc
To add, here is the trace using
|
@beauwilliams thanks for the trace. What Mac do you have? For now the In theory the gpu stuff should work on older macs but I just couldn't get it to work. I was originally developing miniSTARK on an older mac with a Radeon Pro GPU. Everything compiled but when I ran it it just didn't work as expected. I filed a bug with Apple at the time but never heard back. I was so fed up it's why I bought a M1 Mac and more or less everything has been working since then. |
Motivation
Solution