alphacep/vosk-asterisk

FreeBSD Support

scorpio1441 opened this issue · 8 comments

Is it possible to use this module on FreeBSD?

Even though I copied the module and libc.so.6 from Linux machine, it still throws an error when loading:
[Jan 28 05:39:22] ERROR[100106] loader.c: Error loading module 'res_speech_vosk.so': /usr/local/lib/compat/libc.so.6: version GLIBC_2.14 required by /usr/local/lib/asterisk/modules/res_speech_vosk.so not defined

You have to build it from source and it will work.

It won't work, no matter what. Many hours spent.
No FreeBSD support period.
Compiles on Linux just fine.

You are welcome to provide more information - what have you tried, what error did you see, logs, outputs.

Just following the documentation:

git clone https://github.com/asterisk/asterisk
./bootstrap
./configure --with-asterisk=/usr/src/asterisk --prefix=/usr/local/bin

/usr/src/asterisk/include/asterisk.h:21:10: fatal error: 'asterisk/autoconfig.h' file not found
#include "asterisk/autoconfig.h"

Assuming need to ./configure & make asterisk first (not mentioned here at all)? No problem.

 cd /usr/src/asterisk/
./configure
make

error: linker command failed with exit code 1 (use -v to see invocation)

Expected, asterisk won't build under FreeBSD while using https://github.com/asterisk/asterisk as source.

Using ports instead.

./configure
make

Builds just fine.

Going back to building vosk-asterisk:

./configure --with-asterisk=/usr/src/asterisk --prefix=/usr/local/bin

Jan 28 05:39:22] ERROR[100106] loader.c: Error loading module 'res_speech_vosk.so': /usr/local/lib/compat/libc.so.6: version GLIBC_2.14 required by /usr/local/lib/asterisk/modules/res_speech_vosk.so not defined

So says my original message. This module truly depends on Linux libraries which can't be brought to FreeBSD for obvious reasons.

What is the output of ldd res_speech_vosk.so and ldd some_other_asterisk_module.so? just to compare the two.

If I had res_speech_vosk.so, the problem would be resolved to begin with... =))))

root@freebsd:/usr/src/vosk-asterisk-master # ldd /usr/local/lib/asterisk/modules/res_parking.so
/usr/local/lib/asterisk/modules/res_parking.so:
libthr.so.3 => /lib/libthr.so.3 (0x8014a8000)
libc.so.7 => /lib/libc.so.7 (0x801083000

res_speech_vosk is in /usr/local/lib/asterisk/modules/res_speech_vosk.so, message says

Ended up compiling under Fedora just fine. Thanks.