Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
a3de73f9
Unverified
Commit
a3de73f9
authored
May 03, 2018
by
Ge Jun
Committed by
GitHub
May 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #314 from zyearn/master
mac docs update
parents
8e8fd83d
d24bbe14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
.gitignore
.gitignore
+1
-0
getting_started.md
docs/cn/getting_started.md
+76
-0
No files found.
.gitignore
View file @
a3de73f9
...
...
@@ -11,6 +11,7 @@
*.pb.h
*.prof
*.so
*.dylib
/output
/test/output
...
...
docs/cn/getting_started.md
View file @
a3de73f9
...
...
@@ -8,6 +8,13 @@ brpc depends on following packages:
*
[
protobuf
](
https://github.com/google/protobuf
)
: Serializations of messages, interfaces of services.
*
[
leveldb
](
https://github.com/google/leveldb
)
: Required by
[
/rpcz
](
rpcz.md
)
to record RPCs for tracing.
# Supported Environment
*
[
Ubuntu/LinuxMint/WSL
](
#ubuntulinuxmintwsl
)
*
[
Fedora/CentOS
](
#fedoracentos
)
*
[
Linux with self-built deps
](
#linux-with-self-built-deps
)
*
[
MacOS
](
#macos
)
## Ubuntu/LinuxMint/WSL
### Prepare deps
...
...
@@ -210,6 +217,75 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang
To not link debugging symbols, use
`cmake -DWITH_DEBUG_SYMBOLS=OFF ..`
and compiled binaries will be much smaller.
## MacOS
### Prepare deps
Install common deps:
```
$ brew install openssl git
```
Install
[
gflags
](
https://github.com/gflags/gflags
)
,
[
protobuf
](
https://github.com/google/protobuf
)
,
[
leveldb
](
https://github.com/google/leveldb
)
:
```
$ brew install gflags protobuf leveldb
```
### Compile brpc with config_brpc.sh
git clone brpc, cd into the repo and run
```
$ sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib --cc=clang --cxx=clang++
$ make
```
To not link debugging symbols, add
`--nodebugsymbols`
and compiled binaries will be much smaller.
**Run example**
```
$ cd example/echo_c++
$ make
$ ./echo_server &
$ ./echo_client
```
Examples link brpc statically, if you need to link the shared version,
`make clean`
and
`LINK_SO=1 make`
To run examples with cpu/heap profilers, install
`gperftools`
and re-run
`config_brpc.sh`
before compiling.
**Run tests**
Install and compile googletest (which is not compiled yet):
```
shell
git clone https://github.com/google/googletest
&&
cd
googletest/googletest
&&
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
```
Rerun
`config_brpc.sh`
,
`make`
in test/, and
`sh run_tests.sh`
### Compile brpc with cmake
```
$ mkdir build && cd build && cmake .. && make
```
To not link debugging symbols, use
`cmake -DWITH_DEBUG_SYMBOLS=OFF ..`
and compiled binaries will be much smaller.
**Run example with cmake**
```
$ cd example/echo_c++
$ mkdir build && cd build && cmake .. && make
$ ./echo_server &
$ ./echo_client
```
Examples link brpc statically, if you need to link the shared version, use
`cmake -DEXAMPLE_LINK_SO=ON ..`
**Run tests**
Install gtest like just written above.
```
$ mkdir build && cd build && cmake -DBUILD_UNIT_TESTS=ON .. && make
$ cd test && sh run_tests.sh
```
# Supported deps
## GCC: 4.8-7.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment