最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】编译配置好的xscale版本的crosstool-ng-1.18.0

crosstool-ng crifan 4763浏览 0评论

【背景】

折腾:

【记录】重试使用最新版本1.18.0的crosstool-ng去配置和编译xscale的交叉编译器

期间,配置好了:

【记录】crosstool-ng-1.18.0中配置xscale

然后此处接着编译。

【折腾过程】

1.开始编译:

ct-ng build

2.看到在下载gcc 4.2.2

所以决定中断:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130724.162024
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.97s (at 00:43)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[EXTRA]    Retrieving 'libelf-0.8.13'
[EXTRA]    Saving 'libelf-0.8.13.tar.gz' to local storage
[EXTRA]    Retrieving 'gcc-4.2.2'
[03:30] / /opt/crosstool-ng/bin/ct-ng:148: recipe for target `build' failed
make: *** [build] Interrupt

然后手动下载一下:

43MB的:gcc-4.2.2.tar.bz2

放到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\src

3.重新编译:

又看到在下载:

[EXTRA]    Retrieving 'gdb-6.8a'
[01:14] /

再次中断,手动下载:

15.2MB的gdb-6.8a.tar.bz2

4.再放到src,再重新编译:

又见下载:

[EXTRA]    Retrieving 'ncurses-5.9'

重复同样步骤,中断且手动下载:

2.7MB的ncurses-5.9.tar.gz

同理,针对:

expat-2.1.0

去:

http://sourceforge.net/projects/expat/files/expat/2.1.0/

下载,550KB的expat-2.1.0.tar.gz

5.终于可以一直往下进行了:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130724.163313
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 1.00s (at 00:48)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[EXTRA]    Retrieving 'ltrace_0.5.3.orig'
[EXTRA]    Saving 'ltrace_0.5.3.orig.tar.gz' to local storage
[INFO ]  Retrieving needed toolchain components' tarballs: done in 46.21s (at 01:35)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'linux-custom'
[EXTRA]    Extracting 'libelf-0.8.13'
[EXTRA]    Patching 'libelf-0.8.13'
[EXTRA]    Extracting 'binutils-2.22'
[EXTRA]    Patching 'binutils-2.22'
[EXTRA]    Extracting 'gcc-4.2.2'
[EXTRA]    Patching 'gcc-4.2.2'
[EXTRA]    Extracting 'glibc-2.9'
[EXTRA]    Patching 'glibc-2.9'
[EXTRA]    Extracting 'glibc-ports-2.9'
[EXTRA]    Patching 'glibc-ports-2.9'
[EXTRA]    Extracting 'dmalloc-5.5.2'
[EXTRA]    Patching 'dmalloc-5.5.2'
[EXTRA]    Extracting 'gdb-6.8a'
[EXTRA]    Patching 'gdb-6.8a'
[EXTRA]    Extracting 'ncurses-5.9'
[EXTRA]    Patching 'ncurses-5.9'
[EXTRA]    Extracting 'expat-2.1.0'
[EXTRA]    Patching 'expat-2.1.0'
[EXTRA]    Extracting 'ltrace-0.5.3'
[EXTRA]    Patching 'ltrace-0.5.3'
[EXTRA]    Extracting 'strace-4.5.19'
[EXTRA]    Patching 'strace-4.5.19'
[INFO ]  Extracting and patching toolchain components: done in 267.66s (at 06:03)
[EXTRA]  Saving state to restart at step 'libc_check_config'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_build'...
[EXTRA]  Saving state to restart at step 'binutils_for_build'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_host'...
[EXTRA]  Saving state to restart at step 'binutils_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[EXTRA]    Configuring binutils
[EXTRA]    Building binutils
[EXTRA]    Installing binutils
[INFO ]  Installing binutils for host: done in 793.78s (at 19:24)
[EXTRA]  Saving state to restart at step 'cc_core_pass_1'...
[INFO ]  =================================================================
[INFO ]  Installing pass-1 core C compiler
[EXTRA]    Configuring gcc
[EXTRA]    Building gcc
[22:37] \

6.结果出错:

【未解决】crosstool-ng编译出错:gcc-4.2.2/gcc/regrename.c:1646:12: error: ‘IFCVT_ALLOW_MODIFY_TEST_IN_INSN’ undeclared (first use in this function)

然后没解决。

7.接着又遇到错误:

【未解决】crosstool-ng编译arm的xscale时,编译gcc-4.2.4时出错:[libgcc/./_powisf2.o] Error 1,/tmp/cc7Xh6xp.s:21: Error: selected processor does not support ARM mode `fmsr s14,r0′

