Menu

Building Pocketsphinx and Sphinxbase as 32 bit Libraries OSX

Help
2015-06-09
2015-06-10
  • Benjamin Gorman

    Benjamin Gorman - 2015-06-09

    Hey,

    I'm trying to use pocketsphinx in an application which makes use of OpenFrameworks. OpenFrameworks on OSX is a 32 bit library. https://github.com/openframeworks/openFrameworks

    I'm guessing OSX is forcing pocketsphinx and sphinxbase to be compiled as 64 bit by default. So I'm hit with these errors when I try and link them in my Xcode 6 project with OpenFrameworks.

    ~~~~~~~~
    ld: warning: ignoring file /usr/local/lib/libsphinxbase.3.dylib,
    file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libsphinxbase.3.dylib
    ld: warning: ignoring file /usr/local/lib/libsphinxad.3.dylib,
    file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libsphinxad.3.dylib
    ld: warning: ignoring file /usr/local/lib/libpocketsphinx.3.dylib,
    file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpocketsphinx.3.dylib
    ~~~~~~~~~~~

    Without OpenFrameworks linked everything works fine, so I know I have installed the sphinx libs correctly.

    So my question is how can I build sphinxbase and pocketsphinx as 32 bit libs on OSX and is this possible?

     

    Last edit: Benjamin Gorman 2015-06-09
    • Nickolay V. Shmyrev

      Run

        make clean
        make CFLAGS="-g -O2 -m32" install
      

      It should install i386.

      You can add other required flags to CFLAGS.

       
  • Benjamin Gorman

    Benjamin Gorman - 2015-06-10

    Perfect! Thanks!

    Should this maybe be added to the tutorial?

     

    Last edit: Benjamin Gorman 2015-06-10

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.