日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時(shí)間:2024/9/5 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 crosstool-ng 编译交叉工具链的常见错误及解决办法 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1、配置crosstool-ng產(chǎn)生的錯(cuò)誤

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時(shí),出現(xiàn)的類(lèi)似“XXX:none found”的錯(cuò)誤,都可以是該工具沒(méi)有安裝,把該工具安裝上,重新配置即可。

1.5 ct-ng help命令檢查時(shí)出錯(cuò)

crosstool-ng 安裝成功后,用ct-ng help命令檢查時(shí),不認(rèn)識(shí)該命令這多半是添加環(huán)境變量失敗造成的,這時(shí)可以打開(kāi)
/home/Administrator
目錄下的.bashrc查看是否把windows里的其他環(huán)境變量添加到了.bashrc文件中,如果把多余的去掉,只保留cgywin自己的環(huán)境變量,如下所示:
PATH=/usr/local/bin:/usr/bin:/bin:/opt/crosstool-ng-1.9.3/bin
1.6 配置時(shí)的其他錯(cuò)誤
在配置crosstool-NG時(shí),也即執(zhí)行
?./configure --prefix=/opt/crosstool-ng
出現(xiàn)的類(lèi)似“XXX:none found”的錯(cuò)誤,都是相應(yīng)工具沒(méi)有安裝造成的,重新運(yùn)行setup.exe把該工具安裝上,再執(zhí)行該命令,即可。

?

2、編譯交叉工具鏈產(chǎn)生的錯(cuò)誤

2.1 targets' is *not* case-sensitive
Cygwin窗口的錯(cuò)誤信息:
$ 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都是區(qū)分大小寫(xiě)的,cygwin既然是模擬unix環(huán)境,當(dāng)然也是區(qū)分大小定的。?

這個(gè)問(wèn)題好解決,修改一下注冊(cè)表就行了。

打開(kāi)注冊(cè)表,找到如下位置:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel
把“obcaseinsensitive”的值改為0,再重新啟動(dòng)電腦,cygwin下就區(qū)分大小寫(xiě)了。
如果覺(jué)得麻煩,可以把如下代碼復(fù)制到記事本里(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窗口的錯(cuò)誤信息:
[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++,在編譯的時(shí)候時(shí)需要C++的

參考:

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

?

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

Cygwin窗口的錯(cuò)誤信息:

[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

打開(kāi)“GNUmakefile”,添加對(duì)cygwin的支持,也就是添加下面紅色的一句

# some defaults:

CC=gcc

CXX=g++

AR=ar

RANLIB=ranlib

INSTALL=install

RM=rm

RMFORCE=rm -f

ECHO=echo

ECHOLF=echo

OS=cygwin

接下來(lái)重新把duma_2_5_15打包

$ cd ..

$ tar -zcvf duma_2_5_15.tar.gz ?duma_2_5_15?#重新壓縮源碼

?

這個(gè)錯(cuò)誤讓我郁悶了幾天,因?yàn)樵赽uild.log文件里的信息也沒(méi)說(shuō)出問(wèn)題可能出在什么地方。

最后才在INSTALL文件里發(fā)現(xiàn)如果是在cygwin下編譯需要修改Makefile文件

INSTALL文件的部分內(nèi)容:

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窗口的錯(cuò)誤信息:

[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這一項(xiàng)去掉,原因很簡(jiǎn)單,ltrace不支持windows,只支持linux,在README文件中有說(shuō)明,之所以能知道這個(gè)是受解決上一個(gè)錯(cuò)誤的啟發(fā),查看了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窗口的錯(cuò)誤信息:

[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)

這個(gè)問(wèn)題是在用crosstool-ng-1.9.1時(shí)出現(xiàn)的,補(bǔ)丁也打了libelf可能用到的工具(libelf0-devel

libelf0,ELFIO,catgets)也都安裝了,但都不能解決,年后crosstool-ng出了新版本1.9.3,我就用最新的crosstooo.-ng-1.9.3重新編譯,這個(gè)錯(cuò)誤沒(méi)有再出現(xiàn),這也算是解決了吧。

總結(jié)

以上是生活随笔為你收集整理的crosstool-ng 编译交叉工具链的常见错误及解决办法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 欧美xxx在线观看 | 激情五月开心婷婷 | 男女啪啪免费看 | 少妇高潮一区二区三区 | 国精产品一区一区三区在线 | 亚洲第九十九页 | 上原亚衣在线观看 | 色欧美在线 | 手机福利视频 | 成人免费看高清电影在线观看 | 国产一级淫片免费 | 亚洲精品www. | 蜜臀久久久久久999 大陆熟妇丰满多毛xxxⅹ | av字幕网| 美女一级| 日本a级黄| 亚洲美女性生活视频 | 日本不卡视频一区二区三区 | 中文有码视频 | 欧美在线视频一区二区三区 | 久久久久久久蜜桃 | 久久黄色视 | 91大神视频在线播放 | 久热精品在线 | 一级片视频免费观看 | 亚洲 欧美 激情 另类 校园 | 无码人妻精品一区二区50 | 久久无吗视频 | 欧美在线一二三 | 国产精品刺激 | 大尺度摸揉捏胸床戏视频 | 日本视频免费在线 | 亚洲激情电影在线 | 九色激情网 | 色先锋av | 强videoshd酒醉 | 亚洲高清视频在线观看 | 免费h片网站 | 久久综合热 | 少妇性生活视频 | 高清国产mv在线观看 | 67194少妇| 久久成年人视频 | 波多野结衣之双调教hd | 真实偷拍激情啪啪对白 | 亚洲人成色777777老人头 | 四虎福利 | 黄色小视频链接 | 五月婷婷六月激情 | 超碰碰碰 | 日本视频黄色 | 成人午夜激情 | 男人av资源| jizz欧美大全 | 亚洲妇女体内精汇编 | 伊人久久成人 | 久久亚洲aⅴ无码精品 | 宅男的天堂 | 久久视频在线免费观看 | 九九看片 | 91在线观看网站 | 欧洲美女粗暴牲交免费观看 | 亚洲做受高潮无遮挡 | 青娱乐av在线 | 欧美日本 | 激情文学8888 | 性xxxfllreexxx少妇 | 亚洲视频在线观看 | 日韩精品网址 | 精彩视频一区二区三区 | 国产20页 | 福利影院在线观看 | 亚洲精品国产精品国自产观看浪潮 | 浮妇高潮喷白浆视频 | 青青草原在线免费 | 人人爱人人射 | 四虎成人精品永久免费av九九 | 男人舔女人下部高潮全视频 | 亚洲国产aⅴ成人精品无吗 日韩乱论 | 亚洲m码 欧洲s码sss222 | 精品99久久| 中文av在线播放 | 国产三级三级在线观看 | 久久成人高清 | 亚洲一级av无码毛片精品 | 国产精品影院在线观看 | 性生活视频软件 | 成人手机在线免费视频 | 伊人网综合在线 | 理论片中文 | 一级爱爱免费视频 | 日日夜夜人人 | 欧美bbbbbbbbbbbb18av | 精品免费在线视频 | 中文字幕在线视频一区二区三区 | 河北彩花av在线播放 | 免费高清视频一区二区三区 | 国产精品熟妇一区二区三区四区 | 青青草国内自拍 |