Skip to content
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

Fails to build not finding llama.cpp (even when forced / put into place?) #54

Closed
groovybits opened this issue Jan 31, 2024 · 1 comment · Fixed by #55
Closed

Fails to build not finding llama.cpp (even when forced / put into place?) #54

groovybits opened this issue Jan 31, 2024 · 1 comment · Fixed by #55

Comments

@groovybits
Copy link

I am not sure why it can't setup llama.cpp for me...

chris@earth llama-cpp-rs % cargo clean
     Removed 466 files, 185.7MiB total
chris@earth llama-cpp-rs % cargo build
   Compiling proc-macro2 v1.0.74
   Compiling unicode-ident v1.0.11
   Compiling libc v0.2.150
   Compiling glob v0.3.1
   Compiling prettyplease v0.2.12
   Compiling memchr v2.6.3
   Compiling regex-syntax v0.8.2
   Compiling minimal-lexical v0.2.1
   Compiling cfg-if v1.0.0
   Compiling bindgen v0.69.2
   Compiling either v1.9.0
   Compiling lazycell v1.3.0
   Compiling shlex v1.3.0
   Compiling bitflags v2.4.0
   Compiling log v0.4.20
   Compiling peeking_take_while v0.1.2
   Compiling rustc-hash v1.1.0
   Compiling lazy_static v1.4.0
   Compiling thiserror v1.0.56
   Compiling once_cell v1.18.0
   Compiling pin-project-lite v0.2.13
   Compiling libloading v0.7.4
   Compiling tracing-core v0.1.32
   Compiling clang-sys v1.6.1
   Compiling nom v7.1.3
   Compiling quote v1.0.35
   Compiling syn v2.0.46
   Compiling which v4.4.0
   Compiling cc v1.0.83
   Compiling regex-automata v0.4.3
   Compiling cexpr v0.6.0
   Compiling regex v1.10.2
   Compiling tracing-attributes v0.1.27
   Compiling thiserror-impl v1.0.56
   Compiling tracing v0.1.40
   Compiling llama-cpp-sys-2 v0.1.22 (/Users/chris/code/GAIB2.0/rsllm/llama-cpp-rs/llama-cpp-sys-2)
The following warnings were emitted during compilation:

warning: [email protected]: clang: error: no such file or directory: 'llama.cpp/ggml.c'
warning: [email protected]: clang: error: no input files

error: failed to run custom build command for `llama-cpp-sys-2 v0.1.22 (/Users/chris/code/GAIB2.0/rsllm/llama-cpp-rs/llama-cpp-sys-2)`

Caused by:
  process didn't exit successfully: `/Users/chris/code/GAIB2.0/rsllm/llama-cpp-rs/target/debug/build/llama-cpp-sys-2-e3d44ca9734b4442/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=llama.cpp
  compiling ggml
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("0")
  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 = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  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")
  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
  running: env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-std=c17" "-Wall" "-Wextra" "-DGGML_USE_K_QUANTS" "-o" "/Users/chris/code/GAIB2.0/rsllm/llama-cpp-rs/target/debug/build/llama-cpp-sys-2-6cab0eaaf45c8367/out/llama.cpp/ggml.o" "-c" "llama.cpp/ggml.c"
  cargo:warning=clang: error: no such file or directory: 'llama.cpp/ggml.c'

  cargo:warning=clang: error: no input files

  exit status: 1

  --- stderr


  error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-std=c17" "-Wall" "-Wextra" "-DGGML_USE_K_QUANTS" "-o" "/Users/chris/code/GAIB2.0/rsllm/llama-cpp-rs/target/debug/build/llama-cpp-sys-2-6cab0eaaf45c8367/out/llama.cpp/ggml.o" "-c" "llama.cpp/ggml.c" with args "cc" did not execute successfully (status code exit status: 1).

It always makes an empty llama.cpp directory...

find . -iname llama.cpp
./target/debug/build/llama-cpp-sys-2-6cab0eaaf45c8367/out/llama.cpp
@MarcusDunn
Copy link
Contributor

MarcusDunn commented Jan 31, 2024

I think you're missing the submodule. Try

git submodule update --init --recursive

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

Successfully merging a pull request may close this issue.

2 participants