也没解决。

8.然后猜测可能是gcc版本的问题,所以:

从当前选择的4.2.2,换成之前:

【记录】crosstool-ng-1.18.0中配置xscale

中的默认的4.4.6:

┌─────────────────────────── C compiler

    C compiler (gcc)  —>                            
[ ] Show Linaro versions                              
    gcc version (4.4.6)  —>                         
    *** Additional supported languages: ***           
[*] C++                                               
[ ] Fortran                                           
[ ] Java                                              
    *** gcc other options ***                         
()  Flags to pass to –enable-cxx-flags               
()  Core gcc extra config                             
()  gcc extra config                                  
[*] Link libstdc++ statically into the gcc binary (NEW)

[ ] Use system zlib                                   
    *** Optimisation features ***                     
[*] Enable GRAPHITE loop optimisations (NEW)          
    *** Settings for libraries running on target ***  
[*] Optimize gcc libs for size                        
[ ] Compile libmudflap                                
[ ] Compile libgomp                                   
[ ] Compile libssp                                    
    *** Misc. obscure options. ***                    
[ ] Use __cxa_atexit                                  
[ ] Do not build PCH                                  
<M> Use sjlj for exceptions                           
<M> Enable 128-bit long doubles

from 4.2.2 change to 4.4.6 gcc_thumb

然后再去:

(1)先去:

http://ftp.gnu.org/gnu/gcc/

下载对应的

gcc-4.4.6.tar.bz2

拷贝到

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\src

中。

(2)再去重新编译

 

9.结果看到其在下载gmp:

[EXTRA]    Retrieving ‘gmp-5.0.2’

所以中断掉,手动下载:

gmp-5.0.2.tar.bz2

然后重新再去编译。

10.结果又出现其他的下载,所以干脆中断掉:

[EXTRA]    Using 'linux-custom' from custom location
[EXTRA]    Retrieving 'mpfr-3.1.0'
[EXTRA]    Saving 'mpfr-3.1.0.tar.xz' to local storage
[EXTRA]    Retrieving 'ppl-0.11.2'
[01:51] / /opt/crosstool-ng/bin/ct-ng:148: recipe for target `build' failed
make: *** [build] Interrupt

然后觉得好像不对,因为之前都没有ppl之类的。

11.所以再去看看配置,果然:

Companion libraries has many libs_thumb

Companion libraries中有了,之前没有的很多库,比如gmp,mpfr,ppl等等。

所以,把这几个库,暂时先去掉,结果却发现,这几个库,都是必选的,没法去掉。所以,暂且就这样吧。

12.继续编译。

但是先去下载:

ppl-0.11.2.tar.bz2

cloog-ppl-0.15.11.tar.gz

再去编译。

13.顺带说一下,从:

http://gcc.cybermirror.org/infrastructure/

中包括了很多库,cloog-ppl,gmp,mpfr等等,

和:

http://ftp.cs.pu.edu.tw/Linux/sourceware/gcc/infrastructure/

也包含了上述的库,可见:

gcc中,相关的,必要的一些库,比如:

cloog-ppl,gmp,mpfr

看来叫做:gcc的infrastructure

14.结果后来由于内存占用太多导致系统太卡,而中断停止编译了:

【未解决】用cygwin编译crosstool-ng,好像有内存泄露(memory leak)

15.后来有出错:

【未解决】cygwin下编译xscale的crosstool-ng时,gcc出错:[cc1-dummy.exe] Error 1

然后打算换个别的版本的cloog:

但是发现,0.15.11,已经是最新版本:

0.15.11 for cloog ppl

所以,看来需要去换gcc为更高版本了:

gcc version (4.6.0)  —>

change to 4.6.0 gcc

再继续去确认一下相关的库

不过发现,可以不选择那几个:

not use GRAPHITE and LTO

[ ] Enable GRAPHITE loop optimisations

[ ] Enable LTO

以使得,可以不用相关的cloog等库:

not cloog lib

去编译,发现要下载gcc:

[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[EXTRA]    Retrieving 'mpc-0.9'
[EXTRA]    Saving 'mpc-0.9.tar.gz' to local storage
[EXTRA]    Retrieving 'gcc-4.6.0'

再手动下载

gcc-4.6.0.tar.bz2

然后再编译。

16.后来又出现问题:

【未解决】编译crosstool-ng在Installing kernel headers时出错:Makefile:119: recipe for target `headers_install’ failed,make[1]: *** [headers_install] Error 2

