public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: Godmar Back <godmar@gmail.com>
Cc: crossgcc@sourceware.org
Subject: Re: ct-ng build fails with 'make[1]: *** [configure-binutils] Error  1'
Date: Sun, 06 Sep 2009 13:06:00 -0000	[thread overview]
Message-ID: <200909061506.48012.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <719dced30909050713rba74f29xec48dedc6c43a9dd@mail.gmail.com>

Godmar,
All,

On Saturday 05 September 2009 16:13:02 Godmar Back wrote:
[--SNIp--]
> Thank you for this tip. I saw that both x86_64-unknown-linux-uclibc
> and x86_64-unknown-linux-gnu were listed (the latter, I assume, is
> using the GNU C library), so I got adventurous and tried it instead of
> using the smaller uclibc. 3 hours and 20 mins later, it blows up with:
[--SNIP--]
> The error is caused by:
> [ALL  ]    x86_64-unknown-linux-gnu-gcc  sysdeps/sysdep.o ltrace.o
> options.o elf.o output.o read_config_file.o execute_program.o
> wait_for_something.o process_event.o display_args.o breakpoints.o
> proc.o demangle.o dict.o debug.o summary.o -lsupc++ -liberty  -o
> ltrace
> [ALL  ]    elf.o: In function `do_init_elf':
> [ALL  ]    /home/courses/cs3214/software/crossbuild/targets/x86_64-unknown-linux-gnu/build/build-ltrace/elf.c:48:
> undefined reference to `elf_begin'
> So, you may wish to remove x86_64-unknown-linux-gnu from the list of
> samples known to work out of the box.

Or I'll try to fix it...

> Looking at this more closely: elf_begin is traditionally in libelf.a,
> but the Makefile for ltrace does not specify -lelf. Adding -lelf
> doesn't work because x86_64...ranlib hasn't been run on libelf.a
> (although libelf.a has been built and installed in
> x-tools/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu//sys-root/usr/lib/../lib64/libelf.a
> ). Manually running x86_...ranlib on libelf.a, then specifying
> libelf.a on the link line does make ltrace link successfully. Good.
> Perhaps a patch is missing?  Or, dare I say, automake/autoconf screwed
> up again?

I'll look up this issue...

> After successfully building ltrace by hand in the build directory, I
> made the mistake of issuing a new ct-ng build command, hoping it would
> continue like an ordinary build, rather than starting from scratch;
> but it doesn't. Is there a way to make ct-ng continue after a failure?

crosstool-NG is not really a Makefile. It wont automagically restart
where it failed.

You can however set the following in the configuration menu:
  Paths and misc options -->
  [*] Debug crosstool-NG
  [ ]   Pause between every steps
  [*]   Save intermediate steps
  [*]     gzip saved states

Then run crosstool-NG as usual. If it breaks, you can try and fix the
issue, and then resume with:
  ct-ng RESTART="step-that-failed"

Eg. if it failed during the libc build:
  ct-ng RESTART=libc

Or you can use the shortcut (notice the trailing '+'):
  ct-ng libc+

> I then disabled ltrace in the configuration and, not wanting to risk
> anything, also strace, which is the last command that would be built.
> 69 minutes later (this time, with 4 parallel jobs), I ended up as the
> proud owner of a working x86_64 toolchain.

Yep. It you don't need the debug and tools, you can safely unselect them.

> Excellent, and thank you again for your help!

Cheers! :-)

> (*) I then couldn't withstand the temptation to actually run a
> statically compiled binary on a Ubuntu 8.10 machine with a x86_64
> 2.6.27 kernel. This triggered a "FATAL: Kernel too old" error in
> __libc_start_main. It used to be that Linux provided binary
> compatibility for static binaries; but those days are long past, it
> seems. Or is there a way to tell ct-ng to build a compiler/library
> whose static binaries will run on all kernels? Going through
> menuconfig, it appears you had to decide on a kernel version?

Look at the option:
  C-library  -->
  Minimum supported kernel version  -->
    ( ) Let ./configure decide
    (X) Same as kernel headers (default)
    ( ) Specific kernel version

This means that glibc is configured at build-time to enable (or disable)
support for old kernels, by including (or ommiting) certain functions
and/or code paths. By default, crosstool-NG configure glibc to not include
support for kernels older than the version of the headers being used to
build the toolchain. You can override this by choosing one of the two other
options, above.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq

  reply	other threads:[~2009-09-06 13:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  3:47 Godmar Back
2009-09-04  8:49 ` building patched gcc ng
2009-09-04 12:54   ` Thomas Petazzoni
2009-09-04 15:16   ` Yann E. MORIN
2009-09-04 15:07 ` ct-ng build fails with 'make[1]: *** [configure-binutils] Error 1' Yann E. MORIN
2009-09-04 19:03   ` Godmar Back
2009-09-04 22:20     ` Yann E. MORIN
2009-09-05 14:13       ` Godmar Back
2009-09-06 13:06         ` Yann E. MORIN [this message]
2009-09-06 13:34           ` Godmar Back
2009-09-06 13:39             ` Yann E. MORIN
2009-09-07 14:04               ` Godmar Back
2009-09-07 16:06                 ` Yann E. MORIN
2009-09-09 13:31                   ` Godmar Back
2009-09-09 19:56                     ` Yann E. MORIN
     [not found]                       ` <719dced30909092215qe1bf9a2i1d7f10f15733e11c@mail.gmail.com>
2009-09-10  5:16                         ` Godmar Back

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909061506.48012.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=crossgcc@sourceware.org \
    --cc=godmar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).