I was playing with Linux from scratch and was trying to build the first binutils package in a separate dedicated build directory binutils-build under /lfs
when i issue the command
CC=“gcc -B/usr/bin/” ./binutils-2.17/configure --prefix=/tools --disable-nls --disable-werror
This is the error i get
loading cache ./config.cache
checking host system type… i686-pc-linux-gnuoldld
checking target system type… i686-pc-linux-gnuoldld
checking build system type… i686-pc-linux-gnuoldld
checking for a BSD compatible install… ./binutils-2.17/install-sh -c
checking whether ln works… yes
checking whether ln -s works… yes
checking for gcc… gcc -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/ ) works… no
configure: error: installation or configuration problem: C compiler cannot create executables.
can anyone help me ?
It means you have not installed all the required parts of the C compiler, in particular the backends that actually do the compile.
what should i do ? all gcc files are installed as it shows in YAST. Actually all Base development is installed
On Thu, 03 Jul 2008 04:06:03 GMT
tanmaya <tanmaya@no-mx.forums.opensuse.org> wrote:
>
> what should i do ? all gcc files are installed as it shows in YAST.
> Actually all Base development is installed
>
>
Hi
Does this help?
http://www.linuxquestions.org/questions/linux-from-scratch-13/binutils-2.17-compilation-error-592512/
–
Cheers Malcolm °¿° (Linux Counter #276890)
SLED 10.0 SP2 x86_64 Kernel 2.6.16.60-0.23-smp
up 2 days 11:29, 2 users, load average: 0.01, 0.02, 0.04
GPU GeForce 8600 GTS Silent - Driver Version: 173.14.09
You could try to compile a hello.c program to see whether you have the required bits. If you do, then it’s a LFS problem.
$ cat > /tmp/hello.c <<EOF
#include <stdio.h>
int main() { printf("Hello world
"); }
EOF
$ gcc -o /tmp/hello -B/usr/bin /tmp/hello.c
$ /tmp/hello
Hello world
actually gcc works fine when i am logged on as root@linux or chinu@linux but not when lfs@linux
when i type gcc
i get
command not found
From an account that gcc works with, do:
which gcc
From an account that gcc doesn’t work with, do:
which gcc
echo $PATH
It may simply be that gcc is not in that user’s search path.