You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/01/22 01:04:13 UTC
[skywalking] branch master updated: [FAQ doc] Fix compiling on Mac
M1 chip (#6241)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 43e2458 [FAQ doc] Fix compiling on Mac M1 chip (#6241)
43e2458 is described below
commit 43e2458e6b5744a783379027fd4be3e462c95366
Author: zifeihan <zi...@apache.org>
AuthorDate: Fri Jan 22 09:03:50 2021 +0800
[FAQ doc] Fix compiling on Mac M1 chip (#6241)
---
CHANGES.md | 1 +
docs/en/FAQ/How-to-build-with-mac-m1.md | 30 ++++++++++++++++++++++++++++++
docs/en/FAQ/README.md | 3 ++-
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index 83704a2..210a0d8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -110,6 +110,7 @@ Release Notes.
* Update docs about the latest UI.
* Update the document of backend trace sampling with the latest configuration.
* Update kafka plugin support version to 2.6.1.
+* Add FAQ about `Fix compiling on Mac M1 chip`.
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/68?closed=1)
diff --git a/docs/en/FAQ/How-to-build-with-mac-m1.md b/docs/en/FAQ/How-to-build-with-mac-m1.md
new file mode 100644
index 0000000..d4f0068
--- /dev/null
+++ b/docs/en/FAQ/How-to-build-with-mac-m1.md
@@ -0,0 +1,30 @@
+# Fix compiling on MacBook M1 chip
+### Problem
+- When compiling according to [How-to-build](../guides/How-to-build.md), The following problems will occur, causing the build to fail.
+```
+[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (grpc-build) on project apm-network: Unable to resolve artifact: Missing:
+[ERROR] ----------
+[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.12.0
+[ERROR]
+[ERROR] Try downloading the file manually from the project website.
+[ERROR]
+[ERROR] Then, install it using the command:
+[ERROR] mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.12.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
+[ERROR]
+[ERROR] Alternatively, if you host your own repository you can deploy the file there:
+[ERROR] mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.12.0 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
+[ERROR]
+[ERROR] Path to dependency:
+[ERROR] 1) org.apache.skywalking:apm-network:jar:8.4.0-SNAPSHOT
+[ERROR] 2) com.google.protobuf:protoc:exe:osx-aarch_64:3.12.0
+[ERROR]
+[ERROR] ----------
+[ERROR] 1 required artifact is missing.
+
+```
+
+### Reason
+Because the dependent Protocol Buffers v3.14.0 does not have an osx-aarch_64 version, Protocol Buffers Releases link: https://github.com/protocolbuffers/protobuf/releases, fortunately, mac m1 is compatible with the osx-x86_64 version, before this version is available for download, you need to manually specify the osx-x86_64 version.
+
+### Resolve
+We can add -Dos.detected.classifier=osx-x86_64 after the original compilation parameters, for example: `./mvnw clean package -DskipTests -Dos.detected.classifier=osx-x86_64`, After specifying, compile and run normally.
diff --git a/docs/en/FAQ/README.md b/docs/en/FAQ/README.md
index 3d4884a..af4b5ee 100644
--- a/docs/en/FAQ/README.md
+++ b/docs/en/FAQ/README.md
@@ -26,6 +26,7 @@ These are known and common FAQs. We welcome you to contribute yours.
* [Compatible with other javaagent bytecode processing](Compatible-with-other-javaagent-bytecode-processing.md)
* [**Java agent memory leak** when enhance `Worker thread` at use Thread Pool](Memory-leak-enhance-Worker-thread.md)
* [Thrift plugin](thrift-plugin.md)
+* [Fix compiling on Mac M1 chip](How-to-build-with-mac-m1.md)
## UI
-* [What is **VNode**? And why does SkyWalking have that?](vnode.md)
\ No newline at end of file
+* [What is **VNode**? And why does SkyWalking have that?](vnode.md)