This is the mail archive of the mailing list for the crossgcc project.

See crosstool-NG for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crosstool Build Still Fails under Cygwin

Thanks for the useful information! I'll have to try it again.


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

when build fail, will show a interactive shell, like this:
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from:
[ERROR]  >>        called from:
[ERROR]  >>        called from: main[scripts/]

Current command:
   'make' '-C'
'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


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

Crifan Li

Riverhead Technology
Jeremy Cole-Baker
Ph. (+64) 27 673 0129

For unsubscribe information see

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]