Viewing a single comment thread. View all comments

simpleuserhere OP t1_jct4k2z wrote

I have updated readme with Windows build instructions,please check https://github.com/rupeshs/alpaca.cpp#windows

2

schorhr t1_jct58nc wrote

Thanks!

Both of the instructions (for Android which I'm attempting, but also the Windows instructions) result with the > C:/MinGW-32/bin/make.exe: invalid option -- ? error. I can't seem to figure out what make version I should use instead, or how to edit that.

1

simpleuserhere OP t1_jct9btk wrote

For Android build please use Linux ( tested with Ubuntu 20.04)

2

schorhr t1_jctb6tz wrote

Okay. I don't have the capacity right now (old laptop, disk too small to really use a second OS). I appreciate the help! I will once I get a new computer.

2

ninjasaid13 t1_jcu1odb wrote

I have a problem with

C:\Users\****\source\repos\alpaca.cpp\build>make chat
make: *** No rule to make target 'chat'.  Stop.

and

C:\Users\****\source\repos\alpaca.cpp>make chat
I llama.cpp build info: I UNAME_S:  CYGWIN_NT-10.0 I 
UNAME_P:  unknown I UNAME_M:  x86_64 I CFLAGS:   -I.              
-O3 -DNDEBUG -std=c11   -fPIC -mfma -mf16c -mavx -
mavx2 I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -
std=c++11 -fPIC I LDFLAGS: I CC:       cc (GCC) 
10.2.0 I CXX:      g++ (GCC) 10.2.0
cc  -I.              -O3 -DNDEBUG -std=c11   -fPIC -
mfma -mf16c -mavx -mavx2   -c ggml.c -o ggml.o g++ -
I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -c 
utils.cpp -o utils.o g++ -I. -I./examples -O3 -
DNDEBUG -std=c++11 -fPIC chat.cpp ggml.o utils.o -o 
chat chat.cpp: In function 'int main(int, char**)': 
chat.cpp:883:26: error: aggregate 'main(int, 
char**)::sigaction sigint_action' has incomplete type 
and cannot be defined 883 |         struct sigaction 
sigint_action; |                          
~~~~~~~~~~~~ chat.cpp:885:9: error: 'sigemptyset' was 
not declared in this scope 885 |         sigemptyset 
(&sigint_action.sa_mask); |         ~~~~~~~~~~ 
chat.cpp:887:47: error: invalid use of incomplete 
type 'struct main(int, char**)::sigaction' 887 |         
sigaction(SIGINT, &sigint_action, NULL); |                                               
^ chat.cpp:883:16: note: forward declaration of 
'struct main(int, char**)::sigaction' 883 |         
struct sigaction sigint_action; |                
~~~~~~~~ make: *** [Makefile:195: chat] Error 1

using windows.

1

simpleuserhere OP t1_jcu2ikl wrote

For Windows you need Visual C++ compiler, so install Visual Studio C++ 2019 build tools, follow the instruction here https://github.com/rupeshs/alpaca.cpp#windows

2

ninjasaid13 t1_jcu9nfv wrote

I believe I already have the build.

I still get this error

C:\Users\****\Downloads\alpaca\alpaca.cpp>make chat
I llama.cpp build info: I UNAME_S:  CYGWIN_NT-10.0 I UNAME_P:  
unknown I UNAME_M:  x86_64 I CFLAGS:   -I.              -O3 -
DNDEBUG -std=c11   -fPIC -mfma -mf16c -mavx -mavx2 I 
CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC I 
LDFLAGS: I CC:       cc (GCC) 10.2.0 I CXX:      g++ (GCC) 
10.2.0
g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC chat.cpp 
ggml.o utils.o -o chat chat.cpp: In function 'int main(int, 
char**)': chat.cpp:883:26: error: aggregate 'main(int, 
char**)::sigaction sigint_action' has incomplete type and 
cannot be defined 883 |         struct sigaction 
sigint_action; |                          ~~~~~~~~~~~~ 
chat.cpp:885:9: error: 'sigemptyset' was not declared in this 
scope 885 |         sigemptyset (&sigint_action.sa_mask); |         
~~~~~~~~~~ chat.cpp:887:47: error: invalid use of incomplete 
type 'struct main(int, char**)::sigaction' 887 |         
sigaction(SIGINT, &sigint_action, NULL); |                                               
^ chat.cpp:883:16: note: forward declaration of 'struct 
main(int, char**)::sigaction' 883 |         struct sigaction 
sigint_action; |                ~~~~~~~~ make: *** [Makefile:195: chat] Error 1
1

simpleuserhere OP t1_jcu9x05 wrote

Are you using cygwin?

1

ninjasaid13 t1_jcuajwh wrote

yes I have cygwin.

2

simpleuserhere OP t1_jcubta9 wrote

I haven't tried cygwin for Alpaca.cpp.

1

ninjasaid13 t1_jcubyue wrote

so it won't work? do I need to install MinGW?

1

simpleuserhere OP t1_jcuc25e wrote

Yes,

1

ninjasaid13 t1_jcufsqf wrote

I'm getting a new error

C:\Users\ninja\source\repos\alpaca.cpp>make chat
process_begin: CreateProcess(NULL, uname -s, ...) failed. 
process_begin: CreateProcess(NULL, uname -p, ...) failed. 
process_begin: CreateProcess(NULL, uname -m, ...) failed. 
'cc' is not recognized as an internal or external command, 
operable program or batch file. 'g++' is not recognized as an 
internal or external command, operable program or batch file. 
I llama.cpp build info: I UNAME_S: I UNAME_P: I UNAME_M: I 
CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -
mfma -mf16c -mavx -mavx2 I CXXFLAGS: -I. -I./examples -O3 -
DNDEBUG -std=c++11 -fPIC I LDFLAGS: I CC: I CXX:
g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC chat.cpp 
ggml.o utils.o -o chat process_begin: CreateProcess(NULL, g++ 
-I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC chat.cpp 
ggml.o utils.o -o chat, ...) failed. make (e=2): The system 
cannot find the file specified. Makefile:195: recipe for 
target 'chat' failed make: *** [chat] Error 2
1

Art10001 t1_jcwg7bv wrote

Try installing MSYS2.

1

ninjasaid13 t1_jcwwgt5 wrote

now what?

1

Art10001 t1_jcy2jck wrote

I was asleep, my apologies for not replying earlier.

Run pacman -Syu then pacman -Sy build-essential then cd to the build directory and follow the instructions

1