'Compiler cannot create executables'

Declan Moriarty junk_mail at iol.ie
Sun Aug 28 02:46:14 PDT 2005


Recently, Somebody Somewhere wrote these words
>   
> On Mon, 22 Aug 2005 14:10:14 +0100  Declan Moriarty wrote:   
>   
> > Have you decided what version of gcc you are usiong, and taken steps
> > to  see that  
> >   
> > 	a. the compiler in question sees the right versiuon of libs?  b.
> > 	all paths, etc lead to that compiler.  
> >   
> > I've been here, done this with gcc-3.3.1 & gcc-2.95.3. Choose your
> > favourite compiler; set $CC $CXX $CPP & $PATH appropiately. Set
> > /etc/ld.so.conf and rerun ldconfig. I ran for a while here with
> > gcc-2.95-3 first in the path (/usr/bin) and gcc-3.3.1 in
> > /usr/local/bin.  I normally selected gcc-3.3.1 with $CC, $CXX, &
> > $CPP, but would unset  them to use gcc-2.95-3. Libraries looked
> > after themselves, but I would  make sure to have your FHS compatible
> > locations listed before your  exotic ones. Mind you, I never tried
> > multiple versions of binutils. You  are on your own there.  
>   
> Right.   I know what the problem is.   But I need further help to fix
> it.  
>   
> I recently inadvertently installed elfutils into /usr/bin.  This
> install of elfutils has copied over the linker ld, plus readelf,
> strip, nm and other files of 'binutils'.    
>  
> The error messages I've been getting are all linked to this cock up. 
>  
> I need to reinstall binutils-2.14 again onto my LFS box, but my
> existing gcc will not compile and I have no distro available.   What I
> do have is a part build of LFS-6.0 with its /tool dir.   Could I
> install binutils from the chrooted environment of LFS-6.0 onto my
> existing box?   And if so I would it work and what would be the
> prefix? 
>  
> thanks 

I would first try compiling binutils-2.14 as per ch.6 of the book (i.e.
--prefix=/usr --enable-shared or whatever the instructions were
I fail to see the value of the chroot. The idea of that is to point at
the new root dir, so your new system won't be installed over the old one
which is what you want when you're making a new LFS. You are simply
employing the compiler, hoping against hope that it will fix your old
system.

For this compile, I would add /tools/lib and any other /tools lib
directories on top of /etc/ld.so.conf, and rerun ldconfig. I would also
mangle the path on the console you are building with thusly
PATH=/tools:$PATH;

Then  try the make install. 

It may well barf on the includes(/tools/include), which I reckon means
another compile option (--INCLUDEDIR=/tools/include ?) or else hacking 
the makefile 

If I have steered you fatally wrong others will no doubt jump in and say
so.
-- 

	With best Regards,


	Declan Moriarty.



More information about the blfs-support mailing list