Posts by nuive

    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:

    Code
    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:

    Thanks for any help.


    Edit: I have more information.

    The problem seems to be related to this fragment of code:

    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.

    Hi,

    I've bought the August Freeview DVB-T202 receiver for my Raspberry Pi model 3, and I have a strange problem with TVHeadend and LibreELEC 9.2.8 (I'm using this version because it is the latest stable).

    The DVB-T receiver works flawlessly, I can get all the services, map them, watch TV... all is correct until I have to reboot or shutdown the Pi. When powering it on again, the TVHeadend Server says there's no adapter available. I thought it was being disabled but it doesn't show into the adapters list. When I disconnect and connect the adapter from the Raspberry it starts working immediately until I power off or reboot.

    The strange thing is that when I reboot the Pi, even if TVHeadend says there's no adapter, the lsusb command shows the following:

    Code
    Bus 001 Device 006: ID 1997:2433
    Bus 001 Device 004: ID 048d:9006 Integrated Technology Express, Inc. IT9135 BDA Afatech DVB-T HDTV Dongle
    Bus 001 Device 005: ID 0781:5590 SanDisk Corp. Ultra Dual
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    As you can see, the second device is the DVB-T receiver. I tried making a "systemctl stop service.tvheadend42" followed by a "systemctl start service.tvheadend42" with same result.

    I tried with the different DVB module drivers but same result. Until now, the only solution I've found is unplug and plug the DVB-T receiver everytime I have to reboot/shut down the Pi, and this is a bit tedious.

    Is there any solution available?

    Thanks!

    I wouldn’t create it as a custom image. As an addon, with a little bit of patching or sed. The addon can be made to work right. It is all done by the build scripts.

    One I have been looking at recently is net-snmp (so DATADIR would be replaced as below)

    https://github.com/LibreELEC/Libr…/package.mk#L42

    Yes, my case is exactly the same as this. Configuring the package like that will solve the problem. What I didn't know was if this was right for a LibreELEC addon or if there was a better way to create it.

    Thanks for the answers and the example.

    Yes, I though on this solution. However, the problem here is that the media file's path is hardcoded into the main program pointing to "/usr/share/appname/myfile.wav" or whatever DATADIR is specified when running the ./configure command. As I understand this, hardcoding paths like that is a bad practice. However, the source code has at least 50 files and not playing this media file is the smaller problem we'll find related to hardcoded paths.

    I supose the best option here is look for an alternative or create a custom LibreELEC build with this application added into the image.

    Hi all,

    I'm trying to create a Kodi Addon which is an application which binaries have some direct references to files located on the /usr folder, for example:

    -The original application wants to play a wav file which on an Ubuntu distribution is located at "/usr/share/appname/myfile.wav".

    -Looking into the app's code, I can see something like audio.play(DATADIR + "/myfile.wav") and the DATADIR variable can be customized when configuring the build (default value is "/usr/local/appname").

    And there's the question: I want to add this myfile.wav to the addon, for example on a folder called audio, so the final location would be "$ADDON_FOLDER_PATH/audio/myfile.wav".

    I supose the only way to make this work is by telling the configure command "DATADIR=/storage/.kodi/addons/appname". However, this seems wrong. If I make this, the addon would only run on LibreELEC and if it's located at ~/.kodi/addons (it won't work, for example, if I decided to make a LibreELEC build with this addon added to the base image).

    Is there any way to solve this issue, or I have to work with these limitations?

    Thanks in advance!

    Hi,


    I'm trying to add a package to LibreELEC, the eSpeak-NG TTS from https://github.com/espeak-ng/espeak-ng. Following the build steps from GitHub and after some modifications, I finished creating this package.mk file:


    If I add this package to LibreELEC 10.0 it builds and works flawlessly. However, same package on LibreELEC 11.0 gives the following error when building for the target step (building for host works without problems):

    I tried removing the "-B" option from the make target steps and without this option, it builds flawlessly on all versions, but when trying to execute the espeak-ng command on any LibreELEC 11, it freezes the terminal until you press CTRL+C to kill the process.


    I know the "-B" option only forces Make to rebuild all targets, and it shouldn't be necesary on LibreELEC because it builds host and target executables on different folders. However, it seems strange that when executing the build process with the "-B" parameter, it doesn't work on LE11, and if I remove it it builds but crashes when running... any idea why is this happening?


    Thanks!

    This is not working as expected, see packages/readme.mk:


    I suposed that and I didn't understand why it was put there, but as it was in the original pacakge.mk of espeak, I didn't deleted it. The package is built propperly without that variables.

    Finally I solved this.

    As you say, espeak:host was wrong. The problem was in the makeinstall_target step, the command to install the library to the sysroot folder was missing, and that step was innecesary.

    If someone has a similar problem, here is the definitive package.mk for espeak:

    Cheers

    Hi,

    I'm having new questions regarding all of this. I don't know if I should create a new thread, so sorry if I should.

    Speech Dispatcher needs to have a defined locale (if it hasn't it throws an exception of 'setlocale: no such file or directory') so I did the following:

    1. In the Speech Dispatcher package directory I added a folder called locale, with files for an en_GB.UTF-8 locale.

    2. I edited the package.mk so on the post_makeinstall step it copies the locale folder into /usr/lib.

    3. I created as well another folder inside the package, profile.d, and inside this folder I added the file 10-locale.conf with the following content:

    Code
    export $LANG="en_GB.UTF-8"

    I built the image and it worked flawlessly, Speech Dispatcher included.

    However, I found that my 10-locale.conf would override any change made to the $LANG variable if, for example, the service.locale addon was installed, because the profile.d sets the addon profile variables before any other.

    So I edited the 10-locale.conf file and added a check:

    Code
    if [ -z "$LANG" ] ; then
    export LANG="en_GB.UTF-8"
    fi

    But now, even if the LANG variable returns "en_GB.UTF-8" when you do "echo $LANG" and the 'locale' command returns the correct values, Speech Dispatcher is giving me again the 'setlocale' error.

    Does anyone know why is this happening?

    Actually, eSpeak builds a library (libespeak.so) used by Speech Dispatcher, but it builds a static library too (.a file) and a header (speak_lib.h) which are needed to build the eSpeak module into Speech Dispatcher.

    Here is the package.mk for eSpeak:

    --------------------

    --------------------

    I've tried with espeak:host and with espeak, but in any case it throws the same error.

    Hi again,

    I'm having a new problem related to the addition of Speech Dispatcher.

    When building it, it checks for additional Voice TTSs and if it finds them, it adds the respective modules.

    I'm trying to generate the eSpeak Module, but it needs the espeak library for the process, so I added espeak:host as a dependency.

    The eSpeak package wasn't able to generate host builds, so I edited it and could add the eSpeak libraries and include headers to the toolchain. However, when trying to build Speech Dispatcher with espeak support it says that file <espeak/speak_lib.h> does not exist, but the file speak_lib.h is inside $TOOLCHAIN/include/espeak.

    It seems that the build process is ignoring the toolchain paths, even if toolchain is in the package.mk as a target dependency.

    My current package.mk:

    --------------------

    --------------------

    Thanks, it worked. Finally I could add the dotconf library to LibreELEC.

    Now I'm having another problem with the main package (Speech dispatcher).

    --------------------

    Code
    PKG_NAME="speech-dispatcher"
    PKG_VERSION="0.10.2"
    PKG_SHA256="b06319f201e15e56c6296653af5bcfc300cb348e972d517df8b06eac77eae2dc"
    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 libtool"
    PKG_LONGDESC="Common high-level interface to tts"
    PKG_TOOLCHAIN="autotools"

    --------------------

    The autoreconf and ./configure stages work flawlessly, but when building it gives the following error:

    speech_dispatcher-symbols.o:symbols.c:function insert_symbols: error: undefined reference to 'rpl_malloc'

    Looking on google I've found that it is a problem with the ./configure script, which replaces the malloc function with rpl_malloc when it doesn't find the malloc function. But unless I'm mistaken, the malloc function is a system one. However, in configure.log I have:

    configure:15893: checking for GNU libc compatible malloc

    configure:15927: result: no

    ...

    | #define HAVE_MALLOC 0

    | #define malloc rpl_malloc

    Am I missing something in order to access the rpl_malloc function, or to make the configure script be able to detect the malloc function propperly?

    Thank you very much!

    Yes, it helped a lot.

    Now I'm having another problem... I'm adding the needed dotconf library. At the momment I have this package.mk (it is not completed)

    --------------------

    When trying to build it for the Raspberry Pi with the command:

    PROJECT=RPi ARCH=arm DEVICE=RPi2 scripts/build dotconf

    I get (on the ./configure step):

    configure: error: cannot run C compiled programs.

    If you meant to cross compile, use `--host'.

    See `config.log' for more details

    How can I add the host variable to package.mk? What am I missing?

    Hi,

    I'm trying to add Speech Dispatcher (Speech Dispatcher - Free(B)Soft), module for TexToSpeech.

    I know that it won't be an easy module to add (it depends on some libraries, for building and for running). At the momment I have this:

    --------------------

    Code
    PKG_NAME="speech-dispatcher"
    PKG_VERSION="0.10.2"
    PKG_SHA256="b06319f201e15e56c6296653af5bcfc300cb348e972d517df8b06eac77eae2dc"
    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"
    PKG_LONGDESC="Common high-level interface to TTS"

    --------------------

    The dotconf dependency is between () because it is not present on libreELEC, so I will have to add that package too.

    Basically what I don't understand is what libraries I should add on PKG_DEPENDS_TARGET, PKG_DEPENDS_HOST... and which of them (if any) should be followed with the :[host|target|...] argument.

    Hi there,

    I'm working on a customized image of LibreELEC 9.2.6 (for x86 and Raspberry Pi 3) and I need to add an application to the system which can't be added through Kodi Addons, so I'm creating a package.mk in order to get the App added on buildtime.

    However, I have some questions regarding package.mk and dependencies, and I didn't find answers anywhere.

    using the glib package.mk as an example, we have:

    ...

    PKG_DEPENDS_HOST="libffi:host Python3:host meson:host"

    PKG_DEPENDS_TARGET="toolchain pcre zlib libffi Python3:host util-linux"

    ...

    I do not fully understand what are all this PKG_DEPENDS_* for. Looking at the build script, I've seen that you can specify to build a package like:

    PROJECT=RPi DEVICE=RPi2 ARCH=arm scripts/build glib

    Or

    PROJECT=RPi DEVICE=RPi2 ARCH=arm scripts/build glib:host

    I supose for the glib:host it uses as dependencies the PKG_DEPENDS_HOST variable, if I build glib:target it uses PKG_DEPENDS_TARGET... but my question is, what is this argument (:[host|bootstrap|init|target]) for? If I only make a normal build (without this argument) what libraries variable from the package.mk will it use?

    And another question:

    PKG_DEPENDS_TARGET="toolchain pcre zlib libffi Python3:host util-linux"

    Here is a list of libraries needed to build glib. Why in the python3 one it says Python3:host and not Python3? What is the meaning of ":host" in this case?

    Cheers!