abseil / abseil/abseil-cpp

Build/link error with android ndk r19 due to librt

未关闭
#672 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
18.1k
派生
3.2k
平均合并
20 小时 36 分钟
30 天内合并 PR
1

描述

We face a build error with the current LTS branch during the linking stage because abseil tries to link librt which doesn't really exist for android.

```
/opt/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: /usr/lib32/librt.so: incompatible target
```

It is fixed by replacing https://github.com/abseil/abseil-cpp/blob/68494aae959dfbbf781cdf03a988d2f5fc7e4802/absl/base/CMakeLists.txt#L17 by
```
if(NOT ANDROID)
find_library(LIBRT rt)
endif(NOT ANDROID)
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。