[GitHub] [incubator-brpc] wwbmmm commented on issue #1693: compile failed with error "error: macro "__has_attribute" requires an identifier"

2022-06-08 Thread GitBox


wwbmmm commented on issue #1693:
URL: 
https://github.com/apache/incubator-brpc/issues/1693#issuecomment-1150703799

   > 
   > 不是很理解仅仅删除这个编译优化提示`__attribute__ ((const))`为什么要改其它基础库?
   
   用到__atrribute((const))的地方很多,不只是glibc,其它库也可能会用到,哪些该删哪些不该删,需要一个一个排查。
   
   > 
   > ARM Compiler 的文档说得更清楚,只有函数的返回值只依赖其输入参数时才可以使用`__attribute__ ((const))`: 
https://developer.arm.com/documentation/100067/0612/Compiler-specific-Function--Variable--and-Type-Attributes/--attributeconst---function-attribute
   
   这个描述确实比gcc的文档清楚些,但估计看这个文档的人不多。。


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[GitHub] [incubator-brpc] rhli commented on issue #1382: macos (Apple M1 )编译过程报错

2022-06-08 Thread GitBox


rhli commented on issue #1382:
URL: 
https://github.com/apache/incubator-brpc/issues/1382#issuecomment-1150622568

   > master HEAD支持了,期待大家的测试与反馈
   
   Macbook Pro M1 测试 echo 没问题,太棒了!


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[incubator-brpc] branch master updated: BugFix: Send WindowUpdate when ClearAbandonedStreams is called (#1786)

2022-06-08 Thread wwbmmm
This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
 new 4b80e952 BugFix: Send WindowUpdate when ClearAbandonedStreams is 
called (#1786)
4b80e952 is described below

commit 4b80e9520130faaa209667a20e08de86da9e92d6
Author: Jiashun Zhu 
AuthorDate: Thu Jun 9 04:57:30 2022 +0200

BugFix: Send WindowUpdate when ClearAbandonedStreams is called (#1786)
---
 src/brpc/policy/http2_rpc_protocol.cpp | 13 +++--
 src/brpc/policy/http2_rpc_protocol.h   |  1 -
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/brpc/policy/http2_rpc_protocol.cpp 
b/src/brpc/policy/http2_rpc_protocol.cpp
index ed57bcfe..ab14863c 100644
--- a/src/brpc/policy/http2_rpc_protocol.cpp
+++ b/src/brpc/policy/http2_rpc_protocol.cpp
@@ -372,7 +372,7 @@ int H2Context::Init() {
 return 0;
 }
 
-H2StreamContext* H2Context::RemoveStream(int stream_id) {
+H2StreamContext* H2Context::RemoveStreamAndDeferWU(int stream_id) {
 H2StreamContext* sctx = NULL;
 {
 std::unique_lock mu(_stream_mutex);
@@ -380,17 +380,10 @@ H2StreamContext* H2Context::RemoveStream(int stream_id) {
 return NULL;
 }
 }
-return sctx;
-}
-
-H2StreamContext* H2Context::RemoveStreamAndDeferWU(int stream_id) {
-H2StreamContext* sctx = RemoveStream(stream_id);
 // The remote stream will not send any more data, sending back the
 // stream-level WINDOW_UPDATE is pointless, just move the value into
 // the connection.
-if (sctx) {
-DeferWindowUpdate(sctx->ReleaseDeferredWindowUpdate());
-}
+DeferWindowUpdate(sctx->ReleaseDeferredWindowUpdate());
 return sctx;
 }
 
@@ -1152,7 +1145,7 @@ inline void H2Context::ClearAbandonedStreams() {
 const uint32_t stream_id = _abandoned_streams.back();
 _abandoned_streams.pop_back();
 mu.unlock();
-H2StreamContext* sctx = RemoveStream(stream_id);
+H2StreamContext* sctx = RemoveStreamAndDeferWU(stream_id);
 if (sctx != NULL) {
 delete sctx;
 }
diff --git a/src/brpc/policy/http2_rpc_protocol.h 
b/src/brpc/policy/http2_rpc_protocol.h
index 7e2061b4..b4422ee0 100644
--- a/src/brpc/policy/http2_rpc_protocol.h
+++ b/src/brpc/policy/http2_rpc_protocol.h
@@ -371,7 +371,6 @@ friend void InitFrameHandlers();
 H2ParseResult OnContinuation(butil::IOBufBytesIterator&, const 
H2FrameHead&);
 
 H2StreamContext* RemoveStreamAndDeferWU(int stream_id);
-H2StreamContext* RemoveStream(int stream_id);
 void RemoveGoAwayStreams(int goaway_stream_id, 
std::vector* out_streams);
 
 H2StreamContext* FindStream(int stream_id);


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



[GitHub] [incubator-brpc] wwbmmm merged pull request #1786: BugFix: Send WindowUpdate when ClearAbandonedStreams is called

2022-06-08 Thread GitBox


wwbmmm merged PR #1786:
URL: https://github.com/apache/incubator-brpc/pull/1786


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[GitHub] [incubator-brpc] wwbmmm commented on issue #1787: do we support python for now?

2022-06-08 Thread GitBox


wwbmmm commented on issue #1787:
URL: 
https://github.com/apache/incubator-brpc/issues/1787#issuecomment-1150600279

   We don't support python yet


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[incubator-brpc] branch master updated: Elaborate how-to-build steps for MacOS

2022-06-08 Thread jamesge
This is an automated email from the ASF dual-hosted git repository.

jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
 new 9556320a Elaborate how-to-build steps for MacOS
9556320a is described below

commit 9556320afc049419e0021ba404d106a72de5d215
Author: James Ge 
AuthorDate: Wed Jun 8 20:11:08 2022 +0800

Elaborate how-to-build steps for MacOS
---
 docs/cn/getting_started.md | 28 +---
 docs/en/getting_started.md | 31 ++-
 2 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/docs/cn/getting_started.md b/docs/cn/getting_started.md
index b4af85a5..2602f5b4 100644
--- a/docs/cn/getting_started.md
+++ b/docs/cn/getting_started.md
@@ -213,6 +213,10 @@ $ make
 
 注意:在相同硬件条件下,MacOS版brpc的性能可能明显差于Linux版。如果你的服务是性能敏感的,请不要使用MacOS作为你的生产环境。
 
+### Apple Silicon
+
+master HEAD已支持M1系列芯片,M2未测试过。欢迎通过issues向我们报告遗留的warning/error。
+
 ### 依赖准备
 
 安装依赖:
@@ -225,22 +229,17 @@ brew install openssl git gnu-getopt coreutils gflags 
protobuf leveldb
 brew install gperftools
 ```
 
-如果你要运行测试,那么要安装并编译googletest(它没有被默认编译):
+如果你要运行测试,需安装gtest。先运行`brew install 
googletest`看看homebrew是否支持(老版本没有),没有的话请下载和编译googletest:
 ```shell
 git clone https://github.com/google/googletest -b release-1.10.0 && cd 
googletest/googletest && mkdir build && cd build && cmake 
-DCMAKE_CXX_FLAGS="-std=c++11" .. && make
 ```
-在编译完成后,复制include/和lib/目录到/usr/local/include和/usr/local/lib目录中,以便于让所有应用都能使用gtest。
-
-### Monterey
-Monterey中openssl的安装位置可能不再位于`/usr/local/opt/openssl`,很可能会在`/opt/homebrew/Cellar`目录下,如果编译时报告找不到openssl,可考虑设置软链如下:
-```shell
-sudo ln -s /opt/homebrew/Cellar/openssl@3/3.0.3 /usr/local/opt/openssl
-```
-请注意上述命令中openssl的目录可能随环境变化而变化,你可以通过`brew info openssl`查看。
+在编译完成后,复制`include/`和`lib/`目录到`/usr/local/include`和`/usr/local/lib`目录中,以便于让所有应用都能使用gtest。
 
-### Apple Silicon
+### OpenSSL
+Monterey中openssl的安装位置可能不再位于`/usr/local/opt/openssl`,很可能会在`/opt/homebrew/Cellar`目录下,如果编译时报告找不到openssl:
 
-master HEAD已支持M1系列芯片,M2未测试过。欢迎通过issues向我们报告遗留的warning/error。
+* 先运行`brew link openssl --force`看看`/user/local/opt/openssl`是否出现了
+* 没有的话可以自行设置软链:`sudo ln -s /opt/homebrew/Cellar/openssl@3/3.0.3 
/usr/local/opt/openssl`。请注意此命令中openssl的目录可能随环境变化而变化,可通过`brew info openssl`查看。
 
 ### 使用config_brpc.sh编译brpc
 git克隆brpc,进入到项目目录然后运行:
@@ -248,6 +247,13 @@ git克隆brpc,进入到项目目录然后运行:
 $ sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib 
--cc=clang --cxx=clang++
 $ make
 ```
+MacOS Monterey下的brew安装路径可能改变,如有路径相关的错误,可考虑设置如下:
+
+```shell
+$ sh config_brpc.sh --headers=/opt/homebrew/include --libs=/opt/homebrew/lib 
--cc=clang --cxx=clang++
+$ make
+```
+
 不想链接调试符号,添加选项`--nodebugsymbols`,然后编译将会得到更轻量的二进制文件。
 
 使用glog版的brpc,添加选项`--with-glog`。
diff --git a/docs/en/getting_started.md b/docs/en/getting_started.md
index 03e34cf6..c500f580 100644
--- a/docs/en/getting_started.md
+++ b/docs/en/getting_started.md
@@ -217,6 +217,10 @@ Same with [here](#compile-brpc-with-cmake)
 
 Note: With same environment, the performance of the MacOS version is worse 
than the Linux version. If your service is performance-critical, do not use 
MacOS as your production environment.
 
+### Apple Silicon
+
+The code at master HEAD already supports M1 series chips. M2 series are not 
tested yet. Please feel free to report remaining warnings/errors to us by 
issues.
+
 ### Prepare deps
 
 Install dependencies:
@@ -229,25 +233,18 @@ If you need to enable cpu/heap profilers in examples:
 brew install gperftools
 ```
 
-If you need to run tests, download and compile googletest (which is not 
compiled yet):
+If you need to run tests, googletest is required. Run `brew install 
googletest` first to see if it works. If not (old homebrew does not have 
googletest), you can download and compile googletest by your own:
 ```shell
 git clone https://github.com/google/googletest -b release-1.10.0 && cd 
googletest/googletest && mkdir build && cd build && cmake 
-DCMAKE_CXX_FLAGS="-std=c++11" .. && make
 ```
-After the compilation, copy include/ and lib/ into /usr/local/include and 
/usr/local/lib respectively to expose gtest to all apps
+After the compilation, copy `include/` and `lib/` into `/usr/local/include` 
and `/usr/local/lib` respectively to expose gtest to all apps
 
-### Monterey
+### OpenSSL
 
-openssl installed in Monterey may not be found at `/usr/local/opt/openssl`, 
instead it's probably put under `/opt/homebrew/Cellar`. If the compiler cannot 
find openssl, consider making a soft link like below:
+openssl installed in Monterey may not be found at `/usr/local/opt/openssl`, 
instead it's probably put under `/opt/homebrew/Cellar`. If the compiler cannot 
find openssl:
 
-```shell
-sudo ln -s /opt/homebrew/Cellar/openssl@3/3.0.3 /usr/local/opt/openssl
-```
-
-Please note that the directory of installed openssl in above command may be 
different in different environments, you could check it  out by ru

Re: Say hello to bRPC community

2022-06-08 Thread Jerry Tan
Welcome,
thanks for your contribution

On 2022/06/04 07:52:50 Hu go wrote:
> Hi, all:
> 
> I'm Xiguo Hu, from the Cloud Native Team of Baidu Infrastructure
> Department, now mainly taking part in the development of bRPC framework and
> Service Mesh within Baidu. Here is my Github address:
> https://github.com/Huixxi.
> 
> I have been engaged in the development and daily maintenance of bRPC
> framework since I joined Baidu in 2021. Mainly implemented the graceful
> restart feature, mesh tracing based on bRPC and some other bug fixes. I
> really learned a lot.
> 
> My contributions are mainly in bRPC official website reconstruction and
> document construction.
> See https://github.com/apache/incubator-brpc-website and the new version
> bRPC official website https://brpc.apache.org/ for details.
> bRPC is a high-performance RPC framework that is widely used by many
> companies. It's my  honor to have the opportunity to apply to become a
> committer. Now that the construction of the official website has been
> basically completed, I will focus more on the contribution of bRPC itself,
> including developing features, bug fixes, solving issues, and roadmap
> discussions. Best Regards!
> 

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



[GitHub] [incubator-brpc] Huixxi commented on issue #1382: macos (Apple M1 )编译过程报错

2022-06-08 Thread GitBox


Huixxi commented on issue #1382:
URL: 
https://github.com/apache/incubator-brpc/issues/1382#issuecomment-1149797181

   本机(M1 Macbook Pro 
13inc)验证通过,参照更新后的[getting_started.md](https://github.com/apache/incubator-brpc/blob/master/docs/cn/getting_started.md#macos)文档,附上戈神的PR:https://github.com/apache/incubator-brpc/commit/efa9989e99dce0bb5f8e26818574748c7ef45059。
   除此之外,大家可能还会遇到几个比较基础的坑(本人踩过的):
   
   - 如遇到Homebrew镜像源失效mac brew xxx问题,则需要更新下载源,并升级brew,解决方法如下:
   ```
   $ export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git";
   $ brew update
   ```
   - 在sh config_brpc.sh  这一步骤之后,遇到错误:“gnu-getopt must be installed and 
used”,则需要使用如下命令安装gnu-getopt,如果依旧反复出错,则需要通过重启Mac来解决。
   ```
   brew install gnu-getopt
   ```
   - 在有就是Fail to find gflags/protobuf/leveldb/gflags/gflags.h from 
--libs,也就是说在/usr/local/lib这个路径下找不到这些包,原因戈神在新的getting_start.md里面也提到了,新的MacOS下的brew安装路径发生了改变,通过里面提到了的软链的方式应该能解决,但我就比较笨了,当时是通过如下方式解决的:
   ```
   $ sh config_brpc.sh --headers=/opt/homebrew/include --libs=/opt/homebrew/lib 
--cc=clang --cxx=clang++
   ```
   - 
最后就是make之后,又报错找不到openssl的错误,这个在新文档中也提到了,也是通过软链的方式解决,我当时的解决方案是参考:https://stackoverflow.com/questions/42044221/openssl-not-found-on-macos-sierra
 (唯一有效方式)
   ```
   $ brew link openssl --force
   ```
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[GitHub] [incubator-brpc] HaoLiuHust opened a new issue, #1787: do we support python for now?

2022-06-08 Thread GitBox


HaoLiuHust opened a new issue, #1787:
URL: https://github.com/apache/incubator-brpc/issues/1787

   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   do we support use python for server or client develop?
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org.apache.org

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


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



[GitHub] [incubator-brpc] jamesge commented on issue #1382: macos (Apple M1 )编译过程报错

2022-06-08 Thread GitBox


jamesge commented on issue #1382:
URL: 
https://github.com/apache/incubator-brpc/issues/1382#issuecomment-1149685114

   master HEAD支持了,期待大家的测试与反馈


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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



[incubator-brpc] branch master updated: Support apple silicon

2022-06-08 Thread jamesge
This is an automated email from the ASF dual-hosted git repository.

jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
 new efa9989e Support apple silicon
efa9989e is described below

commit efa9989e99dce0bb5f8e26818574748c7ef45059
Author: James Ge 
AuthorDate: Wed Jun 8 16:49:33 2022 +0800

Support apple silicon
---
 Makefile| 10 +++--
 config_brpc.sh  | 21 ++
 docs/cn/getting_started.md  | 33 +++
 docs/en/getting_started.md  | 25 
 src/brpc/span.h |  2 +-
 src/bthread/context.cpp | 97 +
 src/bthread/context.h   | 19 +
 src/bthread/key.cpp |  2 +-
 src/bthread/task_group.cpp  |  2 +-
 src/butil/time.h| 26 
 test/{BUILD => BUILD.bazel} |  0
 test/CMakeLists.txt |  2 +-
 test/Makefile   |  4 +-
 test/endpoint_unittest.cpp  |  2 +
 14 files changed, 196 insertions(+), 49 deletions(-)

diff --git a/Makefile b/Makefile
index 3538e47c..e2e1a6b2 100644
--- a/Makefile
+++ b/Makefile
@@ -41,13 +41,15 @@ endif
 
 #required by butil/crc32.cc to boost performance for 10x
 ifeq ($(shell test $(GCC_VERSION) -ge 40400; echo $$?),0)
-   CXXFLAGS+=-msse4 -msse4.2
+  ifeq ($(shell uname -p),i386)  #note: i386 is processor family type, not the 
32-bit x86 arch
+CXXFLAGS+=-msse4 -msse4.2
+  endif
 endif
 #not solved yet
 ifeq ($(CC),gcc)
- ifeq ($(shell test $(GCC_VERSION) -ge 7; echo $$?),0)
-   CXXFLAGS+=-Wno-aligned-new
- endif
+  ifeq ($(shell test $(GCC_VERSION) -ge 7; echo $$?),0)
+CXXFLAGS+=-Wno-aligned-new
+  endif
 endif
 
 BUTIL_SOURCES = \
diff --git a/config_brpc.sh b/config_brpc.sh
index f52911db..842f100f 100755
--- a/config_brpc.sh
+++ b/config_brpc.sh
@@ -154,16 +154,21 @@ find_dir_of_header_or_die() {
 }
 
 if [ "$SYSTEM" = "Darwin" ]; then
-OPENSSL_LIB="/usr/local/opt/openssl/lib"
-OPENSSL_HDR="/usr/local/opt/openssl/include"
-else
-# User specified path of openssl, if not given it's empty
-OPENSSL_LIB=$(find_dir_of_lib ssl)
-# Inconvenient to check these headers in baidu-internal
-#PTHREAD_HDR=$(find_dir_of_header_or_die pthread.h)
-OPENSSL_HDR=$(find_dir_of_header_or_die openssl/ssl.h 
mesalink/openssl/ssl.h)
+if [ -d "/usr/local/opt/openssl" ]; then
+LIBS_IN="/usr/local/opt/openssl/lib $LIBS_IN"
+HDRS_IN="/usr/local/opt/openssl/include $HDRS_IN"
+elif [ -d "/opt/homebrew/Cellar" ]; then
+LIBS_IN="/opt/homebrew/Cellar $LIBS_IN"
+HDRS_IN="/opt/homebrew/Cellar $HDRS_IN"
+fi
 fi
 
+# User specified path of openssl, if not given it's empty
+OPENSSL_LIB=$(find_dir_of_lib ssl)
+# Inconvenient to check these headers in baidu-internal
+#PTHREAD_HDR=$(find_dir_of_header_or_die pthread.h)
+OPENSSL_HDR=$(find_dir_of_header_or_die openssl/ssl.h mesalink/openssl/ssl.h)
+
 if [ $WITH_MESALINK != 0 ]; then
 MESALINK_HDR=$(find_dir_of_header_or_die mesalink/openssl/ssl.h)
 OPENSSL_HDR="$OPENSSL_HDR\n$MESALINK_HDR"
diff --git a/docs/cn/getting_started.md b/docs/cn/getting_started.md
index 53ef0f50..b4af85a5 100644
--- a/docs/cn/getting_started.md
+++ b/docs/cn/getting_started.md
@@ -20,7 +20,7 @@ brpc有如下依赖:
 ## Ubuntu/LinuxMint/WSL
 ### 依赖准备
 
-安装通用依赖,[gflags](https://github.com/gflags/gflags), 
[protobuf](https://github.com/google/protobuf), 
[leveldb](https://github.com/google/leveldb):
+安装依赖:
 ```shell
 sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev 
libprotoc-dev protobuf-compiler libleveldb-dev
 ```
@@ -113,14 +113,9 @@ CentOS一般需要安装EPEL,否则很多包都默认不可用。
 sudo yum install epel-release
 ```
 
-安装通用依赖:
+安装依赖:
 ```shell
-sudo yum install git gcc-c++ make openssl-devel
-```
-
-安装 [gflags](https://github.com/gflags/gflags), 
[protobuf](https://github.com/google/protobuf), 
[leveldb](https://github.com/google/leveldb):
-```shell
-sudo yum install gflags-devel protobuf-devel protobuf-compiler leveldb-devel
+sudo yum install git gcc-c++ make openssl-devel gflags-devel protobuf-devel 
protobuf-compiler leveldb-devel
 ```
 
 如果你要在样例中启用cpu/heap的profiler:
@@ -216,18 +211,13 @@ $ make
 
 ## MacOS
 
-注意:在相同运行环境下,当前Mac版brpc的性能比Linux版差2.5倍。如果你的服务是性能敏感的,请不要使用MacOs作为你的生产环境。
+注意:在相同硬件条件下,MacOS版brpc的性能可能明显差于Linux版。如果你的服务是性能敏感的,请不要使用MacOS作为你的生产环境。
 
 ### 依赖准备
 
-安装通用依赖:
-```shell
-brew install openssl git gnu-getopt coreutils
-```
-
-安装[gflags](https://github.com/gflags/gflags),[protobuf](https://github.com/google/protobuf),[leveldb](https://github.com/google/leveldb):
+安装依赖:
 ```shell
-brew install gflags protobuf leveldb
+brew install openssl git gnu-getopt coreutils gflags protobuf leveldb
 ```
 
 如果你要在样例中启用cpu/heap的profiler:
@@ -241,6 +231,17 @@ git clone https://github.com/google/googletest -b 
release-1.10.0 && cd googletes
 ```
 
在编译完成后,复制include/和lib/目录到/usr/local/include和/usr/loc

[GitHub] [incubator-brpc] songdongsheng commented on issue #1693: compile failed with error "error: macro "__has_attribute" requires an identifier"

2022-06-08 Thread GitBox


songdongsheng commented on issue #1693:
URL: 
https://github.com/apache/incubator-brpc/issues/1693#issuecomment-1149540326

   > 1. 修改pthread_self()等函数的声明。但是,这个问题在于要改很多基础库。
   
   不是很理解仅仅删除这个编译优化提示`__attribute__ ((const))`为什么要改其它基础库?
   
   ARM Compiler 的文档说得更清楚,只有函数的返回值只依赖其输入参数时才可以使用`__attribute__ ((const))`:
   
https://developer.arm.com/documentation/100067/0612/Compiler-specific-Function--Variable--and-Type-Attributes/--attributeconst---function-attribute
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

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


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