Problem with build on Edison device
seandoyle opened this issue · 3 comments
Hi -
If I clone the responsitory and run the following commands
./autogen.sh --enable-fixed --without-lapack
make
then I hit the error that follows. Is there something else I should configure?
I've attached part of the make output (the earlier output looked reasonable) and the output from autogen.sh follows.
Any help appreciated.
....
Making all in sphinx_adtools
make[2]: Entering directory '/home/root/pocketsphinx/sphinxbase/src/sphinx_adtools'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -g -O2 -Wall -MT sphinx_pitch.o -MD -MP -MF .deps/sphinx_pitch.Tpo -c -o sphinx_pitch.o sphinx_pitch.c
mv -f .deps/sphinx_pitch.Tpo .deps/sphinx_pitch.Po
/bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 -I../../include -I../../include -g -O2 -Wall -o sphinx_pitch sphinx_pitch.o ../../src/libsphinxbase/libsphinxbase.la ../../src/libsphinxad/libsphinxad.la -lpthread -lm
../../libtool: line 1: rpath+= -Wl,-rpath -Wl,/home/root/pocketsphinx/sphinxbase/src/libsphinxbase/.libs: not found
../../libtool: line 1: rpath+= -Wl,-rpath -Wl,/home/root/pocketsphinx/sphinxbase/src/libsphinxad/.libs: not found
../../libtool: line 1: rpath+= -Wl,-rpath -Wl,/usr/local/lib: not found
libtool: link: gcc -std=gnu99 -I../../include -I../../include -g -O2 -Wall -o .libs/sphinx_pitch sphinx_pitch.o ../../src/libsphinxbase/.libs/libsphinxbase.so ../../src/libsphinxad/.libs/libsphinxad.so /home/root/pocketsphinx/sphinxbase/src/libsphinxbase/.libs/libsphinxbase.so -lpthread -lm -Wl,-rpath -Wl,/usr/local/lib
../../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'
....
Here's the output from autogen:
processing .
Running libtoolize...
libtoolize: putting auxiliary files in .'. libtoolize: copying file
./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying file
m4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4' libtoolize: copying file
m4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4' libtoolize: copying file
m4/lt~obsolete.m4'
Running aclocal ...
Running autoheader...
Running automake --foreign --copy ...
Running autoconf ...
Running ./configure --enable-fixed ...
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/i586-poky-linux/bin/ld
checking if the linker (/usr/i586-poky-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 32768
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/i586-poky-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/i586-poky-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for bison... bison -y
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... no
checking return type of signal handlers... void
checking for long long... yes
checking size of long long... 8
checking size of long... 4
checking for popen... yes
checking for perror... yes
checking for snprintf... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for sgesv_ in -llapack... no
checking for log in -lm... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking pulse/pulseaudio.h usability... no
checking pulse/pulseaudio.h presence... no
checking for pulse/pulseaudio.h... no
checking jack/jack.h usability... no
checking jack/jack.h presence... no
checking for jack/jack.h... no
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for snd_pcm_open in -lasound... no
checking for doxygen... no
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for python include path... -I/usr/include/python2.7
checking for swig... /usr/bin/swig
checking SWIG version... 3.0.2
checking for SWIG library... /usr/share/swig/3.0.2
checking for pkg-config... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SNDFILE... no
checking sndfile.h usability... no
checking sndfile.h presence... no
checking for sndfile.h... no
checking for SAMPLERATE... no
checking samplerate.h usability... no
checking samplerate.h presence... no
checking for samplerate.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating sphinxbase.pc
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/sphinxbase/Makefile
config.status: creating src/Makefile
config.status: creating src/libsphinxad/Makefile
config.status: creating src/libsphinxbase/Makefile
config.status: creating src/libsphinxbase/util/Makefile
config.status: creating src/libsphinxbase/feat/Makefile
config.status: creating src/libsphinxbase/fe/Makefile
config.status: creating src/libsphinxbase/lm/Makefile
config.status: creating src/sphinx_fe/Makefile
config.status: creating src/sphinx_cepview/Makefile
config.status: creating src/sphinx_jsgf2fsg/Makefile
config.status: creating src/sphinx_adtools/Makefile
config.status: creating src/sphinx_lmtools/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxyfile
config.status: creating test/Makefile
config.status: creating test/unit/testfuncs.sh
config.status: creating test/unit/Makefile
config.status: creating test/unit/test_alloc/Makefile
config.status: creating test/unit/test_bitvec/Makefile
config.status: creating test/unit/test_case/Makefile
config.status: creating test/unit/test_string/Makefile
config.status: creating test/unit/test_cmdln/Makefile
config.status: creating test/unit/test_hash/Makefile
config.status: creating test/unit/test_matrix/Makefile
config.status: creating test/unit/test_feat/Makefile
config.status: creating test/unit/test_fe/Makefile
config.status: creating test/unit/test_logmath/Makefile
config.status: creating test/unit/test_lineiter/Makefile
config.status: creating test/unit/test_ngram/Makefile
config.status: creating test/unit/test_fsg/Makefile
config.status: creating test/unit/test_thread/Makefile
config.status: creating test/unit/test_util/Makefile
config.status: creating test/regression/testfuncs.sh
config.status: creating test/regression/Makefile
config.status: creating swig/Makefile
config.status: creating swig/python/Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/sphinx_config.h
config.status: include/sphinx_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Now type `make' to compile the package.
Some notes:
The files that it can't find are there:
ls -l /home/root/pocketsphinx/sphinxbase/src/libsphinxbase/.libs
-rw-r--r-- 1 root root 1140892 Mar 28 18:59 libsphinxbase.a
lrwxrwxrwx 1 root root 19 Mar 28 18:59 libsphinxbase.la -> ../libsphinxbase.la
-rw-r--r-- 1 root root 973 Mar 28 18:59 libsphinxbase.lai
lrwxrwxrwx 1 root root 22 Mar 28 18:59 libsphinxbase.so -> libsphinxbase.so.3.0.0
lrwxrwxrwx 1 root root 22 Mar 28 18:59 libsphinxbase.so.3 -> libsphinxbase.so.3.0.0
-rwxr-xr-x 1 root root 820805 Mar 28 18:59 libsphinxbase.so.3.0.0
and
ls -l /home/root/pocketsphinx/sphinxbase/src/libsphinxbase
-rw-r--r-- 1 root root 23993 Mar 28 18:53 Makefile
-rw-r--r-- 1 root root 270 Mar 27 02:44 Makefile.am
-rw-r--r-- 1 root root 23709 Mar 28 18:52 Makefile.in
drwxr-xr-x 4 root root 4096 Mar 28 18:58 fe
drwxr-xr-x 4 root root 4096 Mar 28 18:58 feat
-rw-r--r-- 1 root root 972 Mar 28 18:59 libsphinxbase.la
drwxr-xr-x 4 root root 4096 Mar 28 18:59 lm
I'm not familiar with libtool - but since autogen says:
checking whether the shell understands "+="... no
and the line throwing the problem contains "+="
../../libtool: line 1: rpath+= -Wl,-rpath -Wl,/home/root/pocketsphinx/sphinxbase/src/libsphinxbase/.libs:
perhaps this is the problem?
It does look like it's the latest one:
opkg info libtool
Package: libtool
Version: 2.4.2-r6.0
Status: install ok installed
Section: devel
Architecture: core2-32
Maintainer: Poky poky@yoctoproject.org
MD5Sum: 9a7962a645a6c58f6789fb82462ed272
Size: 469508
Filename: libtool_2.4.2-r6.0_core2-32.ipk
Source: ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz file://trailingslash.patch file://rename-with-sysroot.patch file://use-sysroot-in-libpath.patch file://fix-final-rpath.patch file://avoid_absolute_paths_for_general_utils.patch file://fix-rpath.patch file://respect-fstack-protector.patch file://norm-rpath.patch file://dont-depend-on-help2man.patch file://fix-resolve-lt-sysroot.patch
Description: Generic library support script This is GNU libtool, a generic library
support script. Libtool hides the complexity of generating special
library types (such as shared libraries) behind a consistent interface.
Installed-Time: 1422624039
Please close this issue.
Nothing to do with Sphinxbase. This Edison device doesn't have a /usr/local directory. Another one does and can compile without an issue. I suspect the root of the problem is how the device was flashed.
But - I learned a bit about libtool so all's OK :-). Sorry for the bother.
Great, thank you for letting us know.