<div dir="ltr"><div>I'm trying to build sphinxbase and pocketsphinx for Sailfish, i could find this topic ( <a href="https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/">https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/</a> ) which involves building non qt apps, but i'm having some problems.<br>
<br></div><div>First of all, i'm using sphinxbase 0.8 and pocketsphinx 0.8 packages which can be downloaded from here ( <a href="http://cmusphinx.sourceforge.net/wiki/download/">http://cmusphinx.sourceforge.net/wiki/download/</a> ). I could build these packages without having to make any modifications to the source code.<br>
</div><div>I'm using these .specs files:<br><br></div><div>sphinixbase.spec:<br>    Name: sphinxbase<br>    Summary: SphinxBase<br>    Version: 0.8<br>    Release: 1<br>    Group: Libraries<br>    License: LICENSE<br>
    URL: <a href="http://example.org/">http://example.org/</a><br>    Source0: %{name}-%{version}.tar.bz2<br><br>    %description<br>    Short description of my SailfishOS Application<br><br>    %prep<br>    %setup -q -n %{name}-%{version}<br>
<br>    %build<br>    # Command used to compile the application<br>    ./autogen.sh --enable-fixed --prefix=/usr/<br>    make<br><br>    %install<br>    rm -rf %{buildroot}<br>    # Command used to install files into %{buildroot}<br>
    %make_install<br><br>    %files<br>    %defattr(-,root,root,-)<br>    %{_bindir}/sphinx*<br>    %{_libdir}/*<br>    %{_libdir}/pkgconfig/*<br>    %{_includedir}/%{name}/*<br></div><div><br></div><div>pocketsphinx.spec:<br>
    Name: pocketsphinx<br>    Summary: PocketSphinx<br>    Version: 0.8<br>    Release: 1<br>    Group: Libraries<br>    License: LICENSE<br>    URL: <a href="http://example.org/">http://example.org/</a><br>    Source0: %{name}-%{version}.tar.bz2<br>
    BuildRequires: pkgconfig(sphinxbase)<br><br>    %description<br>    Short description of my SailfishOS Application<br><br>    %prep<br>    %setup -q -n %{name}-%{version}<br><br>    %build<br>    # Command used to compile the application<br>
    ./autogen.sh --enable-fixed --prefix=/usr/<br>    make<br><br>    %install<br>    rm -rf %{buildroot}<br>    # Command used to install files into %{buildroot}<br>    %make_install<br><br>    %files<br>    %defattr(-,root,root,-)<br>
    %{_bindir}/%{name}*<br>    %{_libdir}/lib*<br>    %{_libdir}/pkgconfig/*<br>    %{_includedir}/%{name}<br>    %{_datadir}/man<br>    %{_datadir}/%{name}<br><br></div><div>Connection to the build engine though ssh, I could build correctly sphinxbase using this command: `mb2 -t SailfishOS-i486 -s sphinxbase.spec build`.<br>
<br></div><div>Then, i tryed to install this package the build engine, but i couldn't:<br>    [mersdk@SailfishSDK sphinxbase-0.8]$ sb2 -t SailfishOS-i486 -m sdk-install -R pkcon install     RPMS/sphinxbase-0.8-1.i586.rpm<br>
    [mersdk@SailfishSDK sphinxbase-0.8]$ sb2 -t SailfishOS-i486 -m sdk-install -R zypper install     ./RPMS/sphinxbase-0.8-1.i586.rpm<br>    Loading repository data...<br>    Reading installed packages...<br>    '_tmpRPMcache_:sphinxbase=0:0.8-1' not found in package names. Trying capabilities.<br>
    No provider of 'sphinxbase = 0:0.8-1' found.<br>    Resolving package dependencies...<br>    <br>    Nothing to do.<br><br></div><div>If then, i try to build pocketsphinx, i can't, since my .spec file has pkgconfig(sphinxbase) in the BuildRequires:<br>
<br>    [mersdk@SailfishSDK sphinxbase-0.8]$ mb2 -t SailfishOS-i486 -s pocketsphinx.spec build<br>    Fatal: 'pocketsphinx.spec' doesn't exist (and could not be made from a yaml)<br><br></div><div>If i comment out the BuildRequires, i'm able to build pocketsphinx with this command: `mb2 -t SailfishOS-i486 -s pocketsphinx.spec build`. Again, trying to install the package to the build engine throws me errors:<br>
    [mersdk@SailfishSDK pocketsphinx-0.8]$ sb2 -t SailfishOS-i486 -m sdk-install -R pkcon install     RPMS/pocketsphinx-0.8-1.i586.rpm<br>    [mersdk@SailfishSDK pocketsphinx-0.8]$ sb2 -t SailfishOS-i486 -m sdk-install -R zypper install ./RPMS/pocketsphinx-0.8-1.i586.rpm<br>
    Loading repository data...<br>    Reading installed packages...<br>    '_tmpRPMcache_:pocketsphinx=0:0.8-1' not found in package names. Trying capabilities.<br>    No provider of 'pocketsphinx = 0:0.8-1' found.<br>
    Resolving package dependencies...<br>    <br>    Nothing to do.<br><br></div><div>As i can't install pocketsphinx nor sphinxbase, i can't build any application using this libraries (if i explore /usr/include, /usr/lib,/usr/lib/pkgconfig, I can't find any sphinx's file).<br>
<br></div><div>If i execute pkg-config, i get this output:<br>    [mersdk@SailfishSDK pocketsphinx-0.8]$ sb2 -t SailfishOS-i486 -m sdk-install -R pkg-config --libs --cflags pocketsphinx<br>    Package pocketsphinx was not found in the pkg-config search path.<br>
    Perhaps you should add the directory containing `pocketsphinx.pc'<br>    to the PKG_CONFIG_PATH environment variable<br>    No package 'pocketsphinx' found<br><br></div><div>Sending the rpm packages to the nemo user and then installing them with `pkcon install-local` gives me a successfull output. In addittion, pkg-config gives me the correct output:<br>
    [nemo@SailfishEmul ~]$ pkg-config --libs --cflags pocketsphinx<br>    -I/usr/include/sphinxbase -I/usr/include/pocketsphinx  -lpocketsphinx -lsphinxbase -lsphinxad -lpthread -lm <br><br></div><div>I'm a bit lost with this, any help?.<br>
Thanks in advance!<br></div><div><br></div><div></div><div><br>-- <br>Nicolas Cisco<br><a href="http://www.nckweb.com.ar" target="_blank">www.nckweb.com.ar</a><br></div>
</div>