malthe / google-protobuf

Protocol Buffers - Google's data interchange format
Other
13 stars 9 forks source link

can not install the C++ backend for the protobuf Python library #2

Open TigerWang opened 10 years ago

TigerWang commented 10 years ago

3.13.5-200.fc20.x86_64 gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) python 3.4.0rc2


[tiger@adam python]$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp [tiger@adam python]$ python setup.py build Using EXPERIMENTAL C++ Implmenetation. running build running build_py running build_ext building 'google.protobuf.internal._net_proto2___python' extension gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/local/include/python3.4m -c google/protobuf/pyext/python_descriptor.cc -o build/temp.linux-x86_64-3.4/google/protobuf/pyext/python_descriptor.o cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default] google/protobuf/pyext/pythondescriptor.cc:93:1: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] }; ^ google/protobuf/pyext/pythondescriptor.cc:93:1: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] google/protobuf/pyext/pythondescriptor.cc:93:1: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] google/protobuf/pyext/pythondescriptor.cc:93:1: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] google/protobuf/pyext/pythondescriptor.cc:93:1: warning: deprecated conversion from string constant to 'char' [-Wwrite-strings] google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'char' to 'Py_ssize_t {aka long int}' [-fpermissive] }; ^ google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'destructor {aka void ()(object)}' to 'printfunc {aka int (_)(object, _IOFILE, int)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'long unsigned int' to 'const char' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:138:1: error: cannot convert 'char' to 'traverseproc {aka int (_)(object, int (_)(object, void), void)}' in initialization google/protobuf/pyext/pythondescriptor.cc:138:1: error: cannot convert 'PyGetSetDef' to 'typeobject' in initialization google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'PyObject ()(PyTypeObject, Py_ssize_t) {aka object* ()(typeobject, long int)}' to 'newfunc {aka object* ()(typeobject, object, object)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'PyObject* ()(PyTypeObject, PyObject, PyObject_) {aka object* ()(typeobject, object, object)}' to 'freefunc {aka void ()(void)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:138:1: error: invalid conversion from 'void ()(void)' to 'inquiry {aka int ()(object)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc: In function 'void google::protobuf::python::CFieldDescriptorDealloc(google::protobuf::python::CFieldDescriptor)': google/protobuf/pyext/python_descriptor.cc:146:9: error: 'struct google::protobuf::python::CFieldDescriptor' has no member named 'ob_type' self->ob_type->tp_free(reinterpretcast<PyObject>(self)); ^ google/protobuf/pyext/python_descriptor.cc: In function 'PyObject* google::protobuf::python::CDescriptorPoolNewCDescriptor(const google::protobuf::FieldDescriptor)': google/protobuf/pyext/python_descriptor.cc:167:44: error: 'PyString_FromString' was not declared in this scope field_descriptor->full_name().c_str()); ^ google/protobuf/pyext/pythondescriptor.cc: In function 'PyObject google::protobuf::python::CDescriptorPoolFindFieldByName(google::protobuf::python::CDescriptorPool, PyObject_)': google/protobuf/pyext/python_descriptor.cc:178:54: error: 'PyString_AsString' was not declared in this scope const char* full_field_name = PyString_AsString(arg); ^ google/protobuf/pyext/python_descriptor.cc: In function 'PyObject* google::protobuf::python::CDescriptorPoolFindExtensionByName(google::protobuf::python::CDescriptorPool, PyObject_)': google/protobuf/pyext/python_descriptor.cc:199:54: error: 'PyString_AsString' was not declared in this scope const char* full_field_name = PyString_AsString(arg); ^ google/protobuf/pyext/python_descriptor.cc: At global scope: google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'char' to 'Py_ssize_t {aka long int}' [-fpermissive] }; ^ google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'destructor {aka void ()(object)}' to 'printfunc {aka int (_)(object, _IOFILE, int)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'long unsigned int' to 'const char' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:270:1: error: cannot convert 'char' to 'traverseproc {aka int (_)(object, int (_)(object, void), void)}' in initialization google/protobuf/pyext/pythondescriptor.cc:270:1: error: cannot convert 'PyMethodDef' to 'PyMemberDef_' in initialization google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'PyObject* ()(PyTypeObject_, Py_ssize_t) {aka object* ()(typeobject, long int)}' to 'newfunc {aka object* ()(typeobject, object, object)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'PyObject* ()(PyTypeObject, PyObject, PyObject_) {aka object* ()(typeobject, object, object)}' to 'freefunc {aka void ()(void)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc:270:1: error: invalid conversion from 'void ()(void)' to 'inquiry {aka int ()(object)}' [-fpermissive] google/protobuf/pyext/pythondescriptor.cc: In function 'void google::protobuf::python::CDescriptorPoolDealloc(google::protobuf::python::CDescriptorPool)': google/protobuf/pyext/python_descriptor.cc:273:9: error: 'struct google::protobuf::python::CDescriptorPool' has no member named 'ob_type' self->ob_type->tp_free(reinterpretcast<PyObject>(self)); ^ google/protobuf/pyext/python_descriptor.cc: In function 'PyObject* google::protobuf::python::PythonBuildFile(PyObject, PyObject_)': google/protobuf/pyext/python_descriptor.cc:298:64: error: 'PyString_AsStringAndSize' was not declared in this scope if (PyString_AsStringAndSize(arg, &message_type, &message_len) < 0) { ^ error: command 'gcc' failed with exit status 1

xingfeT commented 9 years ago

this package is for python 2.x.