1、配置crosstool-ng产生的错误

1.1 ncurses headers files were not found

Checking for 'ncurses/ncurses.h'... no

Checking for 'ncurses/curses.h'... no

Checking for 'ncurses.h'... no

Checking for 'curses.h'... no

ncurses headers files were not found

解决方法:

安装:ncurses,、libncurses-devel

1.2 flex none found

Checking for 'flex'... No

flex: none found

Either you are missing entirely the needed tool,

or the version you have is too old.

configure: Bailing out...

解决方法:

安装:flex,flexdll

1.3 automake 1.10 or above was not found

Checking for 'automake'... no

automake 1.10 or above was not found

Either you are missing entirely the needed tool,

or the version you have is too old.

configure: Bailing out...

解决方法:

安装:automake

1.4 libtool 1.5.26 or above was not found

Checking for 'libtool'... no

libtool 1.5.26 or above was not found

Either you are missing entirely the needed tool,

or the version you have is too old.

You can give the path to this tool using: --with-libtool=PATH

configure: Bailing out...

解决方法:

安装:libtool

注:
在配置crosstool-NG时,出现的类似“XXX:none found”的错误,都可以是该工具没有安装,把该工具安装上,重新配置即可。

1.5 ct-ng help命令检查时出错

crosstool-ng 安装成功后,用ct-ng help命令检查时,不认识该命令这多半是添加环境变量失败造成的,这时可以打开
/home/Administrator
目录下的.bashrc查看是否把windows里的其他环境变量添加到了.bashrc文件中,如果把多余的去掉,只保留cgywin自己的环境变量,如下所示:
PATH=/usr/local/bin:/usr/bin:/bin:/opt/crosstool-ng-1.9.3/bin
1.6 配置时的其他错误
在配置crosstool-NG时,也即执行
 ./configure --prefix=/opt/crosstool-ng
出现的类似“XXX:none found”的错误,都是相应工具没有安装造成的,重新运行setup.exe把该工具安装上,再执行该命令,即可。

2、编译交叉工具链产生的错误

2.1 targets' is *not* case-sensitive
Cygwin窗口的错误信息:
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[ERROR]  Your file system in '/home/Administrator/croosstool-ng/crosstool-ng-1.9.3/targets' is *not* case-sensitive!

[00:02] / make: *** [build] Error 1

unix 和Linux都是区分大小写的,cygwin既然是模拟unix环境,当然也是区分大小定的。

这个问题好解决,修改一下注册表就行了。

打开注册表,找到如下位置:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel
把“obcaseinsensitive”的值改为0,再重新启动电脑,cygwin下就区分大小写了。
如果觉得麻烦,可以把如下代码复制到记事本里(case-sensitive.txt):

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel]
"obcaseinsensitive"=dword:00000000
然后把记事本的后缀名改为.reg,(case-sensitive.reg),双击reg(case-sensitive.reg)文件即可,和上面的效果一样。

2.1 Installing static core C compiler failed
Cygwin窗口的错误信息:
[INFO ]  Installing static core C compiler

[EXTRA]    Configuring static core C compiler

[ERROR]    checking for C compiler default output file name... configure: error: C compiler cannot create executablesconf.tab.o

[ERROR]    Build failed in step 'Installing static core C compiler'

[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.1/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)x.o

[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.1/scripts/build/cc/gcc.sh' at line # 203 in function 'do_cc_core'il.o

[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.1/scripts/build/cc/gcc.sh' at line # 52 in function 'do_cc_core_pass_1'

[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.1/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR]    Look at '/home/Administrator/crosstool-ng/x-tools/arm-apollo-linux-gnueabi/build.log' for  more info on this error.

解决办法:

安装gcc4-g++,在编译的时候时需要C++的

参考:

http://hi.baidu.com/robin_l/blog/item/3087ffa1875a2d83471064bf.html

2.2 Build failed in step 'Installing D.U.M.A.'

Cygwin窗口的错误信息:

[INFO ]  Installing D.U.M.A.

[EXTRA]    Copying sources

[ERROR]    Build failed in step 'Installing D.U.M.A.'

[ERROR]Error happened in '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug/200-duma.sh' in function 'do_debug_duma_build' (line unknown, sorry)

[ERROR]    called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 35 in function 'do_debug'

[ERROR]    called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR]    Look at '/home/Administrator/ct-ng-1.9.3/crosstool-ng/x-tools/arm-apollo-linux-gnueabi/build.log' for more info on this error.

[ERROR]  (elapsed: 479:03.42)

[479:07] / make: *** [build] Error 1

Build.log中的提示如下:

[INFO ]  Installing D.U.M.A.

[EXTRA]    Copying sources

[ERROR]    Build failed in step 'Installing D.U.M.A.'

[ERROR] Error happened in '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug/

200-duma.sh' in function 'do_debug_duma_build' (line unknown, sorry)

[ERROR]   called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug.sh' at

line # 35 in function 'do_debug'

[ERROR]   called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR] Look at '/home/Administrator/ct-ng-1.9.3/crosstool-ng/x-tools/

