Git commit
28ffb6c
Operating System & Version
Ubuntu 24.04
GGML backends
Vulkan
Command-line arguments used
cmake --build build -j
Steps to reproduce
Create a cmake project with both llama.cpp and stable-diffusion.cpp (latest versions) and try to compile.
What you expected to happen
I have a project which includes both llama.cpp and stable-diffusion.cpp , but it fails to link because both libs declare a format function. Locally, I can fix it if I inline the format function.
What actually happened
[build] /usr/bin/ld: libs/stable-diffusion.cpp/libstable-diffusion.a(util.cpp.o): in function format[abi:cxx11](char const*, ...)': [build] ... snipped ..../libs/stable-diffusion.cpp/util.cpp:60: multiple definition of format[abi:cxx11](char const*, ...)'; libs/llama.cpp/src/libllama.a(llama-impl.cpp.o): ... snipped ..../libs/llama.cpp/src/llama-impl.cpp:82: first defined here
[build] collect2: error: ld returned 1 exit status
Logs / error messages / stack trace
No response
Additional context / environment details
No response