On Sat, Dec 22, 2018 at 10:54:25AM +1100, Kent Cooper wrote: > Hi all, > > I have intermediate-level skills with Linux in general but have never built > anything from source before (except my own simple programs), so I would very > much appreciate help with the following issue! :-) > > Book version: 8.3 > Host distro/version: Running Kubuntu 18.04.1 LTS in a VirtualBox VM on > Windows 10 > Output from version_check.sh: All tests pass > Package/Section the problem was encountered in: Chapter 5.5.1: Installation > of Cross GCC
Just to be sure we're on the same page, that is "Pass 1", I think. > The exact error message or symptom being received: > > make[2]: Entering directory '/mnt/minlinux/sources/gcc-8.2.0/build/gcc' /mnt/minlinux is not what the book specifies. I think it is now possible to use a different prefix, like this (at one time there was various hard-coding which broke that), but it has a knock-on effect: What is the value of $LFS and where does /tools point to ? I make some variations from the book (in particular, for this case I build in a different directory than /mnt/lfs/sources, and I set my own CFLAGS and CXXFLAGS), but comparing your output to mine I notice one other difference: > g++ -no-pie -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions > -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing > -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual > -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings > -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 c/c-lang.o In my log I have: -Wno-overlength-strings -DHAVE_CONFIG_H -o cc1 c/c-lang.o i.e. you have picked up -static-libstdc++ -static-libgcc. Looking back at the beginning of my log, in the initial run of configure (in gcc there are several configure scripts in subdirectories, just to make things interesting, but this is the 24th line of my log, so from the main configure script) I find: checking whether g++ accepts -static-libstdc++ -static-libgcc... no But that might be because you have a differnent version of gcc on your host than what I used. Looking back at my *old* logs, that test first shouws up in the gcc-4.8 series (we used 4.8.1 for LFS-7.4) and it looks as if all my builds since then have reported 'no'. So, which version of gcc are you running on your host ? I suspect this probably is not the cause of your problem, but it seems an odd result. > c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o > c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o > c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o > c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o > c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o > c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o > c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o > c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o > c-family/c-warn.o c-family/c-spellcheck.o i386-c.o glibc-c.o \ > cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a > ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a > ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a > ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a > -L/mnt/minlinux/sources/gcc-8.2.0/build/./gmp/.libs > -L/mnt/minlinux/sources/gcc-8.2.0/build/./mpfr/src/.libs > -L/mnt/minlinux/sources/gcc-8.2.0/build/./mpc/src/.libs -lmpc -lmpfr -lgmp > -rdynamic -ldl -L./../zlib -lz > /usr/bin/ld: error: tree-ssa-loop-manip.o: *ELF section name out of range* > collect2: error: ld returned 1 exit status > ../../gcc/c/Make-lang.in:85: recipe for target 'cc1' failed > make[2]: *** [cc1] Error 1 > make[2]: Leaving directory '/mnt/minlinux/sources/gcc-8.2.0/build/gcc' > Makefile:4255: recipe for target 'all-gcc' failed > make[1]: *** [all-gcc] Error 2 > make[1]: Leaving directory '/mnt/minlinux/sources/gcc-8.2.0/build' > Makefile:889: recipe for target 'all' failed > make: *** [all] Error 2 > > I have no idea what that "ELF section name out of range" error means, and > Google has not provided much help. One link suggested that I may be running > out of disk space, but my virtual hard drive is set to dynamically expand, > and the physical host has 15 GB free space :S > > MTIA! :D > Yeah, putting context on what that error means is hard. There was a result for someone building something *static* on 'buntu 16.04 in vmware, but I'm no wiser. At this stage we SHOULD be using the ld we compiled in the previous step. After an earlier test for (only) ld, at about line 73 in my log I have: checking for ld... /tools/x86_64-lfs-linux-gnu/bin/ld Do you have the same ? And in general, building on real hardware ought to be easier and faster (the windows 10 system is not very fast for file I/O, and there may be oddities needed to get a successful build on vmware). I'm hoping someone else can spot soemthing, because I don't expect to spend much time as my machines in the next few days. ĸen -- I'm saving up 22 shillings and 10 pence (almost a pound!) per week to buy an ARM-13. http://www.antipope.org/charlie/blog-static/2018/11/brexit-means-brexit.html -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