arm-apollo-linux-gnueabi/build.log' for more info on this error.

[ERROR]  (elapsed: 479:03.42)

解决方法:

修改DUMA的Makefile文件:

$ tar -zxvf duma_2_5_15.tar.gz #解压源码包

$ cd duma_2_5_15

打开“GNUmakefile”,添加对cygwin的支持,也就是添加下面红色的一句

# some defaults:

CC=gcc

CXX=g++

AR=ar

RANLIB=ranlib

INSTALL=install

RM=rm

RMFORCE=rm -f

ECHO=echo

ECHOLF=echo

OS=cygwin

接下来重新把duma_2_5_15打包

$ cd ..

$ tar -zcvf duma_2_5_15.tar.gz  duma_2_5_15 #重新压缩源码

这个错误让我郁闷了几天,因为在build.log文件里的信息也没说出问题可能出在什么地方。

最后才在INSTALL文件里发现如果是在cygwin下编译需要修改Makefile文件

INSTALL文件的部分内容:

his documents describes if and how the library is installed on your system.

I. Linux/Unix environments (including Cygwin and MinGW):

Configure the options by editing the Makefile.

Read carefully the description of options at top of the Makefile.

Take care for the special OS/OSTYPE depending sections.

Especially if you are going to use the LD_PRELOAD mechanism.

Call GNU make often called 'gmake' for building the library.

GNU make is called 'mingw32-make' for MinGW.

Add option 'OSTYPE=msys' when calling make for MinGW.

Add option 'OSTYPE=cygwin' when calling make for Cygwin.

Add option 'OS=osx' when calling make for MacOS X or Darwin.

Add option 'OS=freebsd' when calling make for FreeBSD.

Add option 'OS=netbsd' when calling make for NetBSD.

Add option 'OS=solaris' when calling make for Solaris.

2.3 Build failed in step 'Installing ltrace'

Cygwin窗口的错误信息:

[INFO ]  Installing ltrace

[EXTRA]    Copying sources to build dir

[EXTRA]    Configuring ltrace

[EXTRA]    Building ltrace

[ERROR]    make[1]: *** [sysdeps/sysdep.o] Error 2

[ERROR]    Build failed in step 'Installing ltrace'

[ERROR]    Error happened in '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)

[ERROR]   called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug/400-ltrace.sh' at line # 52 in  function do_debug_ltrace_build'

[ERROR]          called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 35 in function 'do_debug'

[ERROR]          called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR]    Look at '/home/Administrator/ct-ng-1.9.3/crosstool-ng/x-tools/arm-apollo-linux-gnueabi/build.log'  for more info on this error.

[ERROR]  (elapsed: 591:35.21)

[591:39] / make: *** [build] Error 2

Build.log中的提示如下:

[ALL  ]    make[1]: Entering directory `/home/Administrator/ct-ng-1.9.3/crosstool-ng/

crosstool-ng-1.9.3_build/ targets/arm-apollo-linux-gnueabi/build/build-ltrace'

[ALL  ]    arm-apollo-linux-gnueabi-gcc -Wall -g -O2 -iquote /home/Administrator/

ct-ng-1.9.3/crosstool-ng/crosstool-ng-1.9.3_build/targets/arm-apollo-linux-gnueabi/build/

build-ltrace  -iquote /home/Administrator/ct-ng-1.9.3/crosstool-ng/crosstool-ng-1.9.3_build/

targets/arm-apollo-linux-gnueabi/build/build-ltrace/sysdeps/CYGWIN_NT-5.1 -DSYSCONFDIR="/usr/etc"   -c -o main.o main.c

[ALL  ]    /usr/bin/make -C sysdeps/CYGWIN_NT-5.1

[ALL  ]    make: Entering an unknown directory

[ALL  ]    make: *** sysdeps/CYGWIN_NT-5.1: No such file or directory.  Stop.

[ALL  ]    make: Leaving an unknown directory

[ERROR]    make[1]: *** [sysdeps/sysdep.o] Error 2

[ALL  ]    make[1]: Leaving directory `/home/Administrator/ct-ng-1.9.3/crosstool-ng/

