gemma.cpp
gemma.cpp copied to clipboard
Unable to "make" gemma binary executable on Windows
Followed the instructions given in README.md, I was able to get through all of the commands until the "make" command. It will just spit out the error "make: *** No rule to make target 'gemma'. Stop." in the build directory. Tried doing it in the main directory ( the one above build ) and it gives out a different error "g++ gemma.cc -o gemma process_begin: CreateProcess(NULL, g++ gemma.cc -o gemma, ...) failed. process_begin: CreateProcess(NULL, g++ gemma.cc -o gemma, ...) failed. make (e=2): The system cannot find the file specified. make: *** [
Any solution to this?
Hi @LargeLanguageModelExplorer, thanks for trying it out.
make should be invoked from inside the build/ directory (which you should already be in if you do cd build before running it). Also make sure you've already run (cd build && cmake ..) from the top level project directory (if you haven't cmake or it wasn't successful, the gemma target won't exist yet).
Also, while g++ will probably work, most of our testing so far has been with clang++ so that's what we tend to recommend for now.
If you're still having trouble could you post a screenshot of the invocations? BTW if you aren't already, you might try building in WSL first.
Hi @austinvhuang , that is exactly what I did, everything was smooth sailing until the make part where you're trying to make an executable of gemma ( not the cmake part ). The process of Cmaking was sucessful though, I used Visual Studio 2022 for that. Here's the information you wanted, I am running pure Windows 11 and I didn't save any screenshot as I just deleted the entire folder after trying several time.
I've run it successfully on Ubuntu. Could it run on windows ?
There's a few POSIX-specific APIs that currently prevent gemma.cpp from being built naively on Windows. I have #6 which addresses some of those issues so that it can be built using the optional Clang/LLVM component of Visual Studio.
- #6
Unfortunately it isn't possible to build with the regular MSVC front-end as it has a limitation where arrays can't be more than 0x7fffffff bytes.
This issue can probably be closed now that #6 has been merged.