llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Proposal: Retire make; Update build instructions for Cmake

Open maxsu opened this issue 1 year ago • 2 comments

Now we have a shiny new cmake frontend, can we:

  • eliminate the makefile?
  • document the Cmake build instructions?

As far as I know, users might use the make file if they don't have cmake. There might also be some features in the makefile that still need to be transferred to cmakelist.txt.

But as far as I know, cmake will need to generate the makefile for each user's environment. So it may no longer make sense to track the makefile at all. Tracking the cmakelist.txt might be enough.

This of course puts the burden on the user to install cmake and know how to call it. That's a little more complicated that make. It would help to add the new steps to readme.md, and remove the old make-based build steps.

I can implement both, but ideas and suggestions are needed - what are the plans for supporting (or deprecating) the makefile / supporting make-based build steps? Lemme know we can get rid of em' all, and I can get to work! 🔥🔥🔥 Otherwise, lemme know the preferred approach!

maxsu avatar Mar 14 '23 13:03 maxsu

At the moment, all I have to do is clone the repo and type make. I'd love to see how you can beat that with cmake :)

lemmi avatar Mar 14 '23 17:03 lemmi

@lemmi I'm not saying cmake is easier to use. Cmake is definitely more annoying to use

But Cmake has snuck into the project thanks to PR #75. Whisper.cpp uses Cmake to support platforms like windows or android, and llamma.cpp could be moving in that direction.

Now we have both a MakeFile and Cmakelists.txt, and the second one has more features.

3 options:

  1. Use cmake - get rid of the makefile
  2. Use cmake - but auto-generate a makefile as a commit hook
  3. Use make - add windows/android builds to MakeFile; get rid of cmakelists.txt

Option 1 is easiest. Option 2 continues to support make users. Option 3 is best for make users, but could be a PITA to support.

maxsu avatar Mar 16 '23 17:03 maxsu