In my last entry I installed flite from opkg and when I tried to run it with a simple "flite -t hello" all I got was a Segmentation Fault, so next step was to fix that.
strace flite
execve("/usr/bin/flite", ["flite"], [/* 11 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77435000
stat("/etc/ld.so.cache", 0x7fce6bf0) = -1 ENOENT (No such file or directory)
open("/lib/libflite_cmu_us_kal16.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite_cmu_us_kal16.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=3705608, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0007\360\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 3772416, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x77087000
old_mmap(0x77087000, 3693236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x77087000
old_mmap(0x7741c000, 15112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x385000) = 0x7741c000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libflite_usenglish.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite_usenglish.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=88944, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0b\320\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 155648, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x77061000
old_mmap(0x77061000, 68232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x77061000
old_mmap(0x77082000, 19312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0x77082000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libflite_cmulex.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite_cmulex.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=597680, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0!\360\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 663552, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76fbf000
old_mmap(0x76fbf000, 590444, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x76fbf000
old_mmap(0x77060000, 3760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x91000) = 0x77060000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=85356, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\26\200\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 151552, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f9a000
old_mmap(0x76f9a000, 84896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x76f9a000
old_mmap(0x76fbe000, 3436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x14000) = 0x76fbe000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libflite.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=125740, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\\ \0\0\0004"..., 4096) = 4096
old_mmap(NULL, 192512, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f6b000
old_mmap(0x76f6b000, 121476, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x76f6b000
old_mmap(0x76f99000, 2860, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1e000) = 0x76f99000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=77080, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0006\320\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 143360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f48000
old_mmap(0x76f48000, 76672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x76f48000
old_mmap(0x76f6a000, 3352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0x76f6a000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\237\320\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 446464, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76edb000
old_mmap(0x76edb000, 352964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x76edb000
old_mmap(0x76f41000, 7343, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x56000) = 0x76f41000
old_mmap(0x76f43000, 17508, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x76f43000
close(3) = 0
munmap(0x77434000, 4096) = 0
open("/lib/libflite_cmulex.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite_cmulex.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=597680, ...}) = 0
close(3) = 0
open("/lib/libflite_usenglish.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite_usenglish.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=88944, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=77080, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
open("/lib/libflite.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=125740, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=77080, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
open("/lib/libflite.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libflite.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=125740, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=77080, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=85356, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=77080, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=359599, ...}) = 0
close(3) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=28968, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x77434000
set_thread_area(0x7743b750) = 0
mprotect(0x76f41000, 4096, PROT_READ) = 0
mprotect(0x77436000, 4096, PROT_READ) = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
brk(0) = 0x9f2000
brk(0x9f3000) = 0x9f3000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xf0000} ---
+++ killed by SIGSEGV +++
Segmentation fault
From the highlighted text, you can see that it did not find any of the shared libraries that flite needs. A search for those libraries showed that they were on a different folder from where flite was searching. They were in /usr/lib as opposed to /lib:
I also remove the patches folder and compiled flite 1.4 by doing "make package/flite/compile V=s" in /linino/trunk. After that I removed the previously installed flite in linino by doing "opkg remove flite" and copied the result of my compilation by doing:
Running then "flite -t hello" resulted in my arduino saying hello. Unfortunately, randoms attempts of running the same line ended up on the board throwing an error message instead of talking. The error is the following:
Getting there, but not quite there yet...
In the same place where I got the suggestion of using version 1.4, they suggest running it many times until it succeeds. I am using this script (based on the one they had):
REP=1
until [ "$REP" -eq 0 ]
do
flite -voice kal16 -t "$1"
REP="$?"
done