Can't install IRSTLM

928 views
Skip to first unread message

anuraag advani

unread,
Nov 17, 2016, 8:00:39 PM11/17/16
to kaldi-help
I can't seem IRSTLM to install, first I was getting the error #include_next <stdio.h> so I changed that to  #include_next </usr/include/stdio.h>, now when I use
./extras/install_irstlm.sh
I get the followint error

****() Assuming IRSTLM is already installed. Please delete
****() the directory ./irstlm if you need us to download
****() the sources again.
Calling /usr/bin/libtoolize 
Calling /usr/bin/aclocal...
Calling /usr/bin/autoconf...
Calling /usr/bin/automake --add-missing...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
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 a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/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... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/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 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -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 supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
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... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pdflatex... pdflatex
checking for bibtex... bibtex
configure: trace disabled (default), most regression tests will fail
configure: generation of debugging symbols disabled (default), compilation without "-g", only "-O2"
configure: profiling disabled (default)
configure: train-caching disabled (default)
configure: caching disabled (default)
configure: interpolated search disabled (default)
configure: optimization disabled (default)
configure: Building non-threaded irstlm.
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating scripts/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure: The software will be installed into /home/anuraag/kaldi/tools/irstlm
make  all-recursive
make[1]: Entering directory '/home/anuraag/kaldi/tools/irstlm'
Making all in src
make[2]: Entering directory '/home/anuraag/kaldi/tools/irstlm/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -DMYCODESIZE=3  -MT util.lo -MD -MP -MF .deps/util.Tpo -c -o util.lo util.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -MT util.lo -MD -MP -MF .deps/util.Tpo -c util.cpp -o util.o
Makefile:721: recipe for target 'util.lo' failed
make[2]: Leaving directory '/home/anuraag/kaldi/tools/irstlm/src'
Makefile:406: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/anuraag/kaldi/tools/irstlm'
Makefile:338: recipe for target 'all' failed
Making install in src
make[1]: Entering directory '/home/anuraag/kaldi/tools/irstlm/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -DMYCODESIZE=3  -MT util.lo -MD -MP -MF .deps/util.Tpo -c -o util.lo util.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -MT util.lo -MD -MP -MF .deps/util.Tpo -c util.cpp -o util.o
Makefile:721: recipe for target 'util.lo' failed
make[1]: Leaving directory '/home/anuraag/kaldi/tools/irstlm/src'
Makefile:406: recipe for target 'install-recursive' failed

Please help thanks

Daniel Povey

unread,
Nov 17, 2016, 8:59:13 PM11/17/16
to kaldi-help
As a general rule you shouldn't change things and show us the error after you changed things, we want to see the original error.  Please remove the irstlm directory, install from scratch, and show the original error.

Dan


--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

anuraag advani

unread,
Nov 19, 2016, 8:12:49 PM11/19/16
to kaldi-help
This is the original error


[anuraag@dyn-160-39-195-65 tools]$ ./extras/install_irstlm.sh 
****() Installing IRSTLM
****() Assuming IRSTLM is already installed. Please delete
****() the directory ./irstlm if you need us to download
****() the sources again.
Calling /usr/bin/libtoolize 
Calling /usr/bin/aclocal...
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autom4te: cannot open autom4te.cache/requests: Permission denied
aclocal: error: echo failed with exit status: 1
aclocal failed
Calling /usr/bin/libtoolize 
Calling /usr/bin/aclocal...
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autom4te: cannot open autom4te.cache/requests: Permission denied
aclocal: error: echo failed with exit status: 1
aclocal failed
./configure: line 2023: config.log: Permission denied
./configure: line 2033: config.log: Permission denied
make  all-recursive
make[1]: Entering directory '/home/anuraag/kaldi/tools/irstlm'
Making all in src
make[2]: Entering directory '/home/anuraag/kaldi/tools/irstlm/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -DMYCODESIZE=3  -MT dictionary.lo -MD -MP -MF .deps/dictionary.Tpo -c -o dictionary.lo dictionary.cpp
rm: cannot remove 'dictionary.o': Permission denied
rm: cannot remove 'dictionary.lo': Permission denied
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -MT dictionary.lo -MD -MP -MF .deps/dictionary.Tpo -c dictionary.cpp -o dictionary.o
In file included from /usr/include/c++/6.1.1/ext/string_conversions.h:41:0,
                 from /usr/include/c++/6.1.1/bits/basic_string.h:5402,
                 from /usr/include/c++/6.1.1/string:52,
                 from /usr/include/c++/6.1.1/bits/locale_classes.h:40,
                 from /usr/include/c++/6.1.1/bits/ios_base.h:41,
                 from /usr/include/c++/6.1.1/ios:42,
                 from /usr/include/c++/6.1.1/ostream:38,
                 from /usr/include/c++/6.1.1/iostream:39,
                 from mfstream.h:26,
                 from dictionary.cpp:23:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