crosstool-ng-1.9.3_build/targets/arm-apollo-linux-gnueabi/build/build-ltrace'

[ERROR]    Build failed in step 'Installing ltrace'

[ERROR]    Error happened in '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)

[ERROR]          called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug/

400-ltrace.sh'  at line # 52 in function 'do_debug_ltrace_build'

[ERROR]          called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 35 in function 'do_debug'

[ERROR]          called from '/opt/crosstool-ng-1.9.3/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR]    Look at '/home/Administrator/ct-ng-1.9.3/crosstool-ng/x-tools/

arm-apollo-linux-gnueabi/build.log' for more info on this error.

[ERROR]  (elapsed: 591:39)

解决方法:

在配置文件中把ltrace这一项去掉,原因很简单,ltrace不支持windows,只支持linux,在README文件中有说明,之所以能知道这个是受解决上一个错误的启发,查看了ltrace的README文件,原文如下:

4. Where does it work

---------------------

It works with ELF based Linux systems running on i386, m68k, S/390,

ARM, PowerPC, PowerPC64, IA64, AMD64, SPARC and Alpha processors.

It is part of at least Debian GNU/Linux, RedHat, SuSE, Mandrake...

2.4 Build failed in step 'Installing libelf for the target'

Cygwin窗口的错误信息:

[INFO ]  Installing libelf for the target

[EXTRA]    Configuring libelf

[EXTRA]    Building libelf

[ERROR]    make[2]: *** [de.cat] Segmentation fault (core dumped)

[ERROR]    make[1]: *** [all-recursive] Error 1

[ERROR]    Build failed in step 'Installing libelf for the target'

[ERROR]    Error happened in '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)

[ERROR] called from '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/build/companion_libs/libelf.sh'

at line # 87 in function 'do_libelf_target'

[ERROR]   called from '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/crosstool-NG.sh' at line #597 in function 'main'

[ERROR]  Look at '/home/Administrator/crosstool-ng/x-tools/arm-apollo-linux-gnueabi/

build.log' for more info on this error.

[ERROR]  (elapsed: 469:21.42)

[469:27] / make: *** [build] Error 2

Build.log的提示如下:

[ALL  ]    ranlib libelf.a

[ALL] make[2]: Leaving directory `/home/Administrator/crosstool-ng/crosstool-ng-1.9.1_build/

targets/arm-apollo-linux-gnueabi/build/build-libelf-for-target/lib'

[ALL  ]    making all in po

[ALL ] make[2]: Entering directory `/home/Administrator/crosstool-ng/crosstool-ng-1.9.1_build/

targets/arm-apollo-linux-gnueabi/build/build-libelf-for-target/po'

[ALL  ]    /usr/bin/gencat de.cat /home/Administrator/crosstool-ng/crosstool-ng-1.9.1_build/

targets/src/libelf-0.8.13/po/de.msg

[ERROR]    make[2]: *** [de.cat] Segmentation fault (core dumped)

[ALL  ]    make[2]: Leaving directory `/home/Administrator/crosstool-ng/

crosstool-ng-1.9.1_build/targets/arm-apollo-linux-gnueabi/build/build-libelf-for-target/po'

[ERROR]    make[1]: *** [all-recursive] Error 1

[ALL  ]    make[1]: Leaving directory `/home/Administrator/crosstool-ng/

crosstool-ng-1.9.1_build/targets/arm-apollo-linux-gnueabi/build/build-libelf-for-target'

[ERROR]    Build failed in step 'Installing libelf for the target'

[ERROR]    Error happened in '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)

[ERROR]          called from '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/build/companion_libs/

libelf.sh' at line # 87 in function 'do_libelf_target'

[ERROR]          called from '/opt/crosstool-ng//lib/ct-ng-1.9.1/scripts/crosstool-NG.sh' at line # 597 in function 'main'

[ERROR]    Look at '/home/Administrator/crosstool-ng/x-tools/arm-apollo-linux-gnueabi/

build.log' for more info on this error.

[ERROR]  (elapsed: 469:21.42)

这个问题是在用crosstool-ng-1.9.1时出现的,补丁也打了libelf可能用到的工具(libelf0-devel

libelf0,ELFIO,catgets)也都安装了,但都不能解决,年后crosstool-ng出了新版本1.9.3,我就用最新的crosstooo.-ng-1.9.3重新编译,这个错误没有再出现,这也算是解决了吧。

