whisper.cpp
whisper.cpp copied to clipboard
compilation error ggml.c on mac
When compiling the R wrapper audio.whisper and looking at the continuous integration messages, I noticed on Mac OS, I see the following error when compiling ggml.c
.
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -std=c++2a -I./dr_libs -I./whisper.cpp -I'/Users/runner/work/_temp/Library/Rcpp/include' -I/usr/local/include -std=c11 -O3 -D_POSIX_C_SOURCE=199309L -fPIC -Wall -g -O2 -c whisper.cpp/ggml.c -o whisper.cpp/ggml.o
whisper.cpp/ggml.c:7513:13: error: implicitly declaring library function 'snprintf' with type 'int (char *, unsigned long, const char *, ...)' [-Werror,-Wimplicit-function-declaration]
snprintf(color, sizeof(color), "yellow");
^
whisper.cpp/ggml.c:7513:13: note: include the header <stdio.h> or explicitly provide a declaration for 'snprintf'
1 error generated.
Can #include <stdio.h>
be added?