Well, following the doctoral thesis that Javier did and only having available the ELF 32-bit LSB shared object, ARM
(obtained from executing the file
command) versions of the Loquendo shared objects (.so) for Linux, in this case, Tom Tom.
I would like to try to compile the program Javier suggested, called text2audio, and available on the same pdf:
#include <stdio.h>
#include "../sdk/win/LTTS7/include/loqtts.h" /* Loquendo TTS include file */
#include <string.h>
#define CODING tts_LINEAR // "l" /* "l" (linear), "a" (A-law), "u" (U-law) */
#define SAMPLE_RATE 32000 /* Use 8000 for A-law or U-law coding */
int main(int argc, char *argv[])
{
ttsHandleType hInstance; /* Instance handle */
ttsHandleType hVoice; /* Voice handle */
ttsResultType err; /* Error code returned by TTS APIs */
char* p = "Jorge";
char* fich = "sample.wav";
char frase[5000]="";
int i;
fprintf (stderr,"Number: \%i\n",argc);
if(argc > 3) {
p = argv[1]; // Voice
fich = argv[2]; // Path
for(i=3;i<argc;i++)
{
strcat(frase,argv[i]);
strcat(frase," ");
}
fprintf (stderr,"Sentence: \%s\n",frase);
fprintf (stderr,"File : \%s\n",fich);
} else {
fprintf(stderr, "Exec '\%s <speaker> <file> <text> '\n", argv[0]);
return -1;
}
fprintf(stderr, "Using voice \%s\n", p);
/* Initializes the LoquendoTTS Instance */
err = ttsNewSession(&hInstance, NULL);
if (err != tts_OK)
{
fprintf(stderr, "\%s", ttsGetErrorMessage(NULL));
return err;
}
/* Sets the voice parameters */
err = ttsNewVoice(&hVoice, hInstance, p); // 6 -> 7: SAMPLE_RATE, CODING
if (err != tts_OK)
{
fprintf(stderr, "\%s", ttsGetErrorMessage(hInstance));
(void)ttsDeleteSession(hInstance);
return err;
}
/* Sends samples directly to the audio board */
//err = ttsSetAudio(hInstance, "LoqAudioFile", argv[2], CODING, 0);
err = ttsSetAudio(hInstance, "LTTS7AudioBoard", argv[2], SAMPLE_RATE, CODING, tts_STEREO, 0);
if (err != tts_OK)
{
fprintf(stderr, "\%s", ttsGetErrorMessage(hInstance));
(void)ttsDeleteSession(hInstance);
return err;
}
/* Converts text to speech */
err = ttsRead(
hInstance, /* Instance handle */
frase, /* Input */
ttsFALSE, // async
ttsFALSE, // fromFile
0);
if (err != tts_OK)
{
fprintf(stderr, "\%s", ttsGetErrorMessage(hInstance));
(void)ttsDeleteSession(hInstance);
return err;
}
/* Closes the Loquendo TTS instance; the voice will be automatically closed */
(void)ttsDeleteSession(hInstance);
return 0;
}
(This version is a little bit different of the original because I adapted it for the LTTS 7 version, instead of the v6)
The idea is to have an endpoint in PHP which can be used to generate mp3/wav files for a text (using TTS internally).
The methods I tried already:
Installing a Loquendo instance for Windows under Wine and PlayOnLinux with Balabolka (with CLI)
Using the same, but with the Ruby bindings available here: https://github.com/jojje/win32-loquendo/ (under PlayOnLinux and my last approach was trying to execute ruby directly under Linux (no emulation) with rvm, but I had a lot of troubles trying to install gems under 32 bits instance, at least the 64-bit version of Ruby in Windows didn't work)
Asking in eSpeak repo: https://github.com/espeak-ng/espeak-ng/issues/836
Asking in RHVoice: https://github.com/Olga-Yakovleva/RHVoice/issues/247
Asking Escolha Tecnologia, as they use these voices too. But they said to me they won't reveal any secret about their business.
Sending an email to Nuance, as they bought Loquendo in 2011 and they had available Loquendo until 2017. And as I said I know there are available Linux versions because they are stated in the Installation Manual.
Trying to load the library with PHP ffi, trying to recreate the same as the win32-loquendo project did, without luck.
Asking Javier Mikel Olaso (I found his email on Google), as he did a doctoral thesis using Loquendo in Linux: https://addi.ehu.es/bitstream/handle/10810/27565/TESIS_OLASO_FERNANDEZ_JAVIER%20MIKEL.pdf?sequence=1&isAllowed=y
As I stated I saw that the Installation Manual has references to their product in Linux I found that the Loquendo TTS library has the following name under Linux: libLoqTTS7.so so I search that word with Google Dorks, and I only found references to GPS / Tomtom forums...
Trying to locate the shared objects for i368 or amd64 in Linux, as it's stated on the manual instalation of the user guide (PDF) of the original product of Loquendo.
By this is reason, my last chance is to emulate the ARM libraries installing qemu-user-static
and using /usr/bin/qemu-arm-static
(as I think this will be the most inexpesive method for the cpu / ram usage). But for this I'll need to cross compile the text2audio program in order to be compatible with the ARM architecture, if not gcc will prompt the following error: error adding symbols: file in wrong
As I'm forced to compile this text2audio code following the arm architecture, I decided to install the gcc version for this architecture following this tutorial.
This was the command I used to compile my c program:
$ arm-linux-gnueabihf-gcc -L$d/sdk/linux/LoquendoTTS/lib -I$d/sdk/win/LTTS7/include -o txt2audio $d/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so txt2audio.c
I tried both arm-linux-gnueabihf-gcc
and arm-linux-gnueabi-gcc
versions without luck. The following errors prompted:
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `pow@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fwrite@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_detach@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `sprintf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `printf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `stderr@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strchr@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `sqrt@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `strncat@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fread@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `localtime_r@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `shmget@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `getpid@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `dlclose@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `log@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `gettimeofday@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `strspn@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `memset@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `puts@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `gethostname@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `stdout@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `getenv@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `opendir@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strstr@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_cond_init@GLIBC_2.3.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `semctl@GLIBC_2.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fseek@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `fscanf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `shmat@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `clock_gettime@GLIBC_2.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `remove@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fileno@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `__ctype_b_loc@GLIBC_2.3'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_mutex_destroy@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `exp@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fputc@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fgets@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `semop@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `__strtod_internal@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `dlsym@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `time@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strrchr@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `shmdt@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `dlopen@GLIBC_2.1'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `sin@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `rand@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_cond_wait@GLIBC_2.3.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `readdir@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `nanosleep@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `__strtol_internal@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `log10@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `closedir@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strncmp@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_self@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `sscanf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `ceil@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `strcspn@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strcat@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `fclose@GLIBC_2.1'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fgetc@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `memmove@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strpbrk@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strcpy@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strncpy@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_mutex_lock@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fprintf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `free@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `srand@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `mmap@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fnmatch@GLIBC_2.2.3'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_join@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_create@GLIBC_2.1'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `realloc@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strlen@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `memcpy@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `stdin@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_mutex_unlock@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `strcmp@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_cond_destroy@GLIBC_2.3.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `dlerror@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `__ctype_toupper_loc@GLIBC_2.3'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_cond_timedwait@GLIBC_2.3.2'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `modf@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `malloc@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `memcmp@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `pthread_mutex_init@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `cos@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `semget@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `ftell@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `fputs@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `fopen@GLIBC_2.1'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLTTS7Util.so: undefined reference to `munmap@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `putchar@GLIBC_2.0'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/ld: /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so: undefined reference to `fflush@GLIBC_2.0'
I reviewed the following answer that suggested to use the command man followed with the symbol name, for example, man pow
suggests to use the -lm
flag (always after the -o argument)...
I tried it without luck. I think the problem is on the GLIBC version that the shared object requires.
So, how can I use a different version on the cross compilation process for ARM and GLIBC 2.0?
Verbose mode
COLLECT_GCC_OPTIONS='-v' '-pthread' '-L/xxx/tts/sdk/linux/LoquendoTTS/lib' '-I' '/xxx/tts/sdk/win/LTTS7/include' '-o' 'txt2audio' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mthumb' '-mtls-dialect=gnu' '-march=armv7-a+fp'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/as -v -I /xxx/tts/sdk/win/LTTS7/include -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -meabi=5 -o /tmp/cctHKotp.o /tmp/ccvQ2mlb.s
GNU assembler version 2.31.1 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Debian) 2.31.1
COMPILER_PATH=/usr/lib/gcc-cross/arm-linux-gnueabihf/8/:/usr/lib/gcc-cross/arm-linux-gnueabihf/8/:/usr/lib/gcc-cross/arm-linux-gnueabihf/:/usr/lib/gcc-cross/arm-linux-gnueabihf/8/:/usr/lib/gcc-cross/arm-linux-gnueabihf/:/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/lib/gcc-cross/arm-linux-gnueabihf/8/:/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/lib/:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-pthread' '-L/xxx/tts/sdk/linux/LoquendoTTS/lib' '-I' '/xxx/tts/sdk/win/LTTS7/include' '-o' 'txt2audio' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mthumb' '-mtls-dialect=gnu' '-march=armv7-a+fp'
/usr/lib/gcc-cross/arm-linux-gnueabihf/8/collect2 -plugin /usr/lib/gcc-cross/arm-linux-gnueabihf/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc-cross/arm-linux-gnueabihf/8/lto-wrapper -plugin-opt=-fresolution=/tmp/cczMJZCD.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -pie -o txt2audio /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/lib/Scrt1.o /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/lib/crti.o /usr/lib/gcc-cross/arm-linux-gnueabihf/8/crtbeginS.o -L/xxx/tts/sdk/linux/LoquendoTTS/lib -L/usr/lib/gcc-cross/arm-linux-gnueabihf/8 -L/usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/lib -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf /tmp/cctHKotp.o /xxx/tts/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so -ldl -lpthread -lc -lgcc --push-state --as-needed -lgcc_s --pop-state -lpthread -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc-cross/arm-linux-gnueabihf/8/crtendS.o /usr/lib/gcc-cross/arm-linux-gnueabihf/8/../../../../arm-linux-gnueabihf/lib/crtn.o
What I have tried from comments?
Suggested by Lorinczy Zsigmond:
$ arm-linux-gnueabihf-gcc --verbose -pthread -L$d/sdk/linux/LoquendoTTS/lib -I$d/sdk/win/LTTS7/include -o txt2audio txt2audio.c $d/sdk/linux/LoquendoTTS/bin/libLoqTTS7.so -ldl -lpthread -lc
Same result.