LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-11-2008, 02:52 AM   #1
Yaro
Member
 
Registered: Nov 2008
Posts: 41

Rep: Reputation: 21
Cross Linux From Scratch 5.7: Problems Making binutils-2.18


Hello. I am new to Linux From Scratch. Since I have a 64-bit machine I learned I would have to do CLFS to make my distro. Now, on to my problem.

Everything works fine until 5.7 in CLFS, wherein I encounter errors in building binutils.

I've searched and searched and founf no answer to this problem elsewhere, and the CLFS IRC channel has nothing but idles.

Anyway, here's the last part of my console output. Too much to post the complete so I just snagged what I believe are the relevant bits.

Code:
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.18/gas -I. -D_GNU_SOURCE -I. -I../../binutils-2.18/gas -I../bfd -I../../binutils-2.18/gas/config -I../../binutils-2.18/gas/../include -I../../binutils-2.18/gas/.. -I../../binutils-2.18/gas/../bfd -DLOCALEDIR="\"/cross-tools/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.18/gas/read.c
cc1: warnings being treated as errors
../../binutils-2.18/gas/read.c: In function 'do_s_func':
../../binutils-2.18/gas/read.c:5631: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
../../binutils-2.18/gas/read.c:5638: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
make[3]: *** [read.o] Error 1
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.18/gas -I. -D_GNU_SOURCE -I. -I../../binutils-2.18/gas -I../bfd -I../../binutils-2.18/gas/config -I../../binutils-2.18/gas/../include -I../../binutils-2.18/gas/.. -I../../binutils-2.18/gas/../bfd -DLOCALEDIR="\"/cross-tools/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.18/gas/stabs.c
cc1: warnings being treated as errors
../../binutils-2.18/gas/stabs.c: In function 'stabs_generate_asm_func':
../../binutils-2.18/gas/stabs.c:670: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
../../binutils-2.18/gas/stabs.c: In function 'stabs_generate_asm_endfunc':
../../binutils-2.18/gas/stabs.c:696: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
make[3]: *** [stabs.o] Error 1
make[3]: Target `all-am' not remade because of errors.
make[3]: Leaving directory `/mnt/clfs/sources/binutils-build/gas'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/binutils-build/gas'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/clfs/sources/binutils-build/gas'
make: *** [all-gas] Error 2
make[1]: Entering directory `/mnt/clfs/sources/binutils-build/gprof'
make  all-recursive
make[2]: Entering directory `/mnt/clfs/sources/binutils-build/gprof'
Making all in po
make[3]: Entering directory `/mnt/clfs/sources/binutils-build/gprof/po'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/mnt/clfs/sources/binutils-build/gprof/po'
make[3]: Entering directory `/mnt/clfs/sources/binutils-build/gprof'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/mnt/clfs/sources/binutils-build/gprof'
make[2]: Leaving directory `/mnt/clfs/sources/binutils-build/gprof'
make[1]: Leaving directory `/mnt/clfs/sources/binutils-build/gprof'
make[1]: Entering directory `/mnt/clfs/sources/binutils-build/ld'
Making info in po
make[2]: Entering directory `/mnt/clfs/sources/binutils-build/ld/po'
make[2]: Nothing to be done for `info'.
make[2]: Leaving directory `/mnt/clfs/sources/binutils-build/ld/po'
make[2]: Entering directory `/mnt/clfs/sources/binutils-build/ld'
make[2]: Nothing to be done for `info-am'.
make[2]: Leaving directory `/mnt/clfs/sources/binutils-build/ld'
make  all-recursive
make[2]: Entering directory `/mnt/clfs/sources/binutils-build/ld'
Making all in po
make[3]: Entering directory `/mnt/clfs/sources/binutils-build/ld/po'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/mnt/clfs/sources/binutils-build/ld/po'
make[3]: Entering directory `/mnt/clfs/sources/binutils-build/ld'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/mnt/clfs/sources/binutils-build/ld'
make[2]: Leaving directory `/mnt/clfs/sources/binutils-build/ld'
make[1]: Leaving directory `/mnt/clfs/sources/binutils-build/ld'
make: Target `all-host' not remade because of errors.
Any ideas on how I can solve this problem and get on with my build? Not even make -k is helping.
 
Old 11-11-2008, 04:05 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
The "-Werror" bit seems to be tripping you up - all warnings are now being treated as errors. Try turning that off first and see how you go.

Also be very careful about how your environment is set up; you don't want to accidentally use your 32-bit tools when you don't mean to.

You shouldn't follow CLFS strictly either - it's more like doing LFS except that you need to consult CLFS to build a cross-compiler so you can build 64-bit tools on your 32-bit system. Personally, if I were doing that, I would still use all the LFS sources rather than the CLFS sources - the down side is that you need to spend time setting up the configuration parameters so that the tools are all built correctly.

Have fun.
 
Old 11-11-2008, 01:29 PM   #3
Yaro
Member
 
Registered: Nov 2008
Posts: 41

Original Poster
Rep: Reputation: 21
How do I get the Make not to use the -Werror bit in there? I'm not exactly running this compiler manually.

I'm running this from a 64-bit Linux host, is that contributory?
 
Old 11-12-2008, 03:00 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
You need to check whatever script invoke 'Make' to see if they pass a "CFLAGS=" parameter or else set a 'CFLAGS' environment variable. Also look at any Makefile to see if CFLAGS has -Werrors set there. In cases where Makefile is generated via the automake/autoconf tools, you make need to edit Makefile.in.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
thinking about cross linux from scratch... am i ready tommytomthms5 Linux - Newbie 4 12-24-2007 12:12 PM
Troubles in building cross compiler (error @ binutils) saistain Linux - Software 3 10-15-2007 06:37 AM
Binutils, Cross Compiling problems sci3ntist Programming 1 08-09-2007 06:11 PM
Linux From Scratch - Chapter 5 - Binutils tompickles Linux From Scratch 25 10-21-2006 02:08 PM
LXer: Distribution Release: Cross Linux From Scratch 1.0.0 LXer Syndicated Linux News 0 09-27-2006 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration