LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Cross Linux From Scratch 5.7: Problems Making binutils-2.18 (https://www.linuxquestions.org/questions/linux-from-scratch-13/cross-linux-from-scratch-5-7-problems-making-binutils-2-18-a-682564/)

Yaro 11-11-2008 02:52 AM

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.

pinniped 11-11-2008 04:05 AM

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. :)

Yaro 11-11-2008 01:29 PM

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?

pinniped 11-12-2008 03:00 AM

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.


All times are GMT -5. The time now is 07:45 PM.