Opened 20 months ago

Last modified 7 weeks 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 20 months ago.
debug log

Download all attachments as: .zip

Change History (8)

by joe, 20 months ago

Attachment: pocketsphinxconfigdebug.txt​ added

debug log

comment:1 by joe, 20 months ago

Description: modified (diff)

comment:2 by Timo R., 20 months ago

Resolution: → invalid
Status: new → closed

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, 20 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 20 months ago by joe (previous) (diff)

comment:4 by joe, 20 months ago

Resolution: invalid
Status: closed → reopened

comment:5 by Gyan, 20 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, 19 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 19 months ago by joe (previous) (diff)

comment:7 by joe, 7 weeks ago

header was moved from /include/pocketspinx.h to /include/pocketsphinx/pocketspinx.h in version 5.
ffmpeg configure script is just expecting a very outdated version

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