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
ab4bea5d
Commit
ab4bea5d
authored
Jul 27, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find accurate incpaths from --incs
Change-Id: I0dcd814d3671a5284442749578a5b4f2da5cbc2a
parent
6b00d0bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
README
README
+22
-0
config_brpc.sh
config_brpc.sh
+21
-4
No files found.
README
View file @
ab4bea5d
The opensource version of baidu-rpc
BUILD
[ubuntu]
Must: sudo apt-get install libgflags-dev libprotobuf-dev libprotoc-dev libleveldb-dev libsnappy-dev
sh config_brpc.sh --incs=/usr/include --libs=/usr/lib
Enable cpu/heap profiler in some examples (not working yet)
sudo apt-get install libgoogle-perftools-dev libunwind-dev liblzma-dev
Rerun config_brpc.sh
set LINK_PERFTOOLS to 1 in the Makefile
[baidu internal]
Deps: third-64/gflags@gflags_2-0-0-100_PD_BL
third-64/protobuf@protobuf_2-4-1-1100_PD_BL
third-64/leveldb@leveldb_1-0-0-0_PD_BL
sh config_brpc.sh --incs=../../../third-64 --libs=../../../third-64
Enable cpu/heap profiler in some examples
Deps: third-64/tcmalloc@tcmalloc_1-7-0-200_PD_BL
Rerun config_brpc.sh
set LINK_PERFTOOLS to 1 in the Makefile
config_brpc.sh
View file @
ab4bea5d
...
...
@@ -41,20 +41,33 @@ find_lib_or_die() {
find_dir_of_header
()
{
find
${
INCS
}
-path
"*/
$1
"
|
sed
"s|
$1
||g"
}
find_dir_of_header_or_die
()
{
local dir
=
$(
find_dir_of_header
$1
)
if
[
-z
"
$dir
"
]
;
then
>
&2
echo
"fail to find
$1
from -incs"
exit
1
else
echo
$dir
fi
}
GFLAGS_LIB
=
$(
find_lib_or_die libgflags.a
)
PROTOBUF_LIB
=
$(
find_lib_or_die libprotobuf.a
)
PROTOC_LIB
=
$(
find_lib_or_die libprotoc.a
)
PROTOC
=
$(
which protoc
)
PROTOC
=
$(
which protoc
2>/dev/null
)
if
[
-z
"
$PROTOC
"
]
;
then
PROTOC
=
$(
find_lib_or_die protoc
)
fi
PROTOBUF_INC
=
$(
find_dir_of_header google/protobuf/message.h
)
LEVELDB_LIB
=
$(
find_lib_or_die libleveldb.a
)
SNAPPY_LIB
=
$(
find_lib_or_die libsnappy.a
)
SNAPPY_LIB
=
$(
find_lib libsnappy.a
)
GFLAGS_INC
=
$(
find_dir_of_header gflags/gflags.h
)
PROTOBUF_INC
=
$(
find_dir_of_header google/protobuf/message.h
)
LEVELDB_INC
=
$(
find_dir_of_header leveldb/db.h
)
NEW_INCS
=
$(
echo
$GFLAGS_INC
$PROTOBUF_INC
$LEVELDB_INC
|
sort
|
uniq
)
#can't use \n in texts because sh does not support -e
echo
"INCS=
$INCS
"
>
config.mk
echo
"INCS=
$
NEW_
INCS
"
>
config.mk
echo
"LIBS=
$GFLAGS_LIB
$PROTOBUF_LIB
$LEVELDB_LIB
$SNAPPY_LIB
"
>>
config.mk
echo
"PROTOC_LIB=
$PROTOC_LIB
"
>>
config.mk
echo
"PROTOC=
$PROTOC
"
>>
config.mk
...
...
@@ -65,6 +78,10 @@ echo "ifeq (\$(LINK_PERFTOOLS), 1)" >> config.mk
TCMALLOC_LIB
=
$(
find_lib libtcmalloc_and_profiler.a
)
if
[
!
-z
"
$TCMALLOC_LIB
"
]
;
then
echo
" LIBS+=
$TCMALLOC_LIB
"
>>
config.mk
TCMALLOC_INC
=
$(
find_dir_of_header google/tcmalloc.h
)
if
[
!
-z
"
$TCMALLOC_INC
"
]
&&
[
"
$TCMALLOC_INC
"
!=
"
$INCS
"
]
;
then
echo
" INCS+=
$TCMALLOC_INC
"
>>
config.mk
fi
fi
UNWIND_LIB
=
$(
find_lib libunwind.a
)
if
[
!
-z
"
$UNWIND_LIB
"
]
;
then
...
...
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