Failed to Build BoringSSL During Compilation
Symptom
Failed to build BoringSSL during the compilation. The message "Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run(build-boringssl)" is displayed.

Key Process and Cause Analysis
The go get command starts an automatic download of the specified installation package or related dependencies. However, packages like golang.org/x/... fail to be downloaded. Go 1.11 and later versions have the GOPROXY environment variable to set the proxy address of the Go module. If GOPROXY is configured, Go downloads the source code from the proxy address instead of directly from the code repository. The public proxy address is https://goproxy.io.
Conclusion and Solution
- View the Go version.
go version
- Open the profile file.
vim /etc/profile
- Press i to enter the insert mode and add the following content to the file:
export GOPROXY=https://goproxy.io export GO111MODULE=on
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the environment variables take effect.
source /etc/profile
- View the environment variables.
echo $GOPROXY
- Copy BoringSSL again.
- Go to the /home/netty-tcnative-netty-tcnative-parent-2.0.28.Final/boringssl-static/target/ directory.
cd /home/netty-tcnative-netty-tcnative-parent-2.0.28.Final/boringssl-static/target/
- Delete the original boringssl-chromium-stable.
du -sh boringssl-chromium-stable rm -rf boringssl-chromium-stable
- Copy the new boringssl-chromium-stable.
cp -r /root/boringssl-chromium-stable du -sh boringssl-chromium-stable
- Go to the /home/netty-tcnative-netty-tcnative-parent-2.0.28.Final/boringssl-static/target/ directory.
- Run the compile command again.
mvn clean install
Parent topic: Troubleshooting