ml-explore/mlx-swift-examples

LLMEval: "Cycle inside LLMEval; building could produce unreliable results" build error

ddiddi opened this issue · 5 comments

Context: I'm trying to run the LLMEval iOS application on Apple M1 Pro 32 GB running macOS Version 14.4.1

I've considered the following solutions so far:

  1. Ensured I'm running the "Release" build
  2. Ensured "Signing and Capabilities" has updated dev certificate
  3. Ensured sample swift apps seems to be working as expected
  4. Ensured mlx llm tools and other cmd apps working as expected

Looking forward to advice on fixing this issue!

Attaching error test corresponding to the above message in Xcode.
error.txt
Screenshot 2024-05-05 at 11 34 50 PM

Does this build if you do Product -> Clean Build Folder first?

I see a few mentions of this error in random projects, e.g. https://forums.developer.apple.com/forums/thread/731825

Some of the suggestions talk about the ordering of the steps, especially the "Embed Frameworks" step. Can you try moving it above the Copy Bundle Resources?

image

The error is a bit inscrutable -- it seems to be saying that LLMEval.app depends on itself.

Appreciate the swift response!

  • "Clean Succeeded" after Product -> Clean Build Folder
  • On build now, it errors on another part related to filepath buffer size (attached pic)
  • After ~110 seconds, build fails with the error
    error: '/Users/ddiddi/Library/Developer/Xcode/DerivedData/mlx-swift-examples-fipmfiedzujjajahaxtfphpzkvuv/Build/Products/Release/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/LLMEval.app/Contents/Resources/swift-transformers_Hub.bundle/Contents/Resources/gpt2_tokenizer_config.json' is longer than filepath buffer size (1025). (in target 'LLMEval' from project 'mlx-swift-examples')

I have currently not tried moving "Embed Frameworks" step above the Copy Bundle Resources

Screenshot 2024-05-06 at 11 16 55 PM

Well, this error seems to say the same thing -- LLMEval.app is a resource of itself. It looks like it is recursively copying LLVEval into itself.

I am not sure how such a thing could happen, but you might try a fresh clone of the project (o git reset --hard). Somehow the xcodeproj seems to be corrupt. Maybe :-) I am not sure what could cause this.

Ended up recloning the repo and it worked as expected.

OK, closing this out then. thanks for following up!