Hi,
I'm having a problem building a package on LibreELEC 10.0.
The package in question is the Speech Dispatcher service. Many months ago I asked on this forum about integrating that package into LibreELEC 9.2, and I could add it without any problem after some modifications.
But now, trying to add this same package to LE10 I get the following error when building it:
CCLD speech-dispatcher
../../src/common/.libs/libcommon.a(libcommon_la-speak_queue.o):speak_queue.c:function module_speak_queue_add_audio: error: undefined reference to 'g_memdup2'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:558: speech-dispatcher] Error 1
Looking on Google I found something about the system not being fully updated or something like that, but I don't understand what is the problem here, in LibreELEC 9 this builds without any problem.
Here is the package.mk:
PKG_NAME="speech-dispatcher"
PKG_VERSION="0.11.0"
PKG_SHA256="254c4279c7637ee815c9daee99597d208681f811af5188051f0c2e11f2ec77c7"
PKG_LICENSE="LGPL"
PKG_SITE="https://freebsoft.org/speechd"
PKG_URL="https://github.com/brailcom/speechd/releases/download/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain glib dotconf libsndfile libpthread-stubs alsa-lib pulseaudio"
PKG_LONGDESC="Common high-level interface to SS"
PKG_TOOLCHAIN="autotools"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes"
post_unpack() {
find "${PKG_BUILD}" -name "*" -type f -exec sed -i 's:g_strdup_printf("%s/../libexec/speech-dispatcher-modules", user_data_dir);:g_strdup_printf("%s/modules", SpeechdOptions.runtime_speechd_dir);:g' {} \;
}
post_makeinstall_target() {
cp -a $PKG_DIR/locale $INSTALL/usr/lib/
}
Display More
Thanks for any help.
Edit: I have more information.
The problem seems to be related to this fragment of code:
#if GLIB_VERSION_CUR_STABLE >= G_ENCODE_VERSION(2, 68)
playback_queue_entry->data.audio.track.samples = g_memdup2(track->samples, nbytes);
#else
playback_queue_entry->data.audio.track.samples = g_memdup(track->samples, nbytes);
#endif
For some reason, it detects that GLib version is greater than 2.68, even if Glib's included with LibreELEC 10 is 2.67.2.