Menu

SWIG csharp: undefined symbol: ps_args

Help
2017-08-15
2017-08-16
  • Jenni Correra

    Jenni Correra - 2017-08-15

    Guys, help

    I'm trying to build a wrapper from the sources for c#, but I get an error when running test.exe: undefined symbol: ps_args

    My sequence of steps:
    1) git clone latest sources from sphinxbase and pocketsphinx repositories
    2) open in bash pocketsphinx\swig\csharp directory
    3) make
    4) Error on step mono test.exe: undefined symbol: ps_args

    I also tried the solution described here: https://sourceforge.net/p/cmusphinx/discussion/help/thread/cc2c56ee/ So I checked what I havn't sphinx libs in /usr/lib folder, it's seems like I have copy only in usr/local/lib

    What's wrong?

     

    Last edit: Jenni Correra 2017-08-15
    • Nickolay V. Shmyrev

      You probably did not setup pocketsphinx correctly (you did not define the variables LD_LIBRARY_PATH and PKG_CONFIG_PATH). You need to go through tutorial first

      http://cmusphinx.github.io/wiki/tutorialpocketsphinx

       
  • Jenni Correra

    Jenni Correra - 2017-08-15

    I tried it, but it's still not work. Anyway, I checked ld.so.conf.d and my system already use usr/local/lib directory also I runed ldconfig.

    And, pocketsphinx_continuous works fine, so as far as I understand there are no problems with libraries

     
    • Nickolay V. Shmyrev

      You have problem at compile time. You need to check pkg-config, not ld.so.conf.

       
      • Jenni Correra

        Jenni Correra - 2017-08-15

        I checked it too:
        $echo $PKG_CONFIG_PATH
        /usr/local/lib/pkgconfig

         
        • Nickolay V. Shmyrev

          Ok, run make once again and provide the complete output

           
          • Jenni Correra

            Jenni Correra - 2017-08-16

            Thank you, my full output in, wrapper make in the end

             
            • Nickolay V. Shmyrev

              Ok, run

              ldd /home/stasisx/Sphinx/pocketsphinx/swig/csharp/libpocketsphinxwrap.so
              

              and provide the output.

               
              • Jenni Correra

                Jenni Correra - 2017-08-16
                    linux-vdso.so.1 =>  (0x00007ffe90da9000)
                    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f689ce38000)
                    /lib64/ld-linux-x86-64.so.2 (0x000055d433231000)
                
                 
              • Jenni Correra

                Jenni Correra - 2017-08-17

                Okay, it's funny - I checked in the clean Linux Mint, which I'm using at the moment, and my problem was repeated again, and then for interest, I checked in a clean Debian Linux and it works!

                 

                Last edit: Jenni Correra 2017-08-19
              • Jenni Correra

                Jenni Correra - 2017-08-19

                However, after several days of research and reading the manuals, I found out that the wrapper works when I preload libraries by this:

                export LD_PRELOAD=/usr/local/lib/libsphinxbase.so:/usr/local/lib/libpocketsphinx.so:/usr/local/lib/libsphinxad.so:$LD_PRELOAD
                

                However, I have not yet understood why the set of LD_LIBRARY_PATH does not work, so I will very glad if somebody explain me

                 
                • Nickolay V. Shmyrev

                  LD_LIBRARY_PATH does not work because library is not linked during compilation. pkg-config --libs pocketsphinx output does not list proper libraries. Maybe because pocketsphinx.pc file is corrupted somehow. You can check the file contents and pkg-config output as required by pocketsphinx tutorial.

                   

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.