pocketsphinx-go icon indicating copy to clipboard operation
pocketsphinx-go copied to clipboard

could not determine kind of name for C.ps_search_iter_t from macOS High Sierra

Open kai5263499 opened this issue 7 years ago • 3 comments

I'm getting an error from the cgo bindings when I try to run make install

$ make
c-for-go -maxmem 0x1fffffff pocketsphinx.yml
  processing pocketsphinx.yml done.
$ make install
cd pocketsphinx && go install
# github.com/xlab/pocketsphinx-go/pocketsphinx
./cgo_helpers.go:1033:29: could not determine kind of name for C.ps_search_iter_t
make: *** [install] Error 2

kai5263499 avatar May 07 '18 15:05 kai5263499

Have you followed https://github.com/xlab/pocketsphinx-go/blob/master/README.md#installation ?

xlab avatar May 07 '18 15:05 xlab

Initially, I used the instructions using brew to install portaudio but I went back installed sphinxbase and pocketspinx from source. They both compiled and installed ok and now I'm getting a different error when I go to install the gortana

$ go get github.com/xlab/pocketsphinx-go/example/gortana
../../../portaudio-go/portaudio/portaudio.go:148: cannot use cstream (type *_Ctype_void) as type *unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:163: cannot use cstream (type *_Ctype_void) as type *unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:170: cannot convert unsafe.Pointer(stream) (type unsafe.Pointer) to type _Ctype_void
../../../portaudio-go/portaudio/portaudio.go:171: cannot use cstream (type _Ctype_void) as type unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:178: cannot convert unsafe.Pointer(stream) (type unsafe.Pointer) to type _Ctype_void
../../../portaudio-go/portaudio/portaudio.go:180: cannot use cstream (type _Ctype_void) as type unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:187: cannot convert unsafe.Pointer(stream) (type unsafe.Pointer) to type _Ctype_void
../../../portaudio-go/portaudio/portaudio.go:188: cannot use cstream (type _Ctype_void) as type unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:195: cannot convert unsafe.Pointer(stream) (type unsafe.Pointer) to type _Ctype_void
../../../portaudio-go/portaudio/portaudio.go:196: cannot use cstream (type _Ctype_void) as type unsafe.Pointer in argument to func literal
../../../portaudio-go/portaudio/portaudio.go:196: too many errors

kai5263499 avatar May 08 '18 18:05 kai5263499

Try using the master commit of pocketsphinx, do not re-generate for now. Seems that recent changes in generator produce an incompatible code. Will check later

xlab avatar May 09 '18 15:05 xlab