Giter Site home page Giter Site logo

Comments (25)

liu946 avatar liu946 commented on May 18, 2024

希望能帮忙解决一下编译问题,protobuf是https://github.com/google/protobuf/tree/3.6.x 源码编译安装的。
protoc --version
libprotoc 2.5.0

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

跟系统默认的protobuf冲突了
rm -rf path-of-anyq/build/third_party/brpc
export PATH= path-of-anyq/build/third_party/bin:$PATH
make

from anyq.

liu946 avatar liu946 commented on May 18, 2024

非常感谢 @zhanghan1992 ,不过又出现了连接问题,请您帮忙解决一下,麻烦了,多谢。

....
[100%] Linking CXX executable run_server
third_party/lib/libleveldb.a(table_builder.o):在函数‘leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*)’中:
table_builder.cc:(.text+0x93f):对‘snappy::MaxCompressedLength(unsigned long)’未定义的引用
table_builder.cc:(.text+0x97d):对‘snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)’未定义的引用
third_party/lib/libleveldb.a(format.o):在函数‘leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)’中:
format.cc:(.text+0x4d9):对‘snappy::GetUncompressedLength(char const*, unsigned long, unsigned long*)’未定义的引用
format.cc:(.text+0x5ae):对‘snappy::RawUncompress(char const*, unsigned long, char*)’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [run_server] 错误 1
make[1]: *** [CMakeFiles/run_server.dir/all] 错误 2
make: *** [all] 错误 2

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

这里出错的原因是在安装leveldb的时候,在你的环境里找到了snappy.h的头文件,但没有找到libsnappy.a。

  1. 编译安装snappy,把libsnappy.a的路径加到环境变量LIBRARY_PATH里
  2. 看一下path-of-anyq/build/third_party/leveldb/src/leveldb/build_config.mk文件,如果PLATFORM_LIBS变量里已经包含lsnappy,直接执行'make'继续编译就可以;否则需要 ‘rm -rf path-of-anyq/build/third_party/leveldb path-of-anyq/build/third_party/brpc',然后执行'make'

from anyq.

liu946 avatar liu946 commented on May 18, 2024

还是有点问题,麻烦您再帮忙看一下:

  • build_config.mk 文件
> cat third_party/leveldb/src/leveldb/build_config.mk
SOURCES=db/builder.cc db/c.cc db/dbformat.cc db/db_impl.cc db/db_iter.cc db/dumpfile.cc db/filename.cc db/log_reader.cc db/log_writer.cc db/memtable.cc db/repair.cc db/table_cache.cc db/version_edit.cc db/version_set.cc db/write_batch.cc table/block_builder.cc table/block.cc table/filter_block.cc table/format.cc table/iterator.cc table/merger.cc table/table_builder.cc table/table.cc table/two_level_iterator.cc util/arena.cc util/bloom.cc util/cache.cc util/coding.cc util/comparator.cc util/crc32c.cc util/env.cc util/env_posix.cc util/filter_policy.cc util/hash.cc util/histogram.cc util/logging.cc util/options.cc util/status.cc  port/port_posix.cc port/port_posix_sse.cc
MEMENV_SOURCES=helpers/memenv/memenv.cc
CC=cc
CXX=g++
PLATFORM=OS_LINUX
PLATFORM_LDFLAGS=-pthread
PLATFORM_LIBS= -lsnappy
PLATFORM_CCFLAGS= -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT -DSNAPPY
PLATFORM_CXXFLAGS=-std=c++0x -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT -DSNAPPY
PLATFORM_SSEFLAGS=-msse4.2 -DLEVELDB_PLATFORM_POSIX_SSE
PLATFORM_SHARED_CFLAGS=-fPIC
PLATFORM_SHARED_EXT=so
PLATFORM_SHARED_LDFLAGS=-shared -Wl,-soname -Wl,
PLATFORM_SHARED_VERSIONED=true
  • snappy(yum安装)位置及环境变量
➜  build git:(master) ✗ ls /usr/local/lib64 | grep snappy
libsnappy.a
➜  build git:(master) ✗ echo $LIBRARY_PATH
/usr/lib64:/usr/local/lib64
  • make报错
[100%] Linking CXX executable run_server
third_party/lib/libleveldb.a(table_builder.o):在函数‘leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*)’中:
table_builder.cc:(.text+0x93f):对‘snappy::MaxCompressedLength(unsigned long)’未定义的引用
table_builder.cc:(.text+0x97d):对‘snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)’未定义的引用
third_party/lib/libleveldb.a(format.o):在函数‘leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)’中:
format.cc:(.text+0x4d9):对‘snappy::GetUncompressedLength(char const*, unsigned long, unsigned long*)’未定义的引用
format.cc:(.text+0x5ae):对‘snappy::RawUncompress(char const*, unsigned long, char*)’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [run_server] 错误 1
make[1]: *** [CMakeFiles/run_server.dir/all] 错误 2
make: *** [all] 错误 2

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

1."strings usr/local/lib64/libsnappy.a | grep RawCompress",检查链接不上的符号是否在这个版本的lib里; 检查是否存在usr/lib64/libsnappy.a。存在的话用上面的方法检查/usr/lib64/libsnappy.a。编译时优先从LIBRARY_PATH中写在前面的路径中找lib。
2. 如果上面的检查没问题的话,‘rm -rf path-of-anyq/build/third_party/leveldb path-of-anyq/build/third_party/brpc',然后执行"make"

from anyq.

liu946 avatar liu946 commented on May 18, 2024

非常感谢,按照您的方法检查之后报错如下:

