brpc builds itself to both static and shared libs by default, so it needs static and shared libs of deps to be built as well.
Take [gflags](https://github.com/gflags/gflags) as example, which does not build shared lib by default, you need to pass options to `cmake` to change the behavior:
@@ -186,18 +209,22 @@ Keep on with the gflags example, let `../gflags_dev` be where gflags is cloned.
git clone brpc. cd into the repo and run
```
```shell
$ sh config_brpc.sh --headers="../gflags_dev /usr/include"--libs="../gflags_dev /usr/lib64"
$ make
```
Here we pass multiple paths to `--headers` and `--libs` to make the script search for multiple places. You can also group all deps and brpc into one directory, then pass the directory to --headers/--libs which actually search all subdirectories recursively and will find necessary files.
To change compiler to clang, add `--cxx=clang++ --cc=clang`.
To not link debugging symbols, add `--nodebugsymbols` and compiled binaries will be much smaller.
Here we pass multiple paths to `--headers` and `--libs` to make the script search for multiple places. You can also group all deps and brpc into one directory, then pass the directory to --headers/--libs which actually search all subdirectories recursively and will find necessary files.
To use brpc with glog, add `--with-glog`.
```
To enable thrift support, install thrift first and add `--with-thrift`.
@@ -217,6 +244,10 @@ 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.
To use brpc with glog, add `-DWITH_GLOG=ON`.
To enable thrift support, install thrift first and add `-DWITH_THRIFT=ON`.
## MacOS
Note: In the same running environment, the performance of the current Mac version is about 2.5 times worse than the Linux version. If your service is performance-critical, do not use MacOS as your production environment.
...
...
@@ -224,26 +255,35 @@ Note: In the same running environment, the performance of the current Mac versio
@@ -351,6 +393,10 @@ brpc implements a default [logging utility](../../src/butil/logging.h) which con
brpc detects valgrind automatically (and registers stacks of bthread). Older valgrind(say 3.2) is not supported.
## thrift: 0.9.3-0.11.0
no known issues.
# Track instances
We provide a program to help you to track and monitor all brpc instances. Just run [trackme_server](https://github.com/brpc/brpc/tree/master/tools/trackme_server/) somewhere and launch need-to-be-tracked instances with -trackme_server=SERVER. The trackme_server will receive pings from instances periodically and print logs when it does. You can aggregate instance addresses from the log and call builtin services of the instances for further information.