未验证 提交 43e2458e 编写于 作者: Z zifeihan 提交者: GitHub

[FAQ doc] Fix compiling on Mac M1 chip (#6241)

上级 db610152
......@@ -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)
......
# 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.
......@@ -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)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册