Installation of simstring module fails

I would like to install the simstring package to roughly search for strings with downloadable source code. So far I've installed packages with easy_install

. This is the first time I try to install a module from the setup file ... and I can't, why?

$ Users/./Downloads/simstring-1.0/swig/python/setup.py.in build_ext --inplace
    running build_ext
    building '_simstring' extension
    g++ -fno-strict-aliasing -I//anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/./Downloads/simstring-1.0/include -I//anaconda/include/python2.7 -c export.cpp -o build/temp.macosx-10.5-x86_64-2.7/export.o
    clang: error: no such file or directory: 'export.cpp'
    clang: error: no input files
    error: command 'g++' failed with exit status 1

      

Edit: 06/23/2015

New attempt at Python 3.4 and new Xcode7. Long list of errors that I am getting. How do I fix the g ++ compiler?

$ python3 setup.py build_ext 
running build_ext
building '_simstring' extension
g++ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/.../Downloads/simstring-1.0/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c export.cpp -o build/temp.macosx-10.6-intel-3.4/export.o
g++ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/.../Downloads/simstring-1.0/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c export_wrap.cpp -o build/temp.macosx-10.6-intel-3.4/export_wrap.o
export_wrap.cpp:883:33: error: use of undeclared identifier 'PyString_AsString'
    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
                                ^
export_wrap.cpp:1274:9: error: use of undeclared identifier 'PyClass_Check'
    if (PyClass_Check(obj)) {
        ^
export_wrap.cpp:1347:24: error: use of undeclared identifier
      'PyString_FromString'
      PyObject *ofmt = PyString_FromString(fmt);
                       ^
export_wrap.cpp:1349:8: error: use of undeclared identifier 'PyString_Format'
        res = PyString_Format(ofmt,args);
              ^
export_wrap.cpp:1379:84: error: use of undeclared identifier 'PyString_AsString'
  ...PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString...
                                                                     ^
export_wrap.cpp:1387:5: error: use of undeclared identifier
      'PyString_ConcatAndDel'; did you mean 'PyBytes_ConcatAndDel'?
    PyString_ConcatAndDel(&repr,nrep);
    ^~~~~~~~~~~~~~~~~~~~~
    PyBytes_ConcatAndDel
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/bytesobject.h:62:18: note: 
      'PyBytes_ConcatAndDel' declared here
PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *);
                 ^
export_wrap.cpp:1401:11: error: use of undeclared identifier 'PyString_AsString'
    fputs(PyString_AsString(repr), fp);
          ^
export_wrap.cpp:1414:5: error: use of undeclared identifier
      'PyString_FromString'
    PyString_FromString(result) : 0;
    ^
export_wrap.cpp:1623:6: error: use of undeclared identifier 'coercion'
    (coercion)0,   /*nb_coerce*/
     ^
export_wrap.cpp:1656:3: error: use of undeclared identifier 'cmpfunc'
        (cmpfunc)PySwigObject_compare,      /* tp_compare */ 
         ^
export_wrap.cpp:1703:23: error: no member named 'ob_type' in '_typeobject'
    pyswigobject_type.ob_type = &PyType_Type;
    ~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1752:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
           ^
export_wrap.cpp:1754:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
           ^
export_wrap.cpp:1763:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("%s%s", result, v->ty->name);
           ^
export_wrap.cpp:1765:12: error: use of undeclared identifier
      'PyString_FromString'
    return PyString_FromString(v->ty->name);
           ^
export_wrap.cpp:1819:3: error: use of undeclared identifier 'cmpfunc'
        (cmpfunc)PySwigPacked_compare,      /* tp_compare */    
         ^
export_wrap.cpp:1866:23: error: no member named 'ob_type' in '_typeobject'
    pyswigpacked_type.ob_type = &PyType_Type;
    ~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1911:10: error: use of undeclared identifier
      'PyString_FromString'
  return PyString_FromString("this");
         ^
export_wrap.cpp:1931:9: error: use of undeclared identifier 'PyInstance_Check';
      did you mean 'PySequence_Check'?
    if (PyInstance_Check(pyobj)) {
        ^~~~~~~~~~~~~~~~
        PySequence_Check
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/abstract.h:923:22: note: 
      'PySequence_Check' declared here
     PyAPI_FUNC(int) PySequence_Check(PyObject *o);
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'g++' failed with exit status 1 

      

+3


source to share





All Articles