Skip to content

[help] Run gemma example using the command line on my mac, got some runtime errors. #1962

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

Open
tyfeng1997 opened this issue Mar 29, 2024 · 2 comments

Comments

@tyfeng1997
Copy link

When I run gemma example using the command line on my mac, I get the following error. It looks like this is a compilation error with some package.

runtime errors:

candle % cargo run --example gemma --release -- --prompt "fn count_primes(max_n: usize)"
   Compiling proc-macro2 v1.0.79
   Compiling libm v0.2.8
   Compiling crossbeam-utils v0.8.19
   Compiling paste v1.0.14
error: failed to run custom build command for `proc-macro2 v1.0.79`

Caused by:
  process didn't exit successfully: `/Users/bofeng/candle/target/release/build/proc-macro2-66f074ece885d32e/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `libm v0.2.8`

Caused by:
  process didn't exit successfully: `/Users/bofeng/candle/target/release/build/libm-ca6a288957e7e8d5/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `paste v1.0.14`

Caused by:
  process didn't exit successfully: `/Users/bofeng/candle/target/release/build/paste-0644594965e5eed6/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `crossbeam-utils v0.8.19`

Caused by:
  process didn't exit successfully: `/Users/bofeng/candle/target/release/build/crossbeam-utils-60a0837155640875/build-script-build` (signal: 9, SIGKILL: kill)
(base) bofeng@ip-192-168-48-48 candle % 
@LaurentMazare
Copy link
Collaborator

No real clue what is going on but I doubt this issue is related to candle. From the error messages I think the important bit is that the processes ended up receiving a sigkill from the os. Googling this, I came across this issue and others in the rust compiler repo so maybe you want to dig more into these threads.
(and if you ended up finding a workaround / explanation, certainly come back to this issue so as to make it easier for the next people that might run into it)

@tyfeng1997
Copy link
Author

I checked several similar issues, and I think it is caused by the incompatibility between the rust compiler version and the dependent libraries (on the x86_64-apple-darwin platform). Here is my rust version and other configuration.

(base) bofeng@ip-192-168-0-104 ~ % rustc -vV
rustc 1.77.0 (aedd173a2 2024-03-17)
binary: rustc
commit-hash: aedd173a2c086e558c2b66d3743b344f977621a7
commit-date: 2024-03-17
host: x86_64-apple-darwin
release: 1.77.0
LLVM version: 17.0.6

The amazing thing is that when I build the debug version, it compiles successfully.

cargo run --example gemma -- --prompt "fn count_primes(max_n: usize)"

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

2 participants