I've followed the instructions on the tutorial on Linux (Debian 8.0) and they worked fine.
Now I'm trying to do the same for a Mac Air running 10.10.5, and after installing sphinxbase, I have the following issue:
$./autogen.sh
runs fine.
I then run:
$ make -j4
Compilation goes fine, but linking produces multiple warnings:
ld: warning: directory not found for option '-L/Users/alex/local/lib'
Can somebody help?
I looked into /usr/local/share/sphinxbase/swig/sphinxbase.i
which indeed defines a docstring, but have no clue what to do to fix this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The test can not load sphinxbase library. It seems you do not have it installed properly. You can use otool to debug this issue, it should output something like:
~~~~~~~~~~~~
otool -L .libs/test_alignment
.libs/test_alignment:
/usr/local/lib/libpocketsphinx.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/local/lib/libsphinxbase.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 1.0.0)
~~~~~~~~~~~~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are correct, I am using fish shell which was not exporting /usr/local/lib
I changed to bash, exported it and It has been built and installed, but when I try to run pocketsphinx_continious, I get the following:
bash-4.3$ pocketsphinx_continuous
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib//libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Trace/BPT trap: 5
This library doesn't exist with this name, it exists under:
Looks like something is broken with your installation. I'd try to figure out where this library should be and why it is not found.
I don't think you need to load libraries just from /usr/local/lib, there must be other folders. I think you redefined your linker to look in /usr/local/lib only and this is not a good idea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for your help Nickolay.
Unfortunately OSX is using bizzare directories, to which I am not used to.
I tried to install cmu sphinx using the brew package, but it also failed.
I guess I'll have to use it in a VM rather than the OSX host.
Again, thanks for your time!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've followed the instructions on the tutorial on Linux (Debian 8.0) and they worked fine.
Now I'm trying to do the same for a Mac Air running 10.10.5, and after installing sphinxbase, I have the following issue:
$./autogen.shruns fine.
I then run:
$ make -j4Compilation goes fine, but linking produces multiple warnings:
ld: warning: directory not found for option '-L/Users/alex/local/lib'Then finally, I get:
I then try:
$ make checkWhich sees a lot of errors:
Can somebody help?
I looked into /usr/local/share/sphinxbase/swig/sphinxbase.i
which indeed defines a docstring, but have no clue what to do to fix this.
Provide swig version you are using on mac
Provide test/unit/test-suite.log
Last edit: Nickolay V. Shmyrev 2015-10-26
Hi Nikolay,
Swig is:
test-suite.log:
~~~~
pocketsphinx 5prealpha: test/unit/test-suite.log
TOTAL: 32
PASS: 6
SKIP: 0
XFAIL: 0
FAIL: 26
XPASS: 0
ERROR: 0
.. contents:: :depth: 2
FAIL: test_ps_init
INFO: cmd_ln.c(697): Parsing command line:
\
-hmm ../../model/en-us/en-us \
-lm ../../model/en-us/en-us.lm.bin \
-dict ../../model/en-us/cmudict-en-us.dict \
-fwdtree yes \
-fwdflat yes \
-bestpath yes \
-input_endian little \
-samprate 16000
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn current current
-cmninit 8.0 8.0
-compallsen no no
-debug 0
-dict ../../model/en-us/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm ../../model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e+00
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 0
-lm ../../model/en-us/en-us.lm.bin
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.333333e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 40
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy legacy
-unit_area yes yes
-upperf 6855.4976 6.855498e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: cmd_ln.c(697): Parsing command line:
\
-lowerf 130 \
-upperf 6800 \
-nfilt 25 \
-transform dct \
-lifter 22 \
-feat 1s_c_d_dd \
-svspec 0-12/13-25/26-38 \
-agc none \
-cmn current \
-varnorm no \
-model ptm \
-cmninit 40,3,-1
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-alpha 0.97 9.700000e-01
-ceplen 13 13
-cmn current current
-cmninit 8.0 40,3,-1
-dither no no
-doublebw no no
-feat 1s_c_d_dd 1s_c_d_dd
-frate 100 100
-input_endian little little
-lda
-ldadim 0 0
-lifter 0 22
-logspec no no
-lowerf 133.33334 1.300000e+02
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-smoothspec no no
-svspec 0-12/13-25/26-38
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-vad_postspeech 50 50
-vad_prespeech 10 10
-vad_threshold 2.0 2.000000e+00
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wlen 0.025625 2.562500e-02
INFO: pocketsphinx.c(145): Parsed model-specific feature parameters from ../../model/en-us/en-us/feat.params
dyld: lazy symbol binding failed: Symbol not found: _cmd_ln_print_values_r
Referenced from: /Users/alex/projects/cmusphinx/pocketsphinx/src/libpocketsphinx/.libs/libpocketsphinx.3.dylib
Expected in: flat namespace
dyld: Symbol not found: _cmd_ln_print_values_r
Referenced from: /Users/alex/projects/cmusphinx/pocketsphinx/src/libpocketsphinx/.libs/libpocketsphinx.3.dylib
Expected in: flat namespace
Last edit: Nickolay V. Shmyrev 2015-10-26
AFAIK, libpocketsphinx.3.dylib exists and is exporting symbols.
Last edit: Alex Giokas 2015-10-26
The test can not load sphinxbase library. It seems you do not have it installed properly. You can use otool to debug this issue, it should output something like:
~~~~~~~~~~~~
otool -L .libs/test_alignment
.libs/test_alignment:
/usr/local/lib/libpocketsphinx.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/local/lib/libsphinxbase.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 1.0.0)
~~~~~~~~~~~~
Hi Nikolay,
You are correct, I am using fish shell which was not exporting /usr/local/lib
I changed to bash, exported it and It has been built and installed, but when I try to run pocketsphinx_continious, I get the following:
This library doesn't exist with this name, it exists under:
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
and under /usr/local/lib I have:
How can I rebuild it without libJPEG (I am hoping it is optional).
Running ./configure produces the same error:
Looks like something is broken with your installation. I'd try to figure out where this library should be and why it is not found.
I don't think you need to load libraries just from /usr/local/lib, there must be other folders. I think you redefined your linker to look in /usr/local/lib only and this is not a good idea.
Thank you very much for your help Nickolay.
Unfortunately OSX is using bizzare directories, to which I am not used to.
I tried to install cmu sphinx using the brew package, but it also failed.
I guess I'll have to use it in a VM rather than the OSX host.
Again, thanks for your time!