ggerganov/whisper.cpp

Problem while building Flutter/Dart binding

richardshank opened this issue · 0 comments

Hey all, I might just be very bad at C/C++ but I'll post this issue anyway.

Recently, I've been trying to build a binding for Flutter for whisper.cpp using Dart FFI (Foreign Function Interface), but I have some issues.

Before, I created some simple plugins like that with my own C++ code and everything was fine, but here, something breaks.

I keep getting some declaration errors from Xcode when trying to build the app (flutter run) for iOS.

Parse Issue (Xcode): Expected ')'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:498:53

Parse Issue (Xcode): Expected ')'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:499:53

Parse Issue (Xcode): Expected ')'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1500:53

Semantic Issue (Xcode): Use of undeclared identifier 'nrc'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1501:10

Semantic Issue (Xcode): Use of undeclared identifier 'nrc'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1502:10

Semantic Issue (Xcode): Use of undeclared identifier 'bx'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1503:10

Semantic Issue (Xcode): Use of undeclared identifier 'by'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1504:10

Semantic Issue (Xcode): Use of undeclared identifier 'bs'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1505:10

Semantic Issue (Xcode): Use of undeclared identifier 'x'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1518:38

Semantic Issue (Xcode): Use of undeclared identifier 'y'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1519:38

Semantic Issue (Xcode): Use of undeclared identifier 'x'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1530:16

Semantic Issue (Xcode): Use of undeclared identifier 'y'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1530:21

Semantic Issue (Xcode): Use of undeclared identifier 's'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1540:5

Parse Issue (Xcode): Expected ')'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1543:53

Semantic Issue (Xcode): Use of undeclared identifier 'nrc'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1544:11

Semantic Issue (Xcode): Use of undeclared identifier 'nrc'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1545:11

Semantic Issue (Xcode): Use of undeclared identifier 'bx'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1546:11

Semantic Issue (Xcode): Use of undeclared identifier 'by'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1547:11

Semantic Issue (Xcode): Use of undeclared identifier 'bs'
/Users/adam/Documents/Programming/dart_whispercpp/src/ggml.c:1548:11

No matter what I do, there is always a problem with some file from the ggml library. I'm not sure what more to include in this issue to help you help me.

Any ideas?