Menu

Symbian compilation

Help
2010-09-03
2012-09-22
  • Edwin Miguel Triana

    Hi People,
    I've been trying to compile pocketsphinx for symbian, but I've had some
    problems, I hope somebody can help me. I have instaled Carbide 2.3.0 and Nokia
    3 SDK in Windows XP, I downloaded the pocketsphinx 0.6.1 and the sphinxbase
    0.6.1 and I put in the same folder renaming to their original names
    (sphinxbase and pocketsphinx), then from Carbide I imported the project using
    the bld files in the group folder, then I tried to compile both and I got the
    following errors:

    • undefined identifier 'snd_pcm_t' ad.h /sphinxbase/include line 258 C/C++
    • the file 'alsa/asoundlib.h' cannot be opened ad.h /sphinxbase/include line 128
      These are the sphinxbase errors, pocketsphinx has too much errors, but I think
      I must correct the sphinxbase first.

    Also in the nmp file there the line "USERINCLUDE ..\include ..\include\s60"
    but such folder doesn't exist anymore...

    Can anybody give a hand? I know that currently symbian building is broken and
    out of date, but I would like to fix it with your help.

    Thanks in advance for your help.

     
  • Nickolay V. Shmyrev

    I think all your problems are caused by the fact you took the release, not the
    subversion snapshot. I suggest you to download the snapshot from subversion or
    checkout it with svn.

    It should compile fine. File include/s60 should be present there and should
    configure everything as required

     
  • Edwin Miguel Triana

    Hi Nickolay, thanks a lot for your response,
    I downloaded today the sphinxbase svn snapshop version, the "s60" is there,
    so, I tried to compile sphinxbase and I got several errors related with the
    file.h include. I added a SYSTEMINCLUDE to the mmp file
    (\epoc32\include\libc), then the error were reduced to 3. I executed the
    autogen.sh file from a linux machine and the I used the same files in the
    windows machine, can I do that? or is better to do all in windows?.

    The error messages ar the following:

    In file included from /sphinx/sphinxbase/src/libsphinxbase/util/mmio.c:65:
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:88: error: syntax error before "mode_t"
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:88: warning: useless keyword or type name in empty declaration
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:88: warning: empty declaration
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:93: error: syntax error before "off_t"
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:93: warning: useless keyword or type name in empty declaration
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:93: warning: empty declaration
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:98: error: syntax error before "size_t"
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:98: warning: useless keyword or type name in empty declaration
    /Nokia/devices/Nokia_Symbian3_SDK_v0.8/epoc32/include/stdapis/sys/mman.h:98: warning: empty declaration
    

    Thanks a lot for you help again!

     
  • Edwin Miguel Triana

    Hi again,

    Following the last post, the errors are from the same file where the first
    error was generated. I checked the file (mmio.c) and I found the "file.h"
    includes a file that references to "sys/_types.h" (from libc), but also in the
    mmio.c there is a mman.h that includes "sys/_types.h", but it must be from
    stdapis, but as before it has been included a file with the same name from
    libc, so that could generate the errors.

    Do you think that it can be the reason of the compilation errors?

    Thanks again!

     
  • Nickolay V. Shmyrev

    You clearly have include conflict where one pack of includes conflicts with
    another folder. I think it's caused by

    I added a SYSTEMINCLUDE to the mmp file (\epoc32\include\libc), then the
    error were reduced to 3.

    I think it was wrong decision to do that. You must likely needed to include
    only stdapis version not libc.

     
  • Nickolay V. Shmyrev

    And wanted to note that I updated 0.6 package which might be easier to compile
    that snapshot. Release now include s60 as well.

     
  • Edwin Miguel Triana

    Hi Nickolay,
    I did some configurations, but I'm still getting errors during compilation.
    The following is the log what I did:

    Copied file.h to stdapis (Recomendation Nokia forum)
    - Result: ad.h no such file or directory

    Added USERINCLUDE ..\include\sphinxbase
    - Result: e32srv.h, controller.h, port.h no such file or directory

    Added SYSTEMINCLUDE \epoc32\include\platform
    - Result: 919 errors, functions apparently aren't there, but I can access them

    Creation Time   Description Resource    Path    Location    Type
    1284042734012   undefined reference to `CleanupStack::PushL(void*)' ad_s60.cpp  /sphinxbase/src/libsphinxad line 171    C/C++ Problem
    1284042734014   undefined reference to `RDebug::Print(TRefByValue<TDesC16 const>, ...)' ad_s60.cpp  /sphinxbase/src/libsphinxad line 186    C/C++ Problem
    1284042734019   undefined reference to `RFastLock::Signal()'    ad_s60.cpp  /sphinxbase/src/libsphinxad line 218    C/C++ Problem
    1284042734037   undefined reference to `User::Invariant()'  ad_s60.cpp  /sphinxbase/src/libsphinxad line 262    C/C++ Problem
    1284042733635   undefined reference to `fprintf'    bio.c   /sphinxbase/src/libsphinxbase/util  line 142    C/C++ Problem
    1284042733637   undefined reference to `fflush' bio.c   /sphinxbase/src/libsphinxbase/util  line 144    C/C++ Problem
    1284042733640   undefined reference to `fprintf'    bio.c   /sphinxbase/src/libsphinxbase/util  line 161    C/C++ Problem
    1284042733647   undefined reference to `fgets'  bio.c   /sphinxbase/src/libsphinxbase/util  line 206    C/C++ Problem
    1284042733648   undefined reference to `sscanf' bio.c   /sphinxbase/src/libsphinxbase/util  line 212    C/C++ Problem
    1284042733649   undefined reference to `strcmp' bio.c   /sphinxbase/src/libsphinxbase/util  line 216    C/C++ Problem
    

    Target type changed to STDDLL UID 0x20004C45 0xe000acd4
    - Result: 77 errors, functions apparently aren't there, but I can access them

    Creation Time   Description Resource    Path    Location    Type
    1284043503947   undefined reference to `CMdaAudioInputStream::NewL(MMdaAudioInputStreamCallback&, int, int)'    ad_s60.cpp  /sphinxbase/src/libsphinxad line 288    C/C++ Problem
    1284043503951   undefined reference to `CMdaAudioInputStream::SetGain(int)' ad_s60.cpp  /sphinxbase/src/libsphinxad line 309    C/C++ Problem
    1284043503892   undefined reference to `pthread_once'   err.c   /sphinxbase/src/libsphinxbase/util  line 97 C/C++ Problem
    1284043503895   undefined reference to `sqrt'   f2c_lite.c  /sphinxbase/src/libsphinxbase/util  line 69 C/C++ Problem
    1284043503900   undefined reference to `sqrt'   f2c_lite.c  /sphinxbase/src/libsphinxbase/util  line 462    C/C++ Problem
    1284043503886   undefined reference to `cos'    fe_sigproc.c    /sphinxbase/src/libsphinxbase/fe    line 659    C/C++ Problem
    1284043503904   undefined reference to `log'    logmath.c   /sphinxbase/src/libsphinxbase/util  line 101    C/C++ Problem
    1284043503919   undefined reference to `pthread_mutex_lock' sbthread.c  /sphinxbase/src/libsphinxbase/util  line 484    C/C++ Problem
    1284043503935   undefined reference to `pthread_mutex_lock' sbthread.c  /sphinxbase/src/libsphinxbase/util  line 644    C/C++ Problem
    1284043503941   undefined reference to `pthread_mutex_trylock'  sbthread.c  /sphinxbase/src/libsphinxbase/util  line 686    C/C++ Problem
    

    I downloaded the sphinxbase 0.6.1, all these procedures were done on this
    version.

    Thanks a lot for your help again!

     
  • Edwin Miguel Triana

    Hi again,
    I added that two libraries and also mediaclientaudioinputstream.lib and
    mediaclientaudiostream.lib, now I have 2 errors. I don't know where can I find
    the getrusage function

    Creation Time Description Resource Path Location Type
    1284049129622 undefined reference to getrusage' profile.c /sphinxbase/src/libsphinxbase/util line 187 C/C++ Problem 1284049129623 undefined reference togetrusage' profile.c
    /sphinxbase/src/libsphinxbase/util line 223 C/C++ Problem

    Thanks!

     
  • Nickolay V. Shmyrev

    Great, you are very close!

    getrusage is supposed to be present on your platform. If not, try to modify
    the sources at

    libsphinxbase/util/profile.c

    try to comment out the function for example. It's not critical functionality

     
  • Edwin Miguel Triana

    ***Build Complete!!!!
    I got the sphinxbase compiled, I added a couple of (! defined(SYMBIAN32)
    in the profile.c and configured other thing in the mmp
    Now I'm going to compile the pocketsphinx!
    Thanks a lot!

     
  • Nickolay V. Shmyrev

    Nice, I hope you'll share your files after that so we could update the code to
    make it build from scratch.

     
  • Edwin Miguel Triana

    Sure! I will share the files when I compile all correctly.

    Now I was working in the pocketsphinx, I found my first two problems:

    ..\src\libpocketsphinx\fsg_lextree.c:116: illegal operands 'struct trans_list_s *' + 'int'
    ..\src\libpocketsphinx\fsg_lextree.c:162: 'null_trans' is not a member of class 'struct fsg_model_s'
    

    I looked in the fsg_model.h and there are no the null_trans member...

    What do you think?

    I'm working with the 0.6.1 version

    Thanks!

     
  • Nickolay V. Shmyrev

    This field is there in 0.6.1 but not in the trunk. Probably you somehow trying
    to compile old pocketsphinx with new sphinxbase. That will not work. Try
    either new sphinxbase with new pocketsphinx or old sphinxbase with old
    pocketsphinx.

     
  • Edwin Miguel Triana

    Hi Nickolay,
    The sphinxbase and pocketsphinx are compiling for Symbian using GCCE!
    I used the svn version, now I'm going to start doing a program to use
    pocketsphinx.
    About the modifications, do you want I send you a diff file with my
    modifications, or is it better to have an example running to verify that all
    is ok?
    Thanks

     
  • Nickolay V. Shmyrev

    Send me the diff please.

     
  • Nickolay V. Shmyrev

    And if you have example that would be also cool!

     

Log in to post a comment.