Skip to content

'ggml-common.h' file not found when running as shared library and using metal #5977

@hazelnutcloud

Description

@hazelnutcloud

Please include information about your system, the steps to reproduce the bug, and the version of llama.cpp that you are using. If possible, please provide a minimal code example that reproduces the bug.

If the bug concerns the server, please try to reproduce it first using the server test scenario framework.

System: M2 Pro Sonoma v14.3.1
Building on master branch

Steps to reproduce:

  • Build llama as shared library
  • Copy ggml-metal.metal and ggml-common.h into same dir as bin
  • Run executable

Error message:

ggml_metal_init: error: Error Domain=MTLLibraryErrorDomain Code=3 "program_source:4:10: fatal error: 'ggml-common.h' file not found
#include "ggml-common.h"
         ^~~~~~~~~~~~~~~
" UserInfo={NSLocalizedDescription=program_source:4:10: fatal error: 'ggml-common.h' file not found
#include "ggml-common.h"
         ^~~~~~~~~~~~~~~
}
llama_new_context_with_model: failed to initialize Metal backend

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions