Error "exec returned: 1" Reported When Compiling netty-tcnative-boringssl-static
Symptom
The compilation fails due to an alarm. The error message is as follows:
1 | [ERROR] Failed to execute goal org.apache.maven.plugins:maven-anturn-plugin:1.8:run (build-boringssl) on project netty-tcnative-boringssl-static: An Ant BuildException has occurred:exec returned: 1 |
Key Process and Cause Analysis
None
Conclusion and Solution
- Delete the compilation parameters -Wshadow and –Werror. (Other compilation modules share the openssl-dynamic code. You only need to modify the code in this module.)
1vi openssl-dynamic/src/main/native-package/configure.acDelete the -Werror compilation parameter.
1 2
${CFLAGS="-03"} #${CFLAGS="-03" -Werror} - Delete the -Werror compilation parameter.
1vi openssl-dynamic/src/main/native-package/m4/apr_common.m41 2
dnl CFLAGS="SCFLAGS -Werror" CFLAGS="$CFLAGS"
- Delete the -Wshadow compilation parameter.
1vi boringssl-static/target/boringssl-chromium-stable/CMakeLists.txt1 2
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
Parent topic: Troubleshooting