Matthew Burgess wrote: > On Mon, 2 Feb 2009 12:54:55 +0200, "Angel Tsankov" > <[email protected]> wrote: >> I'm building a LFS system with binutils version 2.16 and gcc version >> 4.2.4 and I've just found out that applying the >> '/\*startfile_prefix_spec:/{n;s...@.*@/usr/lib/ @}' sed script to >> /tools/lib/gcc/i686-pc-linux-gnu/4.2.4/specs (as per the instruction >> in the >> re-adjustment phase, section 6.10) prevents ld from finding the >> stdc++ library (which is located in "/tools/lib"). As a result, C++ >> programs fail >> to link when I try to compile them with g++. In contrast, they do >> link when >> I compile them with gcc. However, I need to compile them with g++ >> because next I want to install GMP and it checks for a C++ compiler >> by trying to compile a sample C++ program with g++ rather than with >> gcc. Thus, GMP fails >> to configure. >> >> I also found that "reverting" the changes from the above-mentioned >> sed script or substituting "/usr/lib/ /tools/lib/" instead of just >> "/usr/lib/ " >> both help. However, none of these steps is in the LFS book and I >> wonder if >> I have gone wrong somewhere or I just need a more recent version of >> binutils >> or of gcc. Or could it be something else? > > It's hard to say, but binutils-2.16 is rather old. Is there a > particular reason why you're sticking with that particular > combination of Binutils & GCC? > > The latest stable version of LFS used Binutils-2.18 and GCC-4.3.2, > and even > LFS-6.3 used Binutils-2.17. > I upgraded binutils to 2.18 but I still have the same problem (GCC's version is 4.2.4). Next, I'll probably upgrade GCC to 4.3.3 and see if this helps.
--Angel -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
