Skip to content

Bug: ld: symbol(s) not found for architecture arm64  #8211

Closed
@quarterturn

Description

@quarterturn

What happened?

symbol not found compile error for Mac metal build. If I wind back a week with "git reset --hard master@{"7 days ago"}" it builds and executes fine.

2023 M2 MBP

Name and Version

Current master branch

What operating system are you seeing the problem on?

Mac

Relevant log output

`
c++ -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread   -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Icommon -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_LLAMAFILE -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY  ggml/src/ggml.o ggml/src/ggml-blas.o ggml/src/sgemm.o ggml/src/ggml-metal.o ggml/src/ggml-metal-embed.o ggml/src/ggml-alloc.o ggml/src/ggml-backend.o ggml/src/ggml-quants.o pocs/vdot/q8dot.o -o llama-q8dot -framework Accelerate -framework Foundation -framework Metal -framework MetalKit 
ld: warning: ignoring file '/Users/derp/Documents/llama.cpp/ggml/src/ggml-metal-embed.o': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_ggml_metallib_end", referenced from:
      _ggml_metal_init in ggml-metal.o
  "_ggml_metallib_start", referenced from:
      _ggml_metal_init in ggml-metal.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [llama-export-lora] Error 1
Undefined symbols for architecture arm64:
  "_ggml_metallib_end", referenced from:
      _ggml_metal_init in ggml-metal.o
  "_ggml_metallib_start", referenced from:
      _ggml_metal_init in ggml-metal.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [llama-q8dot] Error 1
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Apple Metalhttps://en.wikipedia.org/wiki/Metal_(API)bugSomething isn't workinghigh severityUsed to report high severity bugs in llama.cpp (Malfunctioning hinder important workflow)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions