1

I'm writing a C extension for my Ruby Gem. But the behaviour of #find_header is so weird.

# extconf.rb

require 'mkmf'

find_header 'pocketsphinx.h', '/usr/local/include/pocketsphinx'
find_header 'cmd_ln.h', '/usr/local/include/sphinxbase'
find_library 'pocketsphinx', 'ps_args'
find_library 'sphinxbase', 'cmd_ln_init'

create_makefile 'pocket_sphinx/pocket_sphinx'

Here is what I got by running $ rake compile provided by rake-compiler:

$ rake compile
cd tmp/x86_64-darwin13.0/pocket_sphinx/2.1.2
/Users/siegfried/.rvm/rubies/ruby-2.1.2/bin/ruby -I. ../../../../ext/pocket_sphinx/extconf.rb
checking for pocketsphinx.h in /usr/local/include/pocketsphinx... no
checking for cmd_ln.h in /usr/local/include/sphinxbase... yes
checking for ps_args() in -lpocketsphinx... yes
checking for cmd_ln_init() in -lsphinxbase... yes
creating Makefile

It shows that a header is missing, but actually it is not.

$ ls /usr/local/include/pocketsphinx
cmdln_macro.h       fsg_set.h       pocketsphinx.h      pocketsphinx.pxd    pocketsphinx_export.h   ps_lattice.h        ps_mllr.h

What is wrong?

Sieg
  • 67
  • 1
  • 9

0 Answers0