rm: cannot remove 'dictionary.o': Permission denied
rm: cannot remove 'dictionary.lo': Permission denied
Makefile:721: recipe for target 'dictionary.lo' failed
make[2]: *** [dictionary.lo] Error 1
make[2]: Leaving directory '/home/anuraag/kaldi/tools/irstlm/src'
Makefile:406: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/anuraag/kaldi/tools/irstlm'
Makefile:338: recipe for target 'all' failed
make: *** [all] Error 2
Making install in src
make[1]: Entering directory '/home/anuraag/kaldi/tools/irstlm/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -DMYCODESIZE=3  -MT dictionary.lo -MD -MP -MF .deps/dictionary.Tpo -c -o dictionary.lo dictionary.cpp
rm: cannot remove 'dictionary.o': Permission denied
rm: cannot remove 'dictionary.lo': Permission denied
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -MT dictionary.lo -MD -MP -MF .deps/dictionary.Tpo -c dictionary.cpp -o dictionary.o
In file included from /usr/include/c++/6.1.1/ext/string_conversions.h:41:0,
                 from /usr/include/c++/6.1.1/bits/basic_string.h:5402,
                 from /usr/include/c++/6.1.1/string:52,
                 from /usr/include/c++/6.1.1/bits/locale_classes.h:40,
                 from /usr/include/c++/6.1.1/bits/ios_base.h:41,
                 from /usr/include/c++/6.1.1/ios:42,
                 from /usr/include/c++/6.1.1/ostream:38,
                 from /usr/include/c++/6.1.1/iostream:39,
                 from mfstream.h:26,
                 from dictionary.cpp:23:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
rm: cannot remove 'dictionary.o': Permission denied
rm: cannot remove 'dictionary.lo': Permission denied
Makefile:721: recipe for target 'dictionary.lo' failed
make[1]: *** [dictionary.lo] Error 1
make[1]: Leaving directory '/home/anuraag/kaldi/tools/irstlm/src'
Makefile:406: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
***() Error compiling IRSTLM. The error messages could help you 
***() in figuring what went wrong.
find: ‘/home/anuraag/kaldi/tools/sequitur-g2p/lib’: No such file or directory

Daniel Povey

unread,
Nov 19, 2016, 8:23:28 PM11/19/16
to kaldi-help
It looks to me like there is some weird permissions or ownership issue, like maybe you originally installed it with 'sudo' and then you failed to clean up.  `ls -l` on the files and directories concerned will help you figure this out.


Daniel Povey

unread,
Nov 19, 2016, 8:35:33 PM11/19/16
to kaldi-help
Also, now that I see the full context of the original problem, I see that it's not an IRSTLM issue, it's a problem that happens in a system header.  You should never have to change system headers.
It looks like something went wrong in system space, e.g. an issue with your Linux distribution, or you somehow installed combinations of packages that were not compatible.  If I were you I'd install the system from scratch, and steer clear of trying to install multiple versions of gcc or g++.  Just install as
apt-get install g++
or whatever, don't try to get fancy

Dan

anuraag advani

unread,
Nov 19, 2016, 8:40:25 PM11/19/16
to kaldi-help
The only system header I changed was the one mentioned above, but I was getting the error before that. I will still install the system from scratch and see if that helps. Thanks.

Jan Trmal

unread,
Nov 19, 2016, 9:13:23 PM11/19/16
to kaldi-help
I think your issue is really something is messed up with your system. not sure what. But you shouldn't get complaints about missing system libraries or not being able to write to directories you've created.
Perhaps your disk is dying?
y.


On Sat, Nov 19, 2016 at 8:40 PM, anuraag advani <anuraag...@gmail.com> wrote:
The only system header I changed was the one mentioned above, but I was getting the error before that. I will still install the system from scratch and see if that helps. Thanks.

Jan Trmal

unread,
Nov 19, 2016, 9:15:49 PM11/19/16
to kaldi-help
BTW, what OS do you have? If linux, what distribution? y.
Reply all
Reply to author
Forward
0 new messages