Comments (12)
编译srpc需要依赖workflow作为third_party。请问git clone https://github.com/sogou/srpc.git
时是否有带上--recursive
呢?
如果已经clone完了,可以通过执行命令:git submodule update --init --recursive
初始化刚才没有拉下来的third_party,然后再试试~
有什么进展欢迎反馈,谢谢~
from srpc.
我下载的时候带着--recursive
Add the installation prefix of "Workflow" to CMAKE_PREFIX_PATH or set
"Workflow_DIR" to a directory containing one of the above files. If
"Workflow" provides a separate development package or SDK, be sure it has
been installed.
from srpc.
1、你执行make的路径是在srpc根目录吗?
2、cd workflow
看看里边有东西么?
from srpc.
我试了一下,如果没有--recursive拉代码的话,确实会有找不到third_party的错误,比如我这里会:
CMake Error at src/CMakeLists.txt:41 (find_package):
Could not find a package configuration file provided by "Snappy" (requested
version 1.1.6) with any of the following names:
SnappyConfig.cmake
snappy-config.cmake
Add the installation prefix of "Snappy" to CMAKE_PREFIX_PATH or set
"Snappy_DIR" to a directory containing one of the above files. If "Snappy"
provides a separate development package or SDK, be sure it has been
installed.
然后你的报错那行是srpc/src的CMakeLists.txt:find_package(Workflow REQUIRED CONFIG HINTS ../workflow)
也就是说如果srpc/workflow/这个目录下如果有workflow-config.cmake.in,就会生成workflow-config.cmake
所以麻烦确认下srpc根目录下的workflow目录里是否有东西?
from srpc.
linux x86下设置交叉编译环境,完整的错误:
mkdir -p build.cmake
cd build.cmake && cmake /home/barton/holly/srpc
CMake Warning at CMakeLists.txt:45 (find_package):
By not providing "FindSnappy.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Snappy", but
CMake did not find one.
Could not find a package configuration file provided by "Snappy" with any
of the following names:
SnappyConfig.cmake
snappy-config.cmake
Add the installation prefix of "Snappy" to CMAKE_PREFIX_PATH or set
"Snappy_DIR" to a directory containing one of the above files. If "Snappy"
provides a separate development package or SDK, be sure it has been
installed.
CMake Error at src/CMakeLists.txt:33 (find_package):
Could not find a package configuration file provided by "Workflow" with any
of the following names:
WorkflowConfig.cmake
workflow-config.cmake
Add the installation prefix of "Workflow" to CMAKE_PREFIX_PATH or set
"Workflow_DIR" to a directory containing one of the above files. If
"Workflow" provides a separate development package or SDK, be sure it has
been installed.
在cmakelist.txt里面设置set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/third_party/snappy;${CMAKE_SOURCE_DIR}/workflow;${CMAKE_MODULE_PATH}")好像也不行
from srpc.
按说src/CMakeLists.txt里的find_package()里已经制定了HINTS的路径才对。
要不你试试set一下Snappy_DIR和Workflow_DIR,看看ok吗?
from srpc.
本地可以编译过,但是交叉编译有问题。set一下Snappy_DIR和Workflow_DIR好像不起作用。
from srpc.
我们不懂交叉编译,所以还得请你多帮定位
我看workflow的交叉编译有一个小伙伴提过一个PR:https://github.com/sogou/workflow/pull/655/files 虽然现在你已经编译好workflow了,但不知道这个改动有可以参考的地方吗?比如设置CMAKE_FIND_ROOT_PATH这种。
另外问了下GPT,基本也是建议改这两个:
cmake -DCMAKE_PREFIX_PATH=/path/to/cross/toolchain ..
或者
set(Workflow_DIR "/path/to/cross/toolchain/lib/cmake/Workflow")
find_package(Workflow REQUIRED CONFIG)
要么是否可以先安装workflow、snappy、lz4,然后再编译srpc,从系统里找依赖?
from srpc.
非常感谢你们这边及时的回答,我这边再排查一下cmake的执行流程,看看哪里有问题。
from srpc.
好的,有任何进展欢迎反馈,感谢~
from srpc.
我这边在src/CMakelist.txt里面设置绝对路径:set(Workflow_DIR "/home/barton/holly/srpc/workflow")编译通过了,另外请问一下这个srpc怎么切换是brpc还是Thrift 这种有文档说明么?我们想用在嵌入式设备上
from srpc.
太好了~
关于收发协议,可以参考这两个文档:
https://github.com/sogou/srpc/blob/master/docs/docs-03-server.md
https://github.com/sogou/srpc/blob/master/docs/docs-04-client.md
比如你在文档里看到SRPCServer/SRPCClient,那就是SRPC协议+protobuf,如果你是用BRPCServer/BRPCClient,那么就是brpc,如此类推。你可以把tutorial编译出来,有各个协议对应的写法和示例可以run~
from srpc.
Related Issues (20)
- 请问关于接口的压力测试是使用什么工具做的? HOT 1
- Thrift 多参数支持 HOT 2
- Thrift Union 支持 HOT 4
- srpc 编译错误 HOT 2
- srpc在C++20的编译问题 HOT 3
- SRPC可以直接使用Consul的服务注册与发现
- srpc 在编译tutorial的报错 HOT 2
- Windows环境内存增涨问题 HOT 19
- 希望可以增加websocket的支持 HOT 1
- 支持UNIX Domain socket吗? HOT 8
- client端访问status code 103 HOT 1
- vs找不到unistd.h文件 HOT 5
- 关于压缩的问题 HOT 2
- problem HOT 29
- New versions of GTest use C++14 HOT 8
- Have Conan package? HOT 1
- crt detected that the application wrote to memory after end of heap buffer HOT 4
- 🎉 srpc tools: simple generator for building Workflow and SRPC projects
- compile problem HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srpc.