【buildroot-2011.11】You may have to install 'g++' on your build machine
buildroot - 2011.11 当进行交叉编译。例如像以下错误提及演示:
“You may have to install 'g++' on your build machine”
还提示:toolchain/dependencies/dependencies.sh 121 Error
打开toolchain/dependencies/dependencies.sh,有例如以下一段脚本
# check for host CXX
CXXCOMPILER=$(which $HOSTCXX 2> /dev/null)
if [ -z "$CXXCOMPILER" ] ; then
CXXCOMPILER=$(which c++ 2> /dev/null)
fi
if [ -z "$CXXCOMPILER" ] ; then
/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
#exit 1
fi
if [ ! -z "$CXXCOMPILER" ] ; then
CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' |
sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') if [ -z "$CXXCOMPILER_VERSION" ] ; then
/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
fi CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
/bin/echo -e "\nYou have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required\n"
exit 1
fi
fi
有两个地方会打印“You may have to install 'g++' on your build machine”,在这两个地方分别增加调试标记,发现是这里出问题了。
# check for host CXX
CXXCOMPILER=$(which $HOSTCXX 2> /dev/null)
if [ -z "$CXXCOMPILER" ] ; then
CXXCOMPILER=$(which c++ 2> /dev/null)
fi
if [ -z "$CXXCOMPILER" ] ; then
/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
#exit 1
fi
if [ ! -z "$CXXCOMPILER" ] ; then
CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' |
sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
if [ -z "$CXXCOMPILER_VERSION" ] ; then
/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
fi
CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g")
CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
/bin/echo -e "\nYou have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required\n"
exit 1
fi
fi
原来他没有检查出来,CXXCOMPILER_VERSION为空。方便起见,我直接输入命令:
c++ -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'
得到C++的版本号为:4.4.6
我直接在CXXCOMPILER_VERSION上面加一个推理:CXXCOMPILER_VERSION=4.4.6
然后make,直接通过。
OK,问题解决为此。
【buildroot-2011.11】You may have to install 'g++' on your build machine的更多相关文章
- 【Java虚拟机11】线程上下文类加载器
前言 目前学习到的类加载的知识,都是基于[双亲委托机制]的.那么JDK难道就没有提供一种打破双亲委托机制的类加载机制吗? 答案是否定的. JDK为我们提供了一种打破双亲委托模型的机制:线程上下文类加载 ...
- 【驱动笔记11】使用DeviceIoControl通信
文章作者:grayfox作者主页:http://nokyo.blogbus.com原始出处:http://www.blogbus.com/nokyo-logs/34018521.html 在我昨日发布 ...
- 【浅析C++11】std::function和std::bind
目录 std::function可调用对象包装器 std::function基本用法 std::function/std::bind与抽象工厂.工厂方法的一点思考 std::function可调用对象 ...
- 【Python】【demo实验11】【练习实例】【三个整数的立方和】
目的:找到 除了9n±4型自然数外,所有100以内的自然数都能写成三个整数的立方和 这每个数的表达方式: 源代码: #!/usr/bin/python # encoding=utf-8 # -* ...
- 【模拟8.11】将军令(贪心&&树形DP)
只看45分的话,是树形DP....(当然也有能拿到70分+的大佬) 40分: 只考虑k==1的情况,树形DP 所以每个节点可能被父亲,自己,儿子控制 设f[MAXN][3],0表示儿子,1表示自己,2 ...
- 【模拟8.11】星空(差分转化,状压DP,最短路)
一道很好的题,综合很多知识点. 首先复习差分: 将原来的每个点a[i]转化为b[i]=a[i]^a[i+1],(如果是求和形式就是b[i]=a[i+1]-a[i]) 我们发现这样的方便在于我 ...
- 【HTML/XML 11】XML和HTML的混合使用
导读:在前面介绍了很多关于XML和HTML的东西,他们其实各有各的好处,在很多时候都需要结合起来使用.现在已经有XML和HTML结合的产物:XHTML(可扩展超文本标记语言).在本篇博客中,则主要介绍 ...
- 【开源项目11】组件间通信利器EventBus
概述及基本概念 **EventBus**是一个Android端优化的publish/subscribe消息总线,简化了应用程序内各组件间.组件与后台线程间 的通信.比如请求网络,等网络返回时通过Han ...
- 【C++ Primer | 11】关联容器(一)
在multimap或multiset中查找元素 第二种方法解释: #include <iostream> #include <utility> #include <ite ...
随机推荐
- 使用Delphi声明C++带函数的结构体实战 good
在小组开发中,应用程序部分采用Delphi7,一些组件使用C++做.在今天将一个动态库的C++接口声明头文件转换为D7的Unit单元时,一切都很顺利,直到遇到下面这样一个另类的东西: typedef ...
- HUD 1501 Zipper(记忆化 or DP)
Problem Description Given three strings, you are to determine whether the third string can be formed ...
- Delphi实现窗口一直在桌面工作区内显示(重写WM_WINDOWPOSCHANGING消息)
有的时候我们要实现一个悬浮窗口,并使该窗口一直显示在桌面的工作区内.即整个窗口要一直显示在屏幕上,不能超出屏幕的上下左右边缘.此功能的实现也不难,我们需要自己写代码来响应窗口的WM_WINDOWPOS ...
- Mybatis 3 返回布尔值,需要注意的地方
在Mybatis中,有时候需要返回布尔值 ,来确定某个记录行是否存在. 例如: <select id="isExistCode" parameterType="st ...
- 浅谈Jquery的使用上篇
一. 1.Jquery是什么?有什么特性? jQuery 是一个 JavaScript 函数库. jQuery 库包含以下特性: HTML 元素选取.HTML 元素操作. CSS 操作 .HTML 事 ...
- Android开发 - ActivityLifecycleCallbacks用法初探
ActivityLifecycleCallbacks是什么? Application通过此接口提供了一套回调方法,用于让开发人员对Activity的生命周期事件进行集中处理. 为什么用Activity ...
- aix 下 实现goldengate 随os启动而自己主动启动的脚本
aix 下 实现goldengate 随os启动而自己主动启动的脚本: 1.用oracle用户建立/u01/info.txt,文件内容例如以下: sh date start mgr 2.chmod + ...
- poj2096(概率dp)
题目连接:http://poj.org/problem?id=2096 题意:一个程序有m个子系统,要找出n种bug,某人一天找n种bug中的一种,求出他找出n种bug并且每个子系统中都有bug的天数 ...
- 解决IE11无法下载文件的问题
[问题描写叙述] 单击IE底部下载工具栏没反应,点击"另存为"也没反应 [解决方法] 打开IE11,依次打开菜单:Internet 选项 -> 高级 -> 重置,重置完 ...
- zoj3201(树形dp)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3201 题意:给一棵树, n结点<=1000, 和K < ...