'Compiler cannot create executables'
ken at linuxfromscratch.org
Sun Aug 21 10:17:41 PDT 2005
On Sun, 21 Aug 2005, Cliff McDiarmid wrote:
> I have a LFS system that started as 5.1 but has now grown with
> upgrades. I have never had problems compiling with gcc and am now
> running 3.3.1. I am now getting the following error message as part
> of 'configure' when trying to compile software:
> checking for C++ compiler default output file name... configure:
> error: C++ compiler cannot create executables See `config.log' for
> more details.
> this is an extract from the config.log file, any ideas what is wrong?
> I feel I may have inadvertently deleted a file somewhere.
> PATH: /opt/kde3/bin
> PATH: /usr/X11R6/bin
> PATH: /sbin
> PATH: /bin
> PATH: /usr/sbin
> PATH: /usr/bin
> PATH: /usr/local/sbin
> PATH: /usr/local/kde/bin
> PATH: /rpm2
> PATH: /usr/local/bin
> PATH: /usr/java/j2re1.4.2_02/bin
> PATH: /opt/schily/bin
Wow, that's quite a mixture of places on your PATH, Cliff.
My first guess is that you've perhaps got multiple versions of one or
more or gcc and binutils, and setting the PATH like this is mixing them
> configure:2177: checking for C++ compiler default output file name
> configure:2180: g++ -O2 -mcpu=i686 -march=i686 -I/usr/local/include/beecrypt conftest.cc >&5
> /usr/bin/ld: unrecognized option `--eh-frame-hdr'
> Try `ld --help' or `ld --usage' for more information.
> collect2: ld returned 64 exit status
What is /usr/local/include/beecrypt (it seems an odd thing to find
included in a compiler test) ? The --eh-frame-hdr isn't exactly new,
and it ought to have been recognized in an LFS-5+ build. The amount of
stuff in $PATH suggests you've got a pretty comprehensive desktop build,
much of which (e.g. QT, kde) is in c++. So, either this version of rpm
only builds on RedHat systems, or the compiler and binutils versions are
fighting with each other.
When you said LFS-5.1, maybe you meant LFS-5.0 (gcc-3.3.1 instead of
gcc-3.3.3)? Which versions of gcc and binutils are on your system, and
which directories are they in ?
das eine Mal als Tragödie, das andere Mal als Farce
More information about the blfs-support