17.后来,针对我们想要的arm-xscale-linux-gnueabi,找到一个,别人配置好的crosstool-ng:

for DLS’s arm-xscale-linux-gnueabi based on crosstool-NG version 1.4.2

对应的下载地址是:

crosstool-NG version 1.4.2

crosstool-ng.tgz

有空,可以直接拿过来,去编译一把试试。

18.如果当前,此处编译有问题的话,可以考虑参考:

Cross-compilation: linking fail

中的:

arm-xscale-linux-gnueabi-gcc (crosstool-NG 1.12.0) 4.3.6

去用4.3.6的gcc,再去试试,估计成功率会高些。

19.后来出现了错误:

【已解决】crosstool-ng在Installing C library headers & start files期间出错:Makefile:240: *** mixed implicit and normal rules. Stop.

20.然后继续编译:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng list-steps
Available build steps, in order:
  - libc_check_config
  - companion_libs_for_build
  - binutils_for_build
  - companion_libs_for_host
  - binutils_for_host
  - cc_core_pass_1
  - kernel_headers
  - libc_start_files
  - cc_core_pass_2
  - libc
  - cc_for_build
  - cc_for_host
  - libelf_for_target
  - binutils_for_target
  - debug
  - test_suite
  - finish
Use "<step>" as action to execute only that step.
Use "+<step>" as action to execute up to that step.
Use "<step>+" as action to execute from that step onward.

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng cc_for_build+
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130801.120146
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[ERROR]  The previous build did not reach the point where it could be restarted at 'cc_for_build'
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@331]
[ERROR]  >>        called from: CT_TestOrAbort[scripts/functions@361]
[ERROR]  >>        called from: CT_DoLoadState[scripts/functions@1308]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@620]


Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:~/develop/crosstool-ng/crosstool-ng-1.18.0_build> exit 3
exit
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/opt/crosstool-ng/share/doc/crosstool-ng/ct-ng.1.18.0/B - Known issues.txt'
[ERROR]
[ERROR]  (elapsed: 0:46.34)
[00:52] / /opt/crosstool-ng/bin/ct-ng:148: recipe for target `build' failed
make[1]: *** [build] Error 1
/opt/crosstool-ng/lib/ct-ng.1.18.0/steps.mk:66: recipe for target `cc_for_build+' failed
make: *** [cc_for_build+] Error 2

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng libc+
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130801.120248
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'libc', as requested.
[INFO ]  =================================================================
[INFO ]  Installing C library
[EXTRA]    Configuring C library
[EXTRA]    Building C library
[01:55] /

21.然后后来出错了:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng libc+
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130801.120248
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'libc', as requested.
[INFO ]  =================================================================
[INFO ]  Installing C library
[EXTRA]    Configuring C library
[EXTRA]    Building C library
[EXTRA]    Installing C library
[INFO ]  Installing C library: done in 2363.83s (at 39:54)
[EXTRA]  Saving state to restart at step 'cc_for_build'...
[EXTRA]  Saving state to restart at step 'cc_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[EXTRA]    Configuring gcc
[EXTRA]    Building gcc
[EXTRA]    Installing gcc
[INFO ]  Installing final compiler: done in 2009.01s (at 73:38)
[EXTRA]  Saving state to restart at step 'libelf_for_target'...
[INFO ]  =================================================================
[INFO ]  Installing libelf for the target
[EXTRA]    Configuring libelf
[EXTRA]    Building libelf
[EXTRA]    Installing libelf
[INFO ]  Installing libelf for the target: done in 66.24s (at 75:12)
[EXTRA]  Saving state to restart at step 'binutils_for_target'...
[INFO ]  =================================================================
[INFO ]  Installing binutils for target
[EXTRA]    Configuring binutils for target
[EXTRA]    Building binutils' libraries (libiberty bfd) for target
[EXTRA]    Installing binutils' libraries (libiberty bfd) for target
[INFO ]  Installing binutils for target: done in 499.47s (at 83:46)
[EXTRA]  Saving state to restart at step 'debug'...
[INFO ]  =================================================================
[INFO ]  Installing dmalloc
[EXTRA]    Configuring dmalloc
[EXTRA]    Building dmalloc
[EXTRA]    Installing dmalloc
[INFO ]  Installing dmalloc: done in 181.28s (at 87:14)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[EXTRA]    Configuring cross-gdb
[EXTRA]    Building cross-gdb
[ERROR]    make[2]: *** [configure-libiberty] Error 1
[ERROR]    make[2]: *** [configure-readline] Error 1
[ERROR]    make[1]: *** [all] Error 2
[92:33] /       1 [main] bash 913080 fork: child -1 - forked process died unexpectedly, retry 0, exit code -1073741819, errno 11
/opt/crosstool-ng/lib/ct-ng.1.18.0/scripts/functions: fork: retry: Resource temporarily unavailable
/opt/crosstool-ng/lib/ct-ng.1.18.0/scripts/functions: fork: Resource temporarily unavailable
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[92:35] /       3 [main] bash 12344 fork: child -1 - forked process died unexpectedly, retry 0, exit code -1073741819, errno 11
/opt/crosstool-ng/lib/ct-ng.1.18.0/scripts/functions: fork: retry: Resource temporarily unavailable
/opt/crosstool-ng/lib/ct-ng.1.18.0/scripts/functions: fork: Resource temporarily unavailable
/opt/crosstool-ng/bin/ct-ng:148: recipe for target `build' failed
make[1]: *** [build] Error 254
/opt/crosstool-ng/lib/ct-ng.1.18.0/steps.mk:66: recipe for target `libc+' failed
make: *** [libc+] Error 2

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$

结果发现又是内存不够了:

