You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/03/05 02:47:04 UTC

[GitHub] [incubator-brpc] 969125987 opened a new issue #1350: brpc + libtorch 编译报错

969125987 opened a new issue #1350:
URL: https://github.com/apache/incubator-brpc/issues/1350


   **Describe the bug (描述bug)**
   server中使用libtorch加载模型,client向server传输图像进行识别。在编译时有以下报错:
   [/usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipInputStream::~GzipInputStream()':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:74: undefined reference to `inflateEnd'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipInputStream::Inflate(int)':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:119: undefined reference to `inflate'
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:91: undefined reference to `inflateInit2_'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipInputStream::Next(void const**, int*)':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:143: undefined reference to `inflateEnd'
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:91: undefined reference to `inflateInit2_'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipOutputStream::Init(google::protobuf::io::ZeroCopyOutputStream*, google::protobuf::io::GzipOutputStream::Options const&)':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:240: undefined reference to `deflateInit2_'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipOutputStream::Deflate(int)':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:265: undefined reference to `deflate'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipOutputStream::Close() [clone .part.0]':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:323: undefined reference to `deflateEnd'
   /usr/local/lib/libprotobuf.a(gzip_stream.o): In function `google::protobuf::io::GzipInputStream::~GzipInputStream()':
   /output/protobuf/src/google/protobuf/io/gzip_stream.cc:74: undefined reference to `inflateEnd'
   collect2: error: ld returned 1 exit status
   CMakeFiles/tps_server.dir/build.make:211: recipe for target 'tps_server' failed
   make[2]: *** [tps_server] Error 1
   CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tps_server.dir/all' failed
   make[1]: *** [CMakeFiles/tps_server.dir/all] Error 2
   Makefile:83: recipe for target 'all' failed
   make: *** [all] Error 2](url)
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   编译成功
   
   **Versions (各种版本)**
   OS:ubuntu18
   Compiler:gcc 7.5
   brpc:0.9.7
   protobuf:3.15.4(编译安装,安装时已经编译了zlib)
   (也试过使用apt的方式安装protobuf 3.0.0,报同样的错误)
   
   **Additional context/screenshots (更多上下文/截图)**
   ![image](https://user-images.githubusercontent.com/42427430/110059881-1249d500-7da0-11eb-9e65-1c2430b1f938.png)
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] woniuasd commented on issue #1350: brpc + libtorch 编译报错

Posted by GitBox <gi...@apache.org>.
woniuasd commented on issue #1350:
URL: https://github.com/apache/incubator-brpc/issues/1350#issuecomment-819164862


   看着像protobuf的版本不对导致的,源码编译安装protobuf一般都是安装到了/usr/local/lib文件夹里面,apt安装默认不是在这个位置,可是尝试源码安装其他版本的的protobuf试试


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org