Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Getting error while cross compiling sphinxbase for arm #56

Open
rakeshkandukuri6 opened this issue Jul 30, 2018 · 1 comment
Open

Getting error while cross compiling sphinxbase for arm #56

rakeshkandukuri6 opened this issue Jul 30, 2018 · 1 comment

Comments

@rakeshkandukuri6
Copy link

Hi,
I am trying to cross compile sphinxbase and pocketsphinx for arm platform. I used the commands for cross compiling Sphinxbase as shown below.
./autogen.sh --host=arm-linux-gnueabihf --without-python
./configure --host=arm-linux-gnueabihf --build=x86_64-linux-gnu --prefix=/home/rakesh/sphinx --without-python

When I issued the command 'make' I am getting the errors as shown below.

../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_any' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_sizeof'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_set_channels' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_set_rate_near'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_nonblock' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_drop'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_close' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_set_period_time_near' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_get_buffer_time_max'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_set_format' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_start'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_strerror' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_hw_params_set_access'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_open' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_resume'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_readi' ../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to snd_pcm_prepare'
../../src/libsphinxad/.libs/libsphinxad.so: undefined reference to `snd_pcm_hw_params_set_buffer_time_near'
collect2: error: ld returned 1 exit status
Makefile:413: recipe for target 'sphinx_cont_seg' failed
make[2]: *** [sphinx_cont_seg] Error 1
make[2]: Leaving directory '/home/rakesh/sphinxbase/src/sphinx_adtools'
Makefile:374: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/rakesh/sphinxbase/src'
Makefile:479: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Can you please suggest a solution for the above error?

@morethanuser
Copy link
Contributor

morethanuser commented Oct 21, 2018

Looks like a problem with linker on your environment. Your "arm" linker is trying to link code with libasound(2)/alsa-lib, but it can't find it.
Probably you have proper "arm" alsa headers - that's why ./configure found them and missing "arm" alsa libraries.
I think you should cross compile alsa and install it in your toolchain directory or sth. like that.

Checkout output of arm-linux-gnueabihf-gcc -print-sysroot i'll bet that you can't find alsa libraries there, but headers will be present.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants