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

[BUG] Cannot use mlx.metallib from xcode MacOS project (Swift, C++) #1286

Open
akuz opened this issue Jul 25, 2024 · 0 comments
Open

[BUG] Cannot use mlx.metallib from xcode MacOS project (Swift, C++) #1286

akuz opened this issue Jul 25, 2024 · 0 comments

Comments

@akuz
Copy link

akuz commented Jul 25, 2024

I am trying to use an Apple library, MLX, in my xcode project (MacOS app, using Swift and C++, and I want to use MLX from C++)...

I am building the MLX library from source as described here:

After building the MLX library, the following artifacts are produced:

  • libmlx.dylib
  • mlx.metallib

I then copy these into the xcode project for my MaxOS app, and configure the build phases as follows:

  • libmlx.dylib - embed into Frameworks directory, and "code sign on copy" - this works fine
  • mlx.metallib - according to the MLX requirements, this has to be located next to libmlx.dylib in the Frameworks directory, otherwise libmlx.dylib cannot find it - however, xcode doesn't let me deploy mlx.metallib into the Frameworks directory, because it doesn't sign it, and then signing the whole app fails (exactly like the original poster of this question)
    However, if I deploy mlx.metallib to the Resources directory, then the whole app can be signed, but libmlx.dylib cannot find mlx.metallib, because it's located in a different directory within the app bundle.

Please help! How to I make MLX search for mlx.metallib in /Resources rather than /Frameworks?

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

No branches or pull requests

1 participant