Opened 17 months ago

Last modified 16 months ago

#11512 reopened defect

pocketsphinx not found using pkg-config

Reported by: joe Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by joe)

getting this when running configure:
ERROR: pocketsphinx not found using pkg-config

Pocketsphinx is definitely installed:

pkg-config --modversion pocketsphinx

5.0.4

Debug log is attached.

Attachments (1)

pocketsphinxconfigdebug.txt (808.4 KB ) - added by joe 17 months ago.
debug log

Download all attachments as: .zip

Change History (7)

by joe, 17 months ago

Attachment: pocketsphinxconfigdebug.txt added

debug log

comment:1 by joe, 17 months ago

Description: modified (diff)

comment:2 by Timo R., 17 months ago

Resolution: invalid
Status: newclosed

Right in your log:
test.c:1:10: fatal error: 'pocketsphinx/pocketsphinx.h' file not found

And that despite successfully finding it via pkg-config. Your installation of it is just broken in some way.

in reply to:  2 comment:3 by joe, 17 months ago

Replying to Timo R.:

Right in your log:
test.c:1:10: fatal error: 'pocketsphinx/pocketsphinx.h' file not found

And that despite successfully finding it via pkg-config. Your installation of it is just broken in some way.

The log file is wrong. The file exists:
/opt/homebrew/Cellar/cmu-pocketsphinx/5.0.4/include/pocketsphinx.h

pkg-config has the correct path:

pkg-config --cflags pocketsphinx

-I/opt/homebrew/Cellar/cmu-pocketsphinx/5.0.4/include -I/opt/homebrew/Cellar/cmu-pocketsphinx/5.0.4/include/pocketsphinx

I reinstalled it anyway, and got the same result.

Last edited 17 months ago by joe (previous) (diff)

comment:4 by joe, 17 months ago

Resolution: invalid
Status: closedreopened

comment:5 by Gyan, 17 months ago

If the file exists at

/opt/homebrew/Cellar/cmu-pocketsphinx/5.0.4/include/pocketsphinx.h

then

#include <pocketsphinx/pocketsphinx.h>

will not find it.

It should be at

/opt/homebrew/Cellar/cmu-pocketsphinx/5.0.4/include/pocketsphinx/pocketsphinx.h

comment:6 by joe, 16 months ago

So the compile script should be using pkgconfig for what it's designed for ... locating dependent package files.
The header file is wherever the pocketsphinx install script puts it.

Even the CMU example program doesn't look for <pocketsphinx/pocketsphinx.h>
https://cmusphinx.github.io/doc/pocketsphinx/simple_8c-example.html

According to tutorial (https://cmusphinx.github.io/wiki/tutorialpocketsphinx/)

"it will use pkg-config to allow you to find library and header directories and names, but this isn’t really necessary, since there is just one header file (<pocketsphinx.h>) and one library (-lpocketsphinx)."

Last edited 16 months ago by joe (previous) (diff)
Note: See TracTickets for help on using tickets.