Open prabirshrestha opened 7 months ago
@prabirshrestha when the build fails, does it out a specific error message
Build works. But running the server fails with the error I mentioned. That is the only error I see even with RUST_BACKTRACE=1
@prabirshrestha this "Segmentation fault: 11" ?
yes. Seems like using the official release version in Mac also seems to fail now. Probably some changes in master that is causing the issue.
Now I'm getting this error.
Finished dev [unoptimized + debuginfo] target(s) in 8.58s
Running `target/debug/edgen serve`
Assertion failed: (ne % ggml_blck_size(type) == 0), function ggml_row_size, file ggml.c, line 2126.
Abort trap: 6
yes. Seems like using the official release version in Mac also seems to fail now. Probably some changes in master that is causing the issue.
Most likely, I'll inspect the CI build, might be a system deps or something
Would you like to share your environment, OS version, Rust and Nodejs tool chain version and all
I'll build this on my Mac and see where we stand
@francis2tm see this
@prabirshrestha I tried building it on a Mac, I think there might be some missing system deps:
I make a fork and added some README. https://github.com/opeolluwa/edgen/tree/main/edgen Follow the instructions, let's see where we go from there
Looking for "nm" or an equivalent tool
NM_PATH not set, looking for ["nm", "llvm-nm"] in PATH
Valid tool found:
llvm-nm, compatible with GNU nm
Apple LLVM version 14.0.3 (clang-1403.0.22.14.1)
Optimized build.
Default target: arm64-apple-darwin22.6.0
Host CPU: apple-m1
cargo:rerun-if-env-changed=OBJCOPY_PATH
Looking for "objcopy" or an equivalent tool..
OBJCOPY_PATH not set, looking for ["llvm-objcopy"] in PATH
--- stderr
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_ASM_COMPILER
CMAKE_ASM_FLAGS
make: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
/Users/USER/.cargo/git/checkouts/whisper_cpp-rs-bf1f9509542b2c2d/fa76538/crates/whisper_cpp_sys/thirdparty/whisper.cpp/whisper.cpp:1026:75: warning: unused parameter 'params' [-Wunused-parameter]
static ggml_backend_t whisper_backend_init(const whisper_context_params & params) {
^
/Users/USER/.cargo/git/checkouts/whisper_cpp-rs-bf1f9509542b2c2d/fa76538/crates/whisper_cpp_sys/thirdparty/whisper.cpp/whisper.cpp:1620:27: warning: unused parameter 'mel_offset' [-Wunused-parameter]
const int mel_offset) {
^
/Users/USER/.cargo/git/checkouts/whisper_cpp-rs-bf1f9509542b2c2d/fa76538/crates/whisper_cpp_sys/thirdparty/whisper.cpp/whisper.cpp:202:29: warning: unused function 'ggml_mul_mat_pad' [-Wunused-function]
static struct ggml_tensor * ggml_mul_mat_pad(struct ggml_context * ctx, struct ggml_tensor * x, struct ggml_tensor * y, int pad = 32) {
^
3 warnings generated.
thread 'main' panicked at /Users/USER/.cargo/git/checkouts/whisper_cpp-rs-bf1f9509542b2c2d/fa76538/crates/whisper_cpp_sys/build.rs:295:9:
No suitable tool equivalent to "objcopy" has been found in PATH, if one is already installed, either add its directory to PATH or set OBJCOPY_PATH to its full path. For your Operating System we recommend:
"llvm-objcopy" from LLVM 17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error failed to build app: failed to build app
You can also checkout https://docs.edgen.co
That's after the instructions above, correct?
yes that is after the instructions. Uninstall all rust toolchains too. Also probably wroth adding this line to the doc too in case you have multiple toolchains.
rustup override set beta-2023-11-21
One thing I did was add this to my profile after brew install llvm
to get over that error.
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
If I remove it I will get the same error as you do.
Lemme get this, the application now builds, that's after you've installed llvm and removed the existing rust tool chain
The application builds once I run the following commands. Rust toolchains didn't have much impact as I was able to build and run for other toolchains too. Just to be sure I removed all the rust toolchains and only had beta-2023-11-21
.
brew install llvm
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
I'm also able to run the edgen app and can see it in the taskbar and the window open. But as soon as I make the http://localhost:33322/v1/chat/completions
request it crashes.
Ok good! 👍 We're making some progress. Let's pickup again tomorrow, It's midnight my time
What is a correct way to build edgen locally in Mac with metal?
This seems to always crash with segfault with or without llama_meta feature. It used to work before but has been failing recently.
I'm using default config and have reset it too.