Results 1 to 8 of 8

Thread: C compiler cannot create executables

  1. #1
    Join Date
    Jun 2008
    Location
    Mumbai,India
    Posts
    43

    Default C compiler cannot create executables

    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 ?

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: C compiler cannot create executables

    It means you have not installed all the required parts of the C compiler, in particular the backends that actually do the compile.

  3. #3
    Join Date
    Jun 2008
    Location
    Mumbai,India
    Posts
    43

    Default Re: C compiler cannot create executables

    what should i do ? all gcc files are installed as it shows in YAST. Actually all Base development is installed

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,524
    Blog Entries
    15

    Default Re: C compiler cannot create executables

    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/questi...-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


  5. #5
    Join Date
    Jun 2008
    Location
    Mumbai,India
    Posts
    43

    Default Re: C compiler cannot create executables

    Thanks it worked.....

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: C compiler cannot create executables

    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.

    Code:
    $ cat > /tmp/hello.c <<EOF
    #include <stdio.h>
    int main() { printf("Hello world\n"); }
    EOF
    $ gcc -o /tmp/hello -B/usr/bin /tmp/hello.c
    $ /tmp/hello
    Hello world

  7. #7
    Join Date
    Jun 2008
    Location
    Mumbai,India
    Posts
    43

    Default Re: C compiler cannot create executables

    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

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: C compiler cannot create executables

    From an account that gcc works with, do:

    Code:
    which gcc
    From an account that gcc doesn't work with, do:

    Code:
    which gcc
    echo $PATH
    It may simply be that gcc is not in that user's search path.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •