Cant compile gcc 333 in rhel 5

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

  1. nikole

    nikole New Member

    Hi
    I downloaded src of gcc 3.3.3 and tried to compile in RHEL 5 with the existing gcc 4.1.2.
    Got following error



    [[email protected] gcc-3.3.3-src]# pwd
    /home/nikole/gccmy/gcc-3.3.3-src
    [[email protected] gcc-3.3.3-src]# which gcc
    /usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/nikole/bin:.)
    [[email protected] gcc-3.3.3-src]#
    [[email protected] gcc-3.3.3-src]# which cpp
    /usr/bin/cpp
    [[email protected] gcc-3.3.3-src]# cpp -v
    Using built-in specs.
    Target: i386-redhat-linux
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
    Thread model: posix
    gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
    /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -E -quiet -v - -mtune=generic
    ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/include"
    ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
    #include "..." search starts here:
    #include <...> search starts here:
    /usr/local/include
    /usr/include
    End of search list.


    [[email protected] gcc-3.3.3-src]# export CC=/usr/bin/cpp
    [[email protected] gcc-3.3.3-src]#
    [[email protected] gcc-3.3.3-src]#
    [[email protected] gcc-3.3.3-src]# ./configure --prefix=/usr/bin/gcc333
    Configuring for a i686-pc-linux-gnulibc1 host.
    *** This configuration is not supported in the following subdirectories:
    target-libffi target-boehm-gc target-zlib target-libjava
    (Any other directories should still work fine.)
    Created "Makefile" in /home/nikole/gccmy/gcc-3.3.3-src using "mt-frag"
    ./config.status is unchanged
    Configuring libiberty...
    loading cache ../config.cache
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for makeinfo... no
    checking for perl... (cached) perl
    checking host system type... i686-pc-linux-gnulibc1
    checking build system type... i686-pc-linux-gnulibc1
    checking for ar... (cached) ar
    checking for ranlib... (cached) ranlib
    checking for gcc... (cached) /usr/bin/cpp
    checking whether we are using GNU C... (cached) yes
    checking whether /usr/bin/cpp accepts -g... (cached) no
    checking whether /usr/bin/cpp and cc understand -c and -o together... (cached) no
    checking for POSIXized ISC... no
    checking for working const... (cached) no
    checking for inline... (cached) no
    checking for a BSD compatible install... (cached) /usr/bin/install -c
    xhost-mkfrag is unchanged
    checking how to run the C preprocessor... (cached) /lib/cpp
    checking for sys/file.h... (cached) no
    checking for sys/param.h... (cached) no
    checking for limits.h... (cached) no
    checking for stdlib.h... (cached) no
    checking for malloc.h... (cached) no
    checking for string.h... (cached) no
    checking for unistd.h... (cached) no
    checking for strings.h... (cached) no
    checking for sys/time.h... (cached) no
    checking for time.h... (cached) no
    checking for sys/resource.h... (cached) no
    checking for sys/stat.h... (cached) no
    checking for sys/mman.h... (cached) no
    checking for fcntl.h... (cached) no
    checking for alloca.h... (cached) no
    checking for sys/pstat.h... (cached) no
    checking for sys/sysmp.h... (cached) no
    checking for sys/sysinfo.h... (cached) no
    checking for machine/hal_sysinfo.h... (cached) no
    checking for sys/table.h... (cached) no
    checking for sys/sysctl.h... (cached) no
    checking for sys/systemcfg.h... (cached) no
    checking for sys/wait.h that is POSIX.1 compatible... (cached) no
    checking whether time.h and sys/time.h may both be included... (cached) no
    checking whether errno must be declared... (cached) yes
    checking for ANSI C header files... (cached) no
    checking for uintptr_t... (cached) no
    checking for pid_t... (cached) no
    checking whether the C compiler (/usr/bin/cpp -g ) works... yes
    checking whether the C compiler (/usr/bin/cpp -g ) is a cross-compiler... yes
    checking for asprintf... (cached) no
    checking for atexit... (cached) no
    checking for basename... (cached) no
    checking for bcmp... (cached) no
    checking for bcopy... (cached) no
    checking for bsearch... (cached) no
    checking for bzero... (cached) no
    checking for calloc... (cached) no
    checking for clock... (cached) no
    checking for ffs... (cached) no
    checking for getcwd... (cached) no
    checking for getpagesize... (cached) no
    checking for index... (cached) no
    checking for insque... (cached) no
    checking for memchr... (cached) no
    checking for memcmp... (cached) no
    checking for memcpy... (cached) no
    checking for memmove... (cached) no
    checking for memset... (cached) no
    checking for mkstemps... (cached) no
    checking for putenv... (cached) no
    checking for random... (cached) no
    checking for rename... (cached) no
    checking for rindex... (cached) no
    checking for setenv... (cached) no
    checking for sigsetmask... (cached) no
    checking for strcasecmp... (cached) no
    checking for strchr... (cached) no
    checking for strdup... (cached) no
    checking for strncasecmp... (cached) no
    checking for strrchr... (cached) no
    checking for strstr... (cached) no
    checking for strtod... (cached) no
    checking for strtol... (cached) no
    checking for strtoul... (cached) no
    checking for tmpnam... (cached) no
    checking for vasprintf... (cached) no
    checking for vfprintf... (cached) no
    checking for vprintf... (cached) no
    checking for vsprintf... (cached) no
    checking for waitpid... (cached) no
    checking whether alloca needs Cray hooks... (cached) no
    checking stack direction for C alloca... (cached) 0
    checking for vfork.h... (cached) no
    checking for working vfork... (cached) no
    checking for _doprnt... (cached) no
    checking for sys_errlist... (cached) yes
    checking for sys_nerr... (cached) yes
    checking for sys_siglist... (cached) yes
    checking for external symbol _system_configuration... no
    checking whether canonicalize_file_name must be declared... (cached) yes
    checking for getrusage... (cached) no
    checking for on_exit... (cached) no
    checking for psignal... (cached) no
    checking for strerror... (cached) no
    checking for strsignal... (cached) no
    checking for sysconf... (cached) no
    checking for times... (cached) no
    checking for sbrk... (cached) no
    checking for gettimeofday... (cached) no
    checking for realpath... (cached) no
    checking for canonicalize_file_name... (cached) no
    checking for pstat_getstatic... (cached) no
    checking for pstat_getdynamic... (cached) no
    checking for sysmp... (cached) no
    checking for getsysinfo... (cached) no
    checking for table... (cached) no
    checking for sysctl... (cached) no
    checking for unistd.h... (cached) no
    checking for getpagesize... (cached) no
    checking for working mmap... (cached) no
    checking for working strncmp... (cached) no
    creating ./config.status
    creating Makefile
    creating testsuite/Makefile
    creating config.h
    config.h is unchanged
    Configuring zlib...
    loading cache ../config.cache
    checking host system type... i686-pc-linux-gnulibc1
    checking target system type... i686-pc-linux-gnulibc1
    checking build system type... i686-pc-linux-gnulibc1
    checking for a BSD compatible install... (cached) /usr/bin/install -c
    checking whether build environment is sane... yes
    checking whether make sets ${MAKE}... yes
    checking for working aclocal... missing
    checking for working autoconf... missing
    checking for working automake... missing
    checking for working autoheader... missing
    checking for working makeinfo... missing
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for gcc... (cached) /usr/bin/cpp
    checking whether we are using GNU C... (cached) yes
    checking whether /usr/bin/cpp accepts -g... (cached) no
    checking for ld used by GCC... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognise dependant libraries... pass_all
    checking for object suffix... configure: error: installation or configuration problem; compiler does not work
    Configure in /home/nikole/gccmy/gcc-3.3.3-src/zlib failed, exiting.
    [[email protected] gcc-3.3.3-src]#


    I cant use 'yum' as it fails
    [[email protected] gcc-3.3.3-src]# yum install gcc
    Loaded plugins: rhnplugin, security
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Install Process
    No package gcc available.
    Nothing to do
    [[email protected] gcc-3.3.3-src]#



    Can anyone please suggect correct steps.
    Regards
     
  2. nikole

    nikole New Member

    by the way
    my confisgure command is

    #./configure --prefix=/tmp/gcccdp346
     
  3. nikole

    nikole New Member

    Resolved

    Hi All,
    Thanks for your time for reply
    I resolved the issue in following way

    Login as root

    First register ur system with RHN
    as root , use rhn_register command. You need to register if you want to use yum.

    Then
    yum install compat-gcc-34.i386 compat-gcc-34-c++.i386 compat-glibc.i386 compat-libstdc++-33.i386
    this will install /usr/bin/gcc34 , i.e gcc 3.4.6 version

    then use this gcc34 to compile gcc3.3.3

    export CC=/usr/bin/gcc34
    rm config.cache
    ./configure --prefix=/usr/local/gcc333
    make
    make install


    this will install gcc 3.3.3 in /usr/bin/gcc333
    then use this gcc333 to compile src of gcc 3.3.3

    Regards
     

Share This Page