This is an automated email from the ASF dual-hosted git repository.
liulijia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 5c49d3b830 [doc] (compile) Add an error resolution for compiling under
Mac (#712)
5c49d3b830 is described below
commit 5c49d3b830e347d411c0e89d89cc12e7420eae3c
Author: Lijia Liu <[email protected]>
AuthorDate: Tue Jun 4 22:48:15 2024 +0800
[doc] (compile) Add an error resolution for compiling under Mac (#712)
Add an error resolution for compiling under Mac with M3 chip.
Co-authored-by: liulijia <[email protected]>
---
docs/install/source-install/compilation-mac.md | 14 ++++++++++++++
.../install/source-install/compilation-mac.md | 17 ++++++++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/docs/install/source-install/compilation-mac.md
b/docs/install/source-install/compilation-mac.md
index 1fffd1db01..3483d2c640 100644
--- a/docs/install/source-install/compilation-mac.md
+++ b/docs/install/source-install/compilation-mac.md
@@ -114,3 +114,17 @@ cd installed/bin
:::tip
When running protoc and thrift, you may encounter an issue where the binary
cannot be opened due to developer verification. To resolve this, you can go to
"Security & Privacy" settings. In the "General" tab, click on the "Open Anyway"
button to confirm your intent to open the binary. Refer to:
https://support.apple.com/en-us/102445
:::
+
+## Common Errors
+1. When running `protoc` and `thrift`, you may encounter an issue where the
binary cannot be opened due to developer verification. To resolve this, you can
go to "Security & Privacy" settings. In the "General" tab, click on the "Open
Anyway" button to confirm your intent to open the binary. Refer to:
https://support.apple.com/en-us/102445.
+2. When compiling with a Mac with an M3 chip, the compilation of the proto
file fails.
+The failure log is as follows:
+```Shell
+[ERROR] ... [0:0]: --grpc-java_out: protoc-gen-grpc-java: Plugin failed with
status code 1.
+```
+The reason for this error may be that the Apple arm-based chip does not
support software on the x86 platform.
+You can download the protoc-gen-grpc-java software used from
https://repo.maven.apache.org/maven2/io/grpc/protoc-gen-grpc-java/, and the
version information can be viewed from the grpc.java.artifact property under
the protoc_rosetta profile in fe/fe-core/pom.xml. If the following error is
reported after downloading and executing, it means that the current Mac cannot
execute software based on x86 compiled software.
+```Shell
+zsh: bad CPU type in executable:./protoc-gen-grpc-java-1.34.0-osx-x86_64.exe
+```
+You can refer to the official documentation
https://support.apple.com/en-us/102527 and install `Rosetta` to solve this
problem.
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/install/source-install/compilation-mac.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/install/source-install/compilation-mac.md
index af7b8323a1..8b50e1c0b1 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/install/source-install/compilation-mac.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/install/source-install/compilation-mac.md
@@ -106,4 +106,19 @@ cd installed/bin
./thrift --version
```
-运行`protoc`和`thrift`的时候可能会遇到**无法打开,因为无法验证开发者**的问题,可以到前往`安全性与隐私`。点按`通用`面板中的`仍要打开`按钮,以确认打算打开该二进制。参考
https://support.apple.com/zh-cn/HT202491。
\ No newline at end of file
+## 常见错误
+
+1.
运行`protoc`和`thrift`的时候可能会遇到**无法打开,因为无法验证开发者**的问题,可以到前往`安全性与隐私`。点按`通用`面板中的`仍要打开`按钮,以确认打算打开该二进制。参考
https://support.apple.com/zh-cn/HT202491。
+
+2. 使用M3芯片的Mac编译时报编译proto文件失败
+失败日志如下
+```Shell
+[ERROR] ... [0:0]: --grpc-java_out: protoc-gen-grpc-java: Plugin failed with
status code 1.
+```
+此错误的原因可能是由于Apple基于arm的芯片不支持x86平台的软件导致。
+可从https://repo.maven.apache.org/maven2/io/grpc/protoc-gen-grpc-java/下载编译用到的protoc-gen-grpc-java软件验证,版本信息可从fe/fe-core/pom.xml中protoc_rosetta
profile下的grpc.java.artifact属性查看。
+下载后执行如果报错如下错误则表示当前Mac不能执行基于x86编译的软件:
+```Shell
+zsh: bad CPU type in executable: ./protoc-gen-grpc-java-1.34.0-osx-x86_64.exe
+```
+可参考Apple官方文档https://support.apple.com/en-us/102527,安装Rosetta解决该问题。
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]