[ALL  ]    checking for bcmp... checking for isxdigit... yes
[ALL  ]    rm -f libdecnumber.a
[ALL  ]    i686-build_pc-cygwin-ar cru libdecnumber.a decNumber.o decContext.o decimal32.o decimal64.o decimal128.o 
[ALL  ]    checking for getuid... i686-build_pc-cygwin-ranlib libdecnumber.a
[ALL  ]    make[3]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-gdb-cross/libdecnumber'
[ALL  ]    yes
[ALL  ]    yes
[ALL  ]    checking for bcopy... yes
[ALL  ]    checking for getpwent... checking for mempcpy... yes
[ALL  ]    yes
[ALL  ]    checking for bsearch... yes
[ALL  ]    checking for getpwnam... checking for munmap... yes
[ALL  ]    checking for bzero... yes
[ALL  ]    yes
[ALL  ]    checking for getpwuid... checking for putenv... yes
[ALL  ]    yes
[ALL  ]    checking for calloc... checking for working strcoll... yes
[ALL  ]    checking for setenv... yes
[ALL  ]    yes
[ALL  ]    checking fcntl.h usability... checking for clock... yes
[ALL  ]    checking for setlocale... yes
[ALL  ]    checking fcntl.h presence... yes
[ALL  ]    yes
[ALL  ]    checking for fcntl.h... yes
[ALL  ]    checking for ffs... yes
[ALL  ]    checking for unistd.h... (cached) yes
[ALL  ]    checking for stpcpy... checking for stdlib.h... (cached) yes
[ALL  ]    yes
[ALL  ]    checking varargs.h usability... checking for getcwd... yes
[ALL  ]    no
[ALL  ]    checking varargs.h presence... checking for strcasecmp... no
[ALL  ]    checking for varargs.h... yes
[ALL  ]    no
[ALL  ]    checking stdarg.h usability... yes
[ALL  ]    checking for getpagesize... checking for strdup... yes
[ALL  ]    checking stdarg.h presence... yes
[ALL  ]    no
[ALL  ]    configure: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!
[ALL  ]    configure: WARNING: stdarg.h: proceeding with the compiler's result
[ALL  ]    checking for stdarg.h... yes
[ALL  ]    yes
[ALL  ]    checking for gettimeofday... checking for string.h... (cached) yes
[ALL  ]    checking for strtoul... checking for strings.h... (cached) yes
[ALL  ]    checking limits.h usability... yes
[ALL  ]    checking for index... yes
[ALL  ]    yes
[ALL  ]    checking limits.h presence... checking for tsearch... yes
[ALL  ]    checking for limits.h... yes
[ALL  ]    yes
[ALL  ]    checking locale.h usability... checking for insque... yes
[ALL  ]    checking for __argz_count... yes
[ALL  ]    checking locale.h presence... yes
[ALL  ]    yes
[ALL  ]    checking for locale.h... yes
[ALL  ]    checking for memchr... yes
[ALL  ]    checking pwd.h usability... /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/tools/bin/sed: line 2: /usr/bin/sed: Cannot allocate memory
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/tools/bin/sed: line 2: /usr/bin/sed: No error
[ALL  ]    checking for __argz_stringify... /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/intl/configure: line 5758: ${+set}: bad substitution
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: line 4864: /usr/bin/cat: Cannot allocate memory
[ALL  ]    yes
[ALL  ]          1 [main] sh 898640 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/libiberty/configure: fork: Cannot allocate memory
[ALL  ]       6504 [main] sh 898640 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/libiberty/configure: fork: Cannot allocate memory
[ALL  ]       7777 [main] sh 898640 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/libiberty/configure: fork: Cannot allocate memory
[ALL  ]       8436 [main] sh 898640 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/libiberty/configure: fork: Cannot allocate memory
[ERROR]    make[2]: *** [configure-libiberty] Error 1
[ALL  ]    make[2]: *** Waiting for unfinished jobs....
[ALL  ]          1 [main] sh 969360 child_copy: data read copy failed, 0x467000..0x480694, done 0, windows pid 969360, Win32 error 299
[ALL  ]          1 [main] sh 923252 fork: child -1 - forked process died unexpectedly, retry 0, exit code -1073741819, errno 11
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: retry: Resource temporarily unavailable
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: Resource temporarily unavailable
[ALL  ]     332083 [main] sh 969304 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: Cannot allocate memory
[ALL  ]     344413 [main] sh 969464 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: Cannot allocate memory
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: line 29: /usr/bin/cat: Cannot allocate memory
[ALL  ]     408818 [main] sh 923252 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: Cannot allocate memory
[ALL  ]     409134 [main] sh 927432 fork: child -1 - CreateProcessW failed for 'D:tmptmp_dev_rootcgwinbinsh.exe', errno 12
[ALL  ]    /home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/gdb-6.8a/readline/configure: fork: Cannot allocate memory
[ERROR]    make[2]: *** [configure-readline] Error 1
[ALL  ]    make[2]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-gdb-cross'
[ERROR]    make[1]: *** [all] Error 2
[ALL  ]    make[1]: Leaving directory `/home/CLi/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-gdb-cross'
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'

只能再重启,然后继续编译。

22.重启了,继续编译:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng debug+
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130801.143515
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'debug', as requested.
[INFO ]  =================================================================
[INFO ]  Installing dmalloc
[EXTRA]    Configuring dmalloc
[EXTRA]    Building dmalloc
[EXTRA]    Installing dmalloc
[INFO ]  Installing dmalloc: done in 162.36s (at 03:47)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[EXTRA]    Configuring cross-gdb
[EXTRA]    Building cross-gdb
[12:40] -

最后终于编译成功了:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng debug+
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130801.143515
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'debug', as requested.
[INFO ]  =================================================================
[INFO ]  Installing dmalloc
[EXTRA]    Configuring dmalloc
[EXTRA]    Building dmalloc
[EXTRA]    Installing dmalloc
[INFO ]  Installing dmalloc: done in 162.36s (at 03:47)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[EXTRA]    Configuring cross-gdb
[EXTRA]    Building cross-gdb
[EXTRA]    Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 993.02s (at 20:20)
[INFO ]  =================================================================
[INFO ]  Installing native gdb
[EXTRA]    Building static target ncurses
[EXTRA]    Building static target expat
[EXTRA]    Configuring native gdb
[EXTRA]    Building native gdb
[EXTRA]    Installing native gdb
[INFO ]  Installing native gdb: done in 2159.95s (at 56:20)
[INFO ]  =================================================================
[INFO ]  Installing gdbserver
[EXTRA]    Configuring gdbserver
[EXTRA]    Building gdbserver
[EXTRA]    Installing gdbserver
[INFO ]  Installing gdbserver: done in 125.47s (at 58:26)
[INFO ]  =================================================================
[INFO ]  Installing ltrace
[EXTRA]    Copying sources to build dir
[EXTRA]    Configuring ltrace
[EXTRA]    Building ltrace
[EXTRA]    Installing ltrace
[INFO ]  Installing ltrace: done in 21.45s (at 58:48)
[INFO ]  =================================================================
[INFO ]  Installing strace
[EXTRA]    Configuring strace
[EXTRA]    Building strace
[EXTRA]    Installing strace
[INFO ]  Installing strace: done in 145.20s (at 61:14)
[EXTRA]  Saving state to restart at step 'test_suite'...
[EXTRA]  Saving state to restart at step 'finish'...
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[EXTRA]    Installing the populate helper
[EXTRA]    Installing a cross-ldd helper
[EXTRA]    Creating toolchain aliases
[EXTRA]    Removing access to the build system tools
[EXTRA]    Removing installed documentation
[INFO ]  Cleaning-up the toolchain's directory: done in 40.24s (at 62:55)
[INFO ]  Build completed at 20130801.153805
[INFO ]  (elapsed: 1343:39.41)
[INFO ]  Finishing installation (may take a few seconds)...
[62:56] /
CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.18.0_build
$

不容易啊。。。

 

【总结】

历尽千辛万苦,最后终于算是在cygwin下面,成功编译for xscale的crosstool-ng。

总结一下当前所用的主要配置:

CT_ARCH="arm"

CT_ARCH_ARCH="armv5te"
CT_ARCH_CPU="xscale"
CT_ARCH_TUNE="xscale"

CT_ARCH_USE_MMU=y
CT_ARCH_ENDIAN="little"

CT_ARCH_FLOAT_SOFTFP=y
CT_ARCH_FLOAT="softfp"

CT_TARGET_VENDOR="xscale"

CT_KERNEL_LINUX_CUSTOM=y
CT_KERNEL_LINUX_CUSTOM_LOCATION="${HOME}/develop/crosstool-ng/src/linux-2.6.19.1.tar.bz2"

CT_BINUTILS_V_2_22=y
CT_BINUTILS_VERSION="2.22"

CT_CC="gcc"
CT_CC_VERSION="4.6.0"

CT_LIBC="glibc"
CT_LIBC_VERSION="2.9"

CT_STRACE_V_4_5_19=y

CT_DMALLOC_V_5_5_2=y

CT_GDB_V_6_8a=y
CT_GDB_VERSION="6.8a"

CT_GMP_V_5_0_2=y
CT_GMP_VERSION="5.0.2"

CT_MPFR_V_3_1_0=y
CT_MPFR_VERSION="3.1.0"

CT_MPC_V_0_9=y
CT_MPC_VERSION="0.9"

CT_LIBELF_V_0_8_13=y
CT_LIBELF_VERSION="0.8.13"

CT_COMP_TOOLS=y
CT_COMP_TOOLS_make=y

 

然后,再把当前所用的配置,即原先的.config的全部内容,改了个更容易理解的名字,上传到自己网站上,供下载(右键另存为):

crosstool_ng_1_18_0_for_xscale.config

 

注:

上述配置文件的用法:

下载该配置文件后,另存为.config -> 把.config文件放到crosstool-ng的当前路径下 -> ct-ng menuconfig -> Load an Alternate Configuration File -> 输入配置文件名.config -> OK,即可加载所有的配置。

转载请注明:在路上 » 【记录】编译配置好的xscale版本的crosstool-ng-1.18.0

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.210 seconds, using 22.22MB memory