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.
...全文
162 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,025

社区成员

发帖
与我相关
我的任务
社区描述
Linux /Unix kernel支持不同的硬件体系,X86, ARM, MIPS, 等等
社区管理员
  • CPU和硬件区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