➜  build git:(master) ✗ strings /usr/local/lib64/libsnappy.a | grep RawCompress
_ZN6snappy11RawCompressEPKcmPcPm
_ZN6snappy11RawCompressEPKcmPcPm
_ZN6snappy11RawCompressEPKcmPcPm
➜  build git:(master) ✗ string /usr/lib64/libsnappy.a | grep RawCompress
zsh: string: 未找到命令...
zsh: command not found: string
➜  build git:(master) ✗ strings /usr/lib64/libsnappy.a | grep RawCompress
strings: /usr/lib64/libsnappy.a:无此文件
➜  build git:(master) ✗ rm -fr third_party/leveldb third_party/brpc
➜  build git:(master) ✗ make
-- Configuring done
-- Generating done
-- Build files have been written to: /data/home/liuyang/AnyQ/build
[  1%] Creating directories for 'extern_leveldb'
[  1%] Performing download step for 'extern_leveldb'
正克隆到 'leveldb'...
remote: Counting objects: 2029, done.
remote: Total 2029 (delta 0), reused 0 (delta 0), pack-reused 2029
接收对象中: 100% (2029/2029), 1.13 MiB | 260.00 KiB/s, done.
处理 delta 中: 100% (1369/1369), done.
Note: checking out 'v1.20'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD 目前位于 a53934a... Increase leveldb version to 1.20.
[  1%] No patch step for 'extern_leveldb'
[  2%] No update step for 'extern_leveldb'
[  3%] No configure step for 'extern_leveldb'
[  3%] No build step for 'extern_leveldb'
[  4%] Performing install step for 'extern_leveldb'
/usr/bin/ld: /usr/local/lib64/../lib64/libsnappy.a(snappy.cc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib64/../lib64/libsnappy.a(snappy-sinksource.cc.o): relocation R_X86_64_32S against symbol `_ZTVN6snappy6SourceE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 最后的链结失败: 输出不可表示的节
collect2: 错误:ld 返回 1
make[3]: *** [out-shared/libleveldb.so.1.20] 错误 1
make[2]: *** [third_party/leveldb/src/extern_leveldb-stamp/extern_leveldb-install] 错误 2
make[1]: *** [CMakeFiles/extern_leveldb.dir/all] 错误 2
make: *** [all] 错误 2

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

export CFLAGS="-fPIC"
export CXXFLAGS="-fPIC"
然后重新编译安装snappy

from anyq.

liu946 avatar liu946 commented on May 18, 2024

重新编译后还是出现了之前的报错信息,已经用strings检查过变量名,存在 /usr/local/lib64/libsnappy.a中,报错信息如下:

[100%] Linking CXX executable run_server
third_party/lib/libleveldb.a(table_builder.o):在函数‘leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*)’中:
table_builder.cc:(.text+0x93f):对‘snappy::MaxCompressedLength(unsigned long)’未定义的引用
table_builder.cc:(.text+0x97d):对‘snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)’未定义的引用
third_party/lib/libleveldb.a(format.o):在函数‘leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)’中:
format.cc:(.text+0x4d9):对‘snappy::GetUncompressedLength(char const*, unsigned long, unsigned long*)’未定义的引用
format.cc:(.text+0x5ae):对‘snappy::RawUncompress(char const*, unsigned long, char*)’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [run_server] 错误 1
make[1]: *** [CMakeFiles/run_server.dir/all] 错误 2
make: *** [all] 错误 2

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

你可以先把环境里的snappy.h删掉,然后删除leveldb后重新编译 。编译leveldb时如果在环境里找不到snappy.h会编译不依赖snappy的版本。

from anyq.

liu946 avatar liu946 commented on May 18, 2024

解决了,多谢

from anyq.

zhongyunuestc avatar zhongyunuestc commented on May 18, 2024

config_brpc.sh: 32: config_brpc.sh: realpath: not found
config_brpc.sh: 33: config_brpc.sh: realpath: not found
config_brpc: --headers=HDRPATHS --libs=LIBPATHS must be specified
make[2]: *** [third_party/brpc/src/extern_brpc-stamp/extern_brpc-install] 错误 1
make[1]: *** [CMakeFiles/extern_brpc.dir/all] 错误 2

您好,我也遇到了同样的问题,按照你说的这个方法弄了还是一样的错误,是什么原因呢,谢谢:
跟系统默认的protobuf冲突了
rm -rf path-of-anyq/build/third_party/brpc
export PATH= path-of-anyq/build/third_party/bin:$PATH
make

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

@zhongyunuestc
环境里缺少realpath指令,需要安装realpath。

from anyq.

zhongyunuestc avatar zhongyunuestc commented on May 18, 2024

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

[ 98%] Linking CXX executable run_server
third_party/lib/libleveldb.a(table_builder.o): In function leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*)': table_builder.cc:(.text+0x96f): undefined reference to snappy::MaxCompressedLength(unsigned long)'
table_builder.cc:(.text+0x9ad): undefined reference to snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)' third_party/lib/libleveldb.a(format.o): In function leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)':
format.cc:(.text+0x4d9): undefined reference to snappy::GetUncompressedLength(char const*, unsigned long, unsigned long*)' format.cc:(.text+0x5ae): undefined reference to snappy::RawUncompress(char const*, unsigned long, char*)'
collect2: error: ld returned 1 exit status
make[2]: *** [run_server] Error 1
make[1]: *** [CMakeFiles/run_server.dir/all] Error 2
make: *** [all] Error 2

你好,请问你是怎么删除你环境里的snappy.h呢(怎么找到这个在哪个环境变量下面)

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

@lingdavid

whereis snappy.h

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

@zhanghan1992
十分感谢

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

你好,请问一下,在./run_server之后出现以下内容:
Loaded q2b dic -- num = 172
Loaded strong punc -- num = 5
Loaded word dic -- num(with oov) = 20940
Loaded tag dic -- num = 57
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1023 15:57:19.929847 4083 init.cc:85] 'CUDA' is not supported, Please re-compile with WITH_GPU option
W1023 15:57:19.929895 4083 init.cc:101] 'CUDA' is not supported, Please re-compile with WITH_GPU option
Segmentation fault (core dumped)
这是什么问题啊

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

@lingdavid
用gdb看一下core, 查一下挂在哪里

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

core: No such file or directory
没产生core文件

from anyq.

zhanghan1992 avatar zhanghan1992 commented on May 18, 2024

@lingdavid

ulimit -c unlimited

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

Core was generated by `./run_server'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f3465c83923 in paddle::framework::Executor::CreateVariables(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
(gdb) bt
#0 0x00007f3465c83923 in paddle::framework::Executor::CreateVariables(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
#1 0x00007f3465c83fa9 in paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
#2 0x00007f3465c84d80 in paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
#3 0x00007f3465c23a6f in paddle::inference::LoadPersistables(paddle::framework::Executor*, paddle::framework::Scope*, paddle::framework::ProgramDesc const&, std::string const&, std::string const&) ()
from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
#4 0x00007f3465c2497d in paddle::inference::Load(paddle::framework::Executor*, paddle::framework::Scope*, std::string const&) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so
#5 0x000000000083e583 in lac::MainTagger::init_model (this=this@entry=0x40b07a0, model_path="./example/conf/./wordseg_utf8/model/") at /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lac/src/lac/src/main_tagger.cpp:261
#6 0x000000000083ec9a in lac::MainTagger::create (conf_dir=conf_dir@entry=0x40aea98 "./example/conf/./wordseg_utf8") at /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lac/src/lac/src/main_tagger.cpp:79
#7 0x0000000000836a31 in lac::Lac::create (conf_dir=0x40aea98 "./example/conf/./wordseg_utf8") at /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lac/src/lac/src/lac.cpp:69
#8 0x0000000000833cfb in lac_create (conf_dir=) at /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lac/src/lac/src/ilac.cpp:24
#9 0x00000000007cf2d6 in anyq::WordsegAdapter::load (this=0x40aeaf0, path="./example/conf/./wordseg_utf8", config=...) at /home/ldw/work/Chat_QA/AnyQ-master/src/dict/wordseg_adapter.cpp:29
#10 0x00000000007ccf64 in anyq::DualDictWrapper::reload (this=0x40ae990) at /home/ldw/work/Chat_QA/AnyQ-master/src/dict/dual_dict_wrapper.cpp:72
#11 0x0000000000826a03 in anyq::DictManager::load_dict (this=0x7fff00a22518, conf_path="./example/conf/") at /home/ldw/work/Chat_QA/AnyQ-master/src/dict/dict_manager.cpp:51
#12 0x00000000007e94ec in anyq::HttpServer::init (this=0x7fff00a22480, http_server_conf="./example/conf/anyq_brpc.conf") at /home/ldw/work/Chat_QA/AnyQ-master/src/server/http_server.cpp:52
#13 0x000000000079d5b8 in main (argc=1, argv=0x7fff00a22b58) at /home/ldw/work/Chat_QA/AnyQ-master/demo/run_server.cpp:25

from anyq.

YiLing28 avatar YiLing28 commented on May 18, 2024

@zhanghan1992
gdb ./run_server core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./run_server...done.

warning: exec file is newer than core file.
[New LWP 10062]
[New LWP 10063]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./run_server'.
Program terminated with signal SIGSEGV, Segmentation fault.
_#0 0x00007f3465c83923 in paddle::framework::Executor::CreateVariables(paddle::framework::ProgramDesc const&, paddle::framework::Scope, int) () from /home/ldw/work/Chat_QA/AnyQ-master/build/third_party/lib/libpaddle_fluid.so_*
(gdb) list
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #include <glog/logging.h>
16 #include "server/http_server.h"
17 #include "common/utils.h"
18 #include "common/plugin_header.h"
19
20 int main(int argc, char* argv[]) {

from anyq.

tony-j-shao avatar tony-j-shao commented on May 18, 2024

您好,

我在编译过程中也遇到了liu946类似的protobuf的问题,不过我的protocol版本已经是最新,也试过了提供的解决方法,还是会报错:

protoc --version
libprotoc 3.6.1

我是Ubuntu 16.04, Cuda 9.0 ,Python2.7 tensorflow-gpu 1.5.0

编译错误代码:
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:279:31: error: expected ‘,’ or ‘...’ before string constant
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:281:24: error: ISO C++ forbids declaration of ‘PROTOBUF_RUNTIME_DEPRECATED’ with no type [-fpermissive]
" future release.")
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:281:24: error: expected ‘;’ at end of member declaration
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:279:3: error: ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’ cannot be overloaded
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:206:3: error: with ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:298:31: error: expected identifier before string constant
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:298:31: error: expected ‘,’ or ‘...’ before string constant
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:300:24: error: ISO C++ forbids declaration of ‘PROTOBUF_RUNTIME_DEPRECATED’ with no type [-fpermissive]
" future release.")
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:300:24: error: expected ‘;’ at end of member declaration
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:298:3: error: ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’ cannot be overloaded
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:206:3: error: with ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:302:31: error: expected identifier before string constant
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:302:31: error: expected ‘,’ or ‘...’ before string constant
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:304:24: error: ISO C++ forbids declaration of ‘PROTOBUF_RUNTIME_DEPRECATED’ with no type [-fpermissive]
" future release.")
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:304:24: error: expected ‘;’ at end of member declaration
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:302:3: error: ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’ cannot be overloaded
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:206:3: error: with ‘int tensorflow::OpDef_ArgDef::PROTOBUF_RUNTIME_DEPRECATED(int)’
PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:324:65: error: ‘InternalHelper’ in ‘class google::protobuf::Arena’ does not name a type
template friend class ::google::protobuf::Arena::InternalHelper;
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:366:48: error: expected ‘;’ at end of member declaration
inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:366:54: error: ‘PROTOBUF_FINAL’ does not name a type
inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:369:39: error: expected ‘;’ at end of member declaration
inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:369:45: error: ‘PROTOBUF_FINAL’ does not name a type
inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:380:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:391:31: error: expected ‘;’ at end of member declaration
inline OpDef_AttrDef* New() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:391:37: error: ‘PROTOBUF_FINAL’ does not name a type
inline OpDef_AttrDef* New() const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:395:56: error: expected ‘;’ at end of member declaration
OpDef_AttrDef* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:395:62: error: ‘PROTOBUF_FINAL’ does not name a type
OpDef_AttrDef* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:398:56: error: expected ‘;’ at end of member declaration
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:398:58: error: ‘PROTOBUF_FINAL’ does not name a type
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:399:57: error: expected ‘;’ at end of member declaration
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
^
/home/shao/AnyQ/build/third_party/include/tf/tensorflow/core/framework/op_def.pb.h:399:59: error: ‘PROTOBUF_FINAL’ does not name a type
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
^

from anyq.

ganguagua avatar ganguagua commented on May 18, 2024

跟系统默认的protobuf冲突了
rm -rf path-of-anyq/build/third_party/brpc
export PATH= path-of-anyq/build/third_party/bin:$PATH
make

我这样做了之后还是显示protoc版本低了,tensorflow是1.8.0的包
protoc --version
libprotoc 3.1.0

/mnt/disk1/home/ganshijie/AnyQ_tf/build/third_party/include/tf/tensorflow/core/framework/device_attributes.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^
/mnt/disk1/home/ganshijie/AnyQ_tf/build/third_party/include/tf/tensorflow/core/framework/device_attributes.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
/mnt/disk1/home/ganshijie/AnyQ_tf/build/third_party/include/tf/tensorflow/core/framework/device_attributes.pb.h:14:2: error: #error your headers.
#error your headers.

from anyq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.