Building Boost for Android with error “cannot find -lrt”
编辑tools/build/src/tools/gcc.jam
rule setup-threading ( targets * : sources * : properties * )
{
local threading = [ feature.get-values threading : $(properties) ] ;
if $(threading) = multi
{
local target = [ feature.get-values target-os : $(properties) ] ;
local option ;
local libs ;
switch $(target)
{
case android : # No threading options, everything is in already.
case windows : option = -mthreads ;
case cygwin : option = -mthreads ;
case solaris : option = -pthreads ; libs = rt ;
case beos : # No threading options.
case haiku : option = ;
case *bsd : option = -pthread ; # There is no -lrt on BSD.
case sgi : # gcc on IRIX does not support multi-threading.
case darwin : # No threading options.
case * : option = -pthread ; #libs = rt ;
}
将libs = rt这行注释掉
------------------------------------------------------------------
Indeed all occurrencies of -lrt with sed doesn't seem to have any impact on the problem.
What worked for me (in boost 1.53.0 though) is the following:
Edit tools/build/v2/tools/gcc.jam
Comment libs = rt ; in this code section (By the way, it could be that you do not have the -pthread option line):
case * :
{
option = -pthread ;
libs = rt ; <--Comment this line
}
Note: As initial/brute force solution, I would take the failed commands and manually run them removing -lrt from them.
question:
So I am trying to build boost 1.55 for android, but I am getting linking errors for Boost.System and Boost.Atomic, that say "error: cannot find -lrt". Of course, android doesn't have librt because its built into the C runtime. So, I am trying to get boost so it won't link to librt. I tried just deleting every "-lrt" in the source code:
find . -type f | xargs -n1 -P 8 sed -i "s/-lrt//g"
But I still get the same error. How do I make boost not link against librt for android?
answer:
Indeed all occurrencies of -lrt with sed doesn't seem to have any impact on the problem.
What worked for me (in boost 1.53.0 though) is the following:
Edit tools/build/v2/tools/gcc.jam
Comment libs = rt ; in this code section (By the way, it could be that you do not have the -pthread option line):
case * :
{
option = -pthread ;
libs = rt ; <--Comment this line
}
Note: As initial/brute force solution, I would take the failed commands and manually run them removing -lrt from them.
Building Boost for Android with error “cannot find -lrt”的更多相关文章
- Unity出现 error building player exception android (invocation failed)
今天在编译Android的时候出现这个错误 error building player exception android (invocation failed) 百度谷歌之后,看到xuanyuson ...
- android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded 在app下的build.gradle中找到and ...
- android stack error message is Fail to start the plugin
E: 08-26 16:34:11.934: E/AliSDK(32236): 错误编码 = 1002208-26 16:34:11.934: E/AliSDK(32236): 错误消息 = SDK ...
- android studio error configuration with name default not found
Android Studio报错: android studio error configuration with name default not found 在进行sync的时候,提示Error: ...
- [2015-06-10 20:53:50 - Android SDK] Error when loading the SDK:
1.错误描述 [2015-06-10 20:53:50 - Android SDK] Error when loading the SDK: Error: Error parsing D:\Andro ...
- building 'twisted.test.raiser' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Error msg: building 'twisted.test.raiser' extension error: Microsoft Visual C++ 14.0 is required. Ge ...
- 解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题
参考: How to install all the boost development libraries? 解决 Boost安装:fatal error: bzlib.h: No such fil ...
- 安装scrapy 出错 building 'twisted.test.raiser' extension error: Microsoft Visual C++ 14.0 is required.
安装Scrapy出现错误: building 'twisted.test.raiser' extension error: Microsoft Visual C++ 14.0 is required. ...
- Boost test vs2013 fatal error C1001
Boost test vs2013 fatal error C1001 Boost test库提供了一个用于单元测试的基于命令行界面的测试套件UTF:Unit Test Framework,具有单元测 ...
随机推荐
- [原创]Allegro 导入DXF文件,保留布好的线路信息
最近智能钥匙产品开发过程中,由于结构装配尺寸的偏差,需要对电路PCB外框OUTLINE进行缩小调整,并且USB插座定位孔改变. Allegro软件在线性绘制方面是有严重缺陷的,想绘制一个异形的板框比较 ...
- .net网站建设页面提交后css失效的问题
问题描述:.net网站建设在提交后出现css部分失效,如div位置,字体大小. 问题解决:原因是,过去的提示语句我们一律使用了Response.write("<script>al ...
- QQ彩票任意订阅内容导致骚扰用户
数据包: POST /my/index.php?mod=securityinfo&op=AjaxUpdateTipsSet HTTP/1.1 Host: 888.sports.qq.com C ...
- [转]java的(PO,VO,TO,BO,DAO,POJO)类名包名解释
java的(PO,VO,TO,BO,DAO,POJO)类名包名解释 2015-04-28 20:11 by Loull, 18 阅读, 0 评论, 收藏, 编辑 VO:值对象.视图对象 PO:持久对象 ...
- tomcat8.0 基本参数调优配置
1.优化内核及TCP连接: fs.file-max = 655350 # 系统文件描述符总量 net.ipv4.ip_local_port_range = 1024 65535 # 打开端口范围 ...
- 纯CSS实现瀑布流布局
https://www.w3cplus.com/css/pure-css-create-masonry-layout.html
- 如何分析解决Android ANR(转载)
转载自:http://blog.csdn.net/dadoneo/article/details/8270107 一:什么是ANR ANR:Application Not Responding,即应用 ...
- scala spray 概念性内容的总结
spray 是基于 akka 的轻量级 scala 库,可用于编写 REST API 服务.了解 spray 的 DSL 后可以在很短的时间内写出一个 REST API 服务,它的部署并不需要 tom ...
- 彻底关闭Google的安全搜索
在使用简体中文的情况下,访问Google总是会跳转到香港,这个时候的安全搜索是无法关闭的. 下面介绍一个最简单的方法,直接使用Google的中文界面:https://www.google.com/we ...
- 子窗口访问父页面iframe中的iframe,top打开的子窗口访问父页面中的iframe中的iframe
子窗口访问父页面iframe中的iframe 子窗口访问最顶层页面中的iframe中的iframe top打开的子窗口访问父页面中的iframe中的iframe top打开的子窗口访问最顶层页面中的i ...