Rate This Document
Findability
Accuracy
Completeness
Readability

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

  1. 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.)
    1
    vi openssl-dynamic/src/main/native-package/configure.ac
    

    Delete the -Werror compilation parameter.

    1
    2
    ${CFLAGS="-03"}
    #${CFLAGS="-03" -Werror}
    
  2. Delete the -Werror compilation parameter.
    1
    vi openssl-dynamic/src/main/native-package/m4/apr_common.m4
    
    1
    2
    dnl CFLAGS="SCFLAGS -Werror"
    CFLAGS="$CFLAGS"
    
  3. Delete the -Wshadow compilation parameter.
    1
    vi boringssl-static/target/boringssl-chromium-stable/CMakeLists.txt
    
    1
    2
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") 
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")