tensorflow 编译报错的问题
勤快の懒猫 2019-10-17 11:24:33 ERROR: /home/yq66/.cache/bazel/_bazel_yq66/d8d45ace9f21a4a14631f99a393477f5/external/protobuf/BUILD:593:1: C++ compilation of rule '@protobuf//:pyext/_message.so' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 57 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::New(PyTypeObject*, PyObject*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:138:46: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
static char* kwlist[] = {"descriptor_db", 0};
^
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindMessageByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:168:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindFileByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:189:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindFieldByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:205:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindExtensionByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:223:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindEnumTypeByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:240:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindOneofByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:257:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindServiceByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:274:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindMethodByName(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:291:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc: In function 'PyObject* google::protobuf::python::cdescriptor_pool::FindFileContainingSymbol(google::protobuf::python::PyDescriptorPool*, PyObject*)':
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:50:45: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
external/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:308:7: note: in expansion of macro 'PyString_AsStringAndSize'
if (PyString_AsStringAndSize(arg, &name, &name_size) < 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.