<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54727>54727</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            build android lldb-server error
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          RickyCong
      </td>
    </tr>
</table>

<pre>
    ## this is my command
```bash
export PATH=/home/ubuntu/Android/Sdk/ndk/25.0.8221429/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
export PATH=/home/ubuntu/Downloads/ninja/build-cmake:$PATH
export ANDROID_NDK_HOME=/home/ubuntu/Android/Sdk/ndk/25.0.8221429


cd /home/ubuntu/Downloads/llvm-project

mkdir build 
cd build

cmake -B /home/ubuntu/Downloads/llvm-project/build -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-21 \
-DANDROID_ALLOW_UNDEFINED_SYMBOLS=On \
-DLLVM_HOST_TRIPLE=aarch64-unknown-linux-android \
-DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_C_COMPILER=cc;-DCMAKE_CXX_COMPILER=c++' \
/home/ubuntu/Downloads/llvm-project/llvm

ninja lldb-server

```
## this is get error
``` bash
/home/ubuntu/Downloads/llvm-project/lldb/source/Host/common/PseudoTerminal.cpp:94:20: error: no matching function for call to 'RetryAfterSignal'
  m_secondary_fd = llvm::sys::RetryAfterSignal(-1, ::open, name.c_str(), oflag);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/llvm-project/llvm/include/llvm/Support/Errno.h:32:23: note: candidate template ignored: couldn't infer template argument 'Fun'
inline decltype(auto) RetryAfterSignal(const FailT &Fail, const Fun &F,
                      ^
1 error generated.
[2118/2730] Building CXX object tools/clang/lib/Ser...akeFiles/obj.clangSerialization.dir/ASTReader.cpp.o
ninja: build stopped: subcommand failed.

```
![error ](https://user-images.githubusercontent.com/46929436/161437247-0868b69d-6d9a-40a4-8ce8-ea79ecbf8213.png)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVV-TojgQ_zT4koKCgIIPPqDojreOWurt7T1RgUTNDiRUCLPjfvrrgI66M1t3s3VWKnS62_7z604nk_Q0srAPC-kjrxGs8oRyWZZEUMtNLDe2Bm63MlIfOxZ7qaTSaB3vHiw_sfDsKEsGnyZrhG6AiAVVklOgtvQJdtHuuO-4ToSxF-AhHLWURX4kXNRwKIrnEj6VYlnDC204XDQv9ks0SAcBHDMuLD-2cNB6_W9hJPK7KCShxoHg4hsxdsA8tfOSPLFf2IuXyWY1T9Jl8jl9WD1OfzvFDr6bPafoX6I0MNiVkt9Yrm__WT5RrlAbO3q11R7v7JuskD3-kJczJMj-hJYGI2Qni8WXx3S6jMeLabrerP6YTnbbFgWcF0QcLH9cFDSDI7L6k861nUwe48_TdLdaLSYP8XyZzuaLDrrgDaBnl_Dt6oBnpEPTee0Jp8vlxv7FSjyeg1miykFgP0fkPZX1It7NVptHo9cZtrH3rq3FYvVX-ucymc7my2mSbv9-HK8WJteVuNVvAXlYbXfpbjNft3kRovIjhNCIJwHQ2l27nt3d4bJZbbe3uCziT9t0Ge_mXzp8wgt2k3SyelwDbBvg5znA_Cr5-vVOZuFxu8Kro4-VvL1uN53T3g5kqmrXTD0zdde8lwlw8XQ3Lw5MI6aUVD8po-u8-GhsprdmtWxUbv7zIGvDNkNJCiDWNWuo3DFVckEKJ68quMjDADbswnYOBgghUUl0fuTigPaNyDWXAu2lQjkpCqQlXJNww7Q6xXvN1JYfwBywupgRKtOa5VJQok7pHkrqJ6iFDaaGH9enuiPeGohsz8IT1IllxYQ5CVIyJ09rrUDBMvNvguS-IAdD--OLzzc_qz-1wv91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