Rate This Document
Findability
Accuracy
Completeness
Readability

libclangAST.so.6 Cannot Be Found During TiKV Compilation

Symptom

During TiKV compilation, the libclangAST.so.6 dynamic library cannot be found. The error message "the `libclang` shared library at /usr/lib64/clang-private/libclang.so.6.0 could not be opened: libclangAST.so.6: cannot open shared object file: No such file or directory" is displayed.

Key Process and Cause Analysis

  1. Check whether the libclang.so.6.0 library exists.
    1
    ll /usr/lib64/clang-private/libclang.so.6.0
    

    The command output shows that the library is found.

  2. Check whether libclangAST.so.6 exists.
    1
    find / -name libclangAST.so.6
    

    The command output shows that libclangAST.so and libclang.so are in the same directory.

  3. Check whether libclang.so depends on libclangAST.so.
    1
    ldd /usr/lib64/clang-private/libclang.so.6.0
    

    It is found that the dependency relationship exists, but libclangAST.so cannot be located.

Conclusion and Solution

  1. Add the path of libclangAST.so to the environment variables.
    export LD_LIBRARY_PATH=/usr/lib64/clang-private/:$LD_LIBRARY_PATH
  2. Compile TiKV again.