crosstool-ng 编译交叉工具链的常见错误及解决办法相关推荐

  1. php源码安装失败,php编译安装常见错误及解决办法

    php编译安装常见错误及解决办法 1.configure: error: No curses/termcap library found 网上有的说法是:–with-named-curses-libs ...

  2. VS2019运行OpenGL时出现的常见错误及解决办法

    OpenGL程序在低版本的VS中运行成功,但在VS2019中运行却出现各种错误,以下是常见错误的解决办法.(文章结尾有库的链接哟~) 问题一:无法打开文件"glaux.lib" 解 ...

  3. VLOOKUP常见错误及解决办法

    35-VLOOKUP常见错误及解决办法 2021-08-18 13:11 VLOOKUP是一个非常实用的查找函数,但在实际使用过程中,往往会出现这样那种的错误而得到不正确的结果. [这里备注下,如果你 ...

  4. MATLAB等号错误为啥,Matlab常见错误及解决办法归纳

    Matlab常见错误及解决办法归纳 1.Subscript indices must either be real positive integers or logicals 中文解释:下标索引必须是 ...

  5. php5编译安装常见错误和解决办法集锦

    最近在给开发同事折腾开发测试环境,其中就有 php 的编译安装.由于每个人的需求不一致,所以也接触到了各种模块编译和集成,中间不乏各种编译依赖报错. 正好,搜了几次都是下面 2 篇文章内容,干脆就转到 ...

  6. Oracle的常见错误及解决办法

    ORA-12528: TNS:listener: all appropriate instances are blocking new connections ORA-12528问题是因为监听中的服务 ...

  7. 创建与使用DLL项目常见错误和解决办法

    前面讲原理有点啰嗦,如果直接看创建和使用DLL,直接跳转到[DLL项目创建]. DLL 在Windows中,许多应用程序并不是一个完整的可执行文件,它们被分割成一些相对独立的动态链接库,即DLL文件, ...

  8. linux下QT Creator常见错误及解决办法

    最近因为在做一个关于linux下计算机取证的小项目,需要写一个图形界面,所以想到了用QT来写,选用了linux下的集成开发环境QT Creator5.5.1,但刚刚安装好,竟然连一个"hel ...

  9. IIS发布ASP.NET应用常见错误及解决办法

    常见错误 配置文件错误 具体错误类型为HTTP 错误 500.19 - Internal Server Error,错误描述为由于权限不足而无法读取配置文件. 该错误的可能原因是: 如同描述所说的,由 ...

最新文章

  1. self.navigationController push到指定控制器
  2. 成功解决The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver
  3. 【Flask】ORM一对一关联关系
  4. 神经网络 | Hopfield神经网络(附python源代码)
  5. 手机和工业计算机运算能力对比,手机CPU跟电脑CPU到底差多少?
  6. SpringMVC的数据响应-回写数据-返回对象或集合2(应用)
  7. 生产Java应用程序中的十大异常类型-基于1B事件
  8. java 方法 示例_Java集合的lastlastIndexOfSubList()方法和示例
  9. php获取微信图片访问权限,微信小程序访问图片出现403,图片防盗链的解决办法...
  10. VS C++ sprintf 格式
  11. PPT(默认设置快捷键的使用)
  12. Scrapy爬虫框架详解
  13. 智能眼镜上可否能有“MIUI”?
  14. Bailian——4074积水量
  15. 学生、课程、成绩三表sql查询
  16. 基于Python+深度学习+神经网络实现高度可用的生活垃圾分类机器人程序
  17. 分水岭算法--语义分割
  18. 用python搜索百度过滤广告_Python净化百度搜索结果!真正的做到无广告环境!
  19. Nginx与服务器集群
  20. 芯片测试随笔之一:采用Excel进行处理数据

热门文章

  1. datalistcp.class.php,Web_PHP_DedeCMS_datalistcp.class.php 动态分页类使用案例;
  2. Centos7 释放内存
  3. php的array跟go的array,实现类似php的array_column方法
  4. Python中最常用的 14 种数据可视化类型的概念与代码
  5. 你以为文言编程只是闹着玩?三个月后,人家IDE、教程、包管理器都有了
  6. 大熊猫“认脸”神器!扫一扫,人脸识别认证卖萌大熊猫
  7. wince 德赛西威2413_【图】GPS导航/Wince6.0系统 德赛西威迈腾车载导航改装评测_汽配中国网...
  8. 2020年最好用的手机是哪一款_2020年好评最多的三款手机,看看你在用哪款?
  9. pycharm 敲代码时的效果插件_精选Pycharm里6大神器插件
  10. 将null转换成数组_Javscript数组快速填充数据的8种方法