error: cannot run C compiled programs.

Discussion in 'Server Operation' started by nikole, Apr 5, 2010.

  1. nikole

    nikole New Member

    Hi ,
    I am compiling gcc 3.4.6 from source in RHEL 5 (this has gcc 4.1.2 )
    I downloed all dependencies and started ./configure.
    It went fine.
    When I do make I get following error that cannot run C compiled programs.
    .....




    ...

    checking for C compiler default output file name... b.out
    checking whether the C compiler works... configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details.
    make: *** [configure-gcc] Error 1
    [[email protected] gcc-3.4.6]#


    [[email protected] gcc-3.4.6]#
    [[email protected] gcc-3.4.6]# cat config.log
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.

    configure:581: checking host system type
    configure:602: checking target system type
    configure:620: checking build system type
    configure:675: checking for a BSD compatible install
    configure:2866: checking for i686-pc-linux-gnu-ar
    configure:2899: checking for ar
    configure:2938: checking for i686-pc-linux-gnu-as
    configure:2971: checking for as
    configure:3010: checking for i686-pc-linux-gnu-dlltool
    configure:3043: checking for dlltool
    configure:3082: checking for i686-pc-linux-gnu-ld
    configure:3115: checking for ld
    configure:3154: checking for i686-pc-linux-gnu-nm
    configure:3187: checking for nm
    configure:3226: checking for i686-pc-linux-gnu-ranlib
    configure:3259: checking for ranlib
    configure:3298: checking for i686-pc-linux-gnu-windres
    configure:3331: checking for windres
    configure:3370: checking for i686-pc-linux-gnu-objcopy
    configure:3403: checking for objcopy
    configure:3442: checking for i686-pc-linux-gnu-objdump
    configure:3475: checking for objdump
    configure:3524: checking for i686-pc-linux-gnu-ar
    configure:3557: checking for ar
    configure:3596: checking for i686-pc-linux-gnu-as
    configure:3629: checking for as
    configure:3668: checking for i686-pc-linux-gnu-dlltool
    configure:3701: checking for dlltool
    configure:3740: checking for i686-pc-linux-gnu-ld
    configure:3773: checking for ld
    configure:3812: checking for i686-pc-linux-gnu-nm
    configure:3845: checking for nm
    configure:3884: checking for i686-pc-linux-gnu-ranlib
    configure:3917: checking for ranlib
    configure:3956: checking for i686-pc-linux-gnu-windres
    configure:3989: checking for windres
    configure:4056: checking whether to enable maintainer-specific portions of Makefiles
    [[email protected] gcc-3.4.6]#

    Can someone please tell me what I need to do to 'make' sucessfully

    Regards
     
  2. AlexFire

    AlexFire New Member

    It is typical error in absence of the execution rights on file system.
    Usually it is the tmp dir. Try to remount as follows

    mount -o,remount,rw,exec /var/tmp
     

Share This Page