From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21519 invoked by alias); 6 Sep 2009 13:06:58 -0000 Received: (qmail 21511 invoked by uid 22791); 6 Sep 2009 13:06:57 -0000 X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_05,J_CHICKENPOX_74,RCVD_IN_JMF_BL X-Spam-Check-By: sourceware.org Received: from smtp27.orange.fr (HELO smtp27.orange.fr) (80.12.242.94) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Sep 2009 13:06:51 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2704.orange.fr (SMTP Server) with ESMTP id D17F320000A7; Sun, 6 Sep 2009 15:06:48 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2704.orange.fr (SMTP Server) with ESMTP id C48CC20000A9; Sun, 6 Sep 2009 15:06:48 +0200 (CEST) Received: from r-lnx-leminkainen.bzh.lan (ARennes-252-1-6-178.w83-195.abo.wanadoo.fr [83.195.37.178]) by mwinf2704.orange.fr (SMTP Server) with ESMTP id 94ED520000A7; Sun, 6 Sep 2009 15:06:48 +0200 (CEST) From: "Yann E. MORIN" To: Godmar Back Subject: Re: ct-ng build fails with 'make[1]: *** [configure-binutils] Error 1' Date: Sun, 06 Sep 2009 13:06:00 -0000 User-Agent: KMail/1.9.9 Cc: crossgcc@sourceware.org References: <719dced30909032047j74b8ca79pdb8a9de31ea5ac7@mail.gmail.com> <200909050020.13964.yann.morin.1998@anciens.enib.fr> <719dced30909050713rba74f29xec48dedc6c43a9dd@mail.gmail.com> In-Reply-To: <719dced30909050713rba74f29xec48dedc6c43a9dd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909061506.48012.yann.morin.1998@anciens.enib.fr> X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00019.txt.bz2 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