Menu

building python _sphinx3 module --- problem

Help
2008-12-31
2012-09-22
  • Ivan Uemlianin

    Ivan Uemlianin - 2008-12-31

    Dear All

    The sphinx3 distribution has a python dorectory which contains a C extension module _sphinx3module.c and a setup.py to build it. When I try to build the module I get this error:

    $ python setup.py build
    
    running build
    running build_ext
    building '_sphinx3' extension
    gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I../../sphinxbase/include -I../include -I/usr/local/include/sphinxbase/ -I/usr/local/include/sphinx3 -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _sphinx3module.c -o build/temp.macosx-10.5-i386-2.5/_sphinx3module.o
    _sphinx3module.c: In function ‘sphinx3_init’:
    _sphinx3module.c:172: error: too few arguments to function ‘s3_decode_init’
    _sphinx3module.c: In function ‘sphinx3_init’:
    _sphinx3module.c:172: error: too few arguments to function ‘s3_decode_init’
    lipo: can't open input file: /var/folders/rA/rAbDT-ImHDSiDKUv+K1vn++++TI/-Tmp-//ccEfMQmI.out (No such file or directory)
    error: command 'gcc' failed with exit status 1
    

    The problem is at line 172 of _sphinx3module.c where the function s3_decode_init() is called with one argument instead of the two required:

    s3_decode_init(&decoder);
    

    The missing argument is a config structure, see src/libs3decoder/libAPI/s3_decode.c line 236:

    int s3_decode_init(s3_decode_t * _decode, cmd_ln_t *_config)
    

    Has this problem been fixed? In other words, is there a _sphinx3module.c available which calls s3_decode_init() correctly?

    If not, I shall attempt to correct _sphinx3module.c myself. Can anyone point me to a declaration for cmd_ln_t and/or offer any advice on making the necessary changes? If I am successful I shall make the corrected files available here.

    Thanks in advance and best wishes (and Happy New Year!)

    Ivan

     
    • Ivan Uemlianin

      Ivan Uemlianin - 2009-01-02

      Thanks! I'm downloading it now and I'll give it a go.

      Ivan

       
    • Ivan Uemlianin

      Ivan Uemlianin - 2009-01-02

      Dear Nikolai

      Thanks for your help. I've installed sphinx-3.08 and things seem better.

      I'm running it on MacOSX and I got a couple of warnings from ld (see the ld: warning lines below):

      $ python setup.py build
      running build
      running build_ext
      building '_sphinx3' extension
      creating build
      creating build/temp.macosx-10.5-i386-2.5
      gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I../../sphinxbase/include -I../include -I/usr/local/include/sphinxbase/ -I/usr/local/include/sphinx3 -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _sphinx3module.c -o build/temp.macosx-10.5-i386-2.5/_sphinx3module.o
      creating build/lib.macosx-10.5-i386-2.5
      gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/_sphinx3module.o -L../../sphinxbase/src/libsphinxbase/.libs -L../src/libs3decoder/.libs -L../../sphinxbase/lib/debug -L../lib/debug -lsphinxbase -ls3decoder -o build/lib.macosx-10.5-i386-2.5/_sphinx3.so
      

      > ld: warning in /usr/local/lib/libsphinxbase.dylib, file is not of required architecture
      > ld: warning in ../src/libs3decoder/.libs/libs3decoder.dylib, file is not of required architecture
      running install_lib
      copying build/lib.macosx-10.5-i386-2.5/_sphinx3.so -> /Library/Python/2.5/site-packages
      running install_egg_info
      Removing /Library/Python/2.5/site-packages/Sphinx3-0.1-py2.5.egg-info
      Writing /Library/Python/2.5/site-packages/Sphinx3-0.1-py2.5.egg-info

      However, the python unit tests in _sphinx3_test.py ran fine.

      So, all seems well. Thanks again!

      Ivan

       
    • Nickolay V. Shmyrev

      Python module is still broken in trunk together with python egg which doesn't work with latest subversion and doesn't allow to install anything properly. So this needs fixing I suppose.

      We have a bug about that.

       
    • Nickolay V. Shmyrev

      Hm, actually python issue was fixed in sphinx3-0.8 branch just today, but the changes were not backported to trunk.

      See

      http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx/branches/sphinx3-0.8/

       

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.