Crosstool Build Still Fails under Cygwin
Jeremy Cole-Baker
jeremy@rhtech.co.nz
Thu Sep 5 20:33:00 GMT 2013
Thanks for the useful information! I'll have to try it again.
-Jeremy
On 6/09/2013 2:47 a.m., Crifan Li wrote:
> Hi Jeremy,
> About your said "Also, if it is possible to get it working, is
> there a way to resume from the point where the build failed? Since it
> took 10 hours to get there..."
> several tricks to save time when build crosstool-ng:
>
> in ct-ng menuconfig, to config like this:
>
> 1.use multiple thread compile
> Paths and misc options
> (4) Number of parallel jobs
>
> 4 means 4 threads to compile crosstool-ng
> about thread number:
> "A good rule of thumb is twice the number of processors you have."
> here my cpu is Intel two core, so use 4.
>
> 2.resume from fail step
> Paths and misc options
> [*] Debug crosstool-NG
> [*] Save intermediate steps
>
> how to restore fail step, then continue build:
> basic logic is:
> ct-ng last_successful_step+
> detail is :
> (1) see existing steps
>
> 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.
>
> (2) when fail, let's say, on step cc_core_pass_1
> so last successful step is: binutils_for_host
> so, after you fix problem, then do:
> ct-ng binutils_for_host+
> so can restore binutils_for_host, then continue compile
>
> 3.use interactive shell when fail -> when error, can fix error then
> continue build
>
> Paths and misc options
> [*] Debug crosstool-NG
> [*] Interactive shell on failed commands
>
> then:
> when build fail, will show a interactive shell, like this:
> ......
> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
> [ERROR] >> called from:
> do_kernel_install[scripts/build/kernel/linux.sh@112]
> [ERROR] >> called from:
> do_kernel_headers[scripts/build/kernel/linux.sh@91]
> [ERROR] >> called from: main[scripts/crosstool-NG.sh@632]
>
>
> Current command:
> 'make' '-C'
> '/home/crifan/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/linux-custom'
> 'O=/home/crifan/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-xscale-linux-gnueabi/build/build-kernel-headers'
> 'ARCH=arm'
> 'INSTALL_HDR_PATH=/home/crifan/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/sysroot/usr'
> 'V=0' 'headers_install'
> exited with error code: 2
> Please fix it up and finish by exiting the shell with one of these values:
> 1 fixed, continue with next build command
> 2 repeat this build command
> 3 abort build
>
> ct-ng:~/develop/crosstool-ng/crosstool-ng-1.18.0_build>
>
> then, after you fix error,
> let's say, vi to edit the xxx.c to fix some bug,
> then do:
> exit 2
> to re-run the last fail command, to continue compile your xxx.c
> then can go through, can continue build.
>
>
> more detailed explain can refer my tutorial:
> (note: written in Chinese, you can use google translate to english if
> necessary)
> http://www.crifan.com/files/doc/docbook/crosstool_ng/release/htmls/crosstool_ng_config_para.html#multi_thread_save_time
>
>
> http://www.crifan.com/files/doc/docbook/crosstool_ng/release/htmls/crosstool_ng_config_para.html#restore_from_fail_step
>
>
> http://www.crifan.com/files/doc/docbook/crosstool_ng/release/htmls/crosstool_ng_config_para.html#error_but_not_exit
>
>
> BR,
> Crifan Li
>
>
--
Riverhead Technology
Jeremy Cole-Baker
Ph. (+64) 27 673 0129
www.rhtech.co.nz
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list