Closed shuhongwu closed 1 month ago
That comes from https://github.com/antirez/gguf-tools/. mlx certainly uses it and I suppose llama.cpp must too. You can only link it once because it has public symbols.
@awni any thoughts here? Cmlx (the wrapper around mlx core) looks like it re-exports it. I don't think we have any control over that on the swiftpm side. Do other people try this and run into problems?
Oh,that's make sense~ I will close this issue.
Hmm, we should build without GGUF support in MLX Swift / MLX C (MLX_BUILD_GGUF=OFF
). We don't support it in the API anyway so it doesn't make sense to include it right?
Ah, interesting! Filed an issue for that, yes we can simplify the build by removing that.
If the Xcode proj has both llama.cpp and mlx.swift. we will get duplicate symbol errors:
` duplicate symbol '_gguf_get_key' in: /Users/alex/Library/Developer/Xcode/DerivedData/xxxxx-eljaqnyrtudtxpgvajsemjrllabz/Build/Products/Debug-iphonesimulator/llama.o /Users/alex/Library/Developer/Xcode/DerivedData/xxxxx-eljaqnyrtudtxpgvajsemjrllabz/Build/Products/Debug-iphonesimulator/Cmlx.o ld: 1 duplicate symbols clang: error: linker command failed with exit code 1 (use -v to see invocation)
`