Solved

Gcc Error While Compiling

Posted on 2004-10-26
1,269 Views
Last Modified: 2013-12-06
i've install gcc using rpm file .....

i use

rpm -ivh gcc-3.3.3-7.i386.rpm

[root@fedora rpm]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

but, when i try to compile tcl8.5a1 ....

[root@fedora root]# cd tcl8.5a1
[root@fedora tcl8.5a1]# cd unix/
[root@fedora unix]# ./configure
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... /usr/bin/gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.




0
Question by:maxisgsm
    14 Comments
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Hi,

       You also need to install the following
    -----
    cpp
    libstdc
    libstdc++
    libgcc
    --good to have the following, too------
    g++
    binutils
    glibc-devel
    ----------
       Please use
    "rpm -qa | grep cpp"
    "rpm -qa | grep libstd"
    ...

       to check if you have those packages installed first.

       If you use RedHat ( or Fedora), then use /usr/bin/redhat-config-packages to install "software developer tools" and it will install all the packages you need for gcc.

    Wesly
    0
     

    Author Comment

    by:maxisgsm
    If you use RedHat ( or Fedora), then use /usr/bin/redhat-config-packages to install "software developer tools" and it will install all the packages you need for gcc.

    how to install it ??? this redhat-config-packages folder or execute files ?? .... i see at  /usr/bin/ there is no redhat-config-packages !!!!!
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Do you use RedHat Linux (or Fedora)? If not, then there is no /usr/bin/redhat-config-packages (file).
    Just find the rpm from the CDs for
    cpp
    libstdc++
    libstdc++_devel
    g++
    and use "rpm -ivh *.rpm" to install them.

    Wesly
    0
     

    Author Comment

    by:maxisgsm
    i use Fedore Core 1,

    i lost my cd, and don't have time to go buy new one .... i already ask my friends but he always forgot .......

    should i remove all the file first then install again ???
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    Hi,

       Then you need to download the following from the internet:
    binutils-2.14.90.0.4-4.i386.rpm
    cpp-3.3.3-7.i386.rpm
    glibc-devel-2.2.90-12.i386.rpm
    libgcc-3.3.3-7.i386.rpm

    Wesly
    0
     

    Author Comment

    by:maxisgsm
    i've download all file that needed by gcc-3.4.2-6, but while i try to install all the packages one of the packages has conflict with the old .....

    [root@fedora rpm]# rpm -ivh libgcc-3.4.2-6.fc3.i386.rpm
    warning: libgcc-3.4.2-6.fc3.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
    Preparing...                ########################################### [100%]
            file /lib/libgcc_s.so.1 from install of libgcc-3.4.2-6.fc3 conflicts with file from package libgcc-3.4.0-5
            file /usr/sbin/libgcc_post_upgrade from install of libgcc-3.4.2-6.fc3 conflicts with file from package libgcc-3.4.0-5
    [root@fedora rpm]# rpm -e libgcc-3.4.0-5
    error: Failed dependencies:
            libgcc_s.so.1 is needed by (installed) libstdc++-3.3.2-1
            libgcc_s.so.1 is needed by (installed) db4-4.1.25-14
            libgcc_s.so.1 is needed by (installed) gmp-4.1.2-9
            libgcc_s.so.1 is needed by (installed) groff-1.18.1-29
            libgcc_s.so.1 is needed by (installed) libgcj-3.3.2-1
            libgcc_s.so.1 is needed by (installed) libwvstreams-3.70-12
            libgcc_s.so.1 is needed by (installed) gettext-0.12.1-1
            libgcc_s.so.1 is needed by (installed) compat-libstdc++-7.3-2.96.118
            libgcc_s.so.1 is needed by (installed) apt-0.5.15cnc3-0.1.fr
            libgcc_s.so.1 is needed by (installed) apt-0.5.15cnc6-0.1.fc1.fr
            libgcc_s.so.1 is needed by (installed) openjade-1.3.2-8
            libgcc_s.so.1 is needed by (installed) synaptic-0.52-1.1.fc1.fr
            libgcc_s.so.1 is needed by (installed) libstdc++-4.0.0-1
            libgcc_s.so.1(GCC_3.0) is needed by (installed) libstdc++-3.3.2-1
            libgcc_s.so.1(GCC_3.0) is needed by (installed) db4-4.1.25-14
            libgcc_s.so.1(GCC_3.0) is needed by (installed) gmp-4.1.2-9
            libgcc_s.so.1(GCC_3.0) is needed by (installed) groff-1.18.1-29
            libgcc_s.so.1(GCC_3.0) is needed by (installed) libgcj-3.3.2-1
            libgcc_s.so.1(GCC_3.0) is needed by (installed) libwvstreams-3.70-12
            libgcc_s.so.1(GCC_3.0) is needed by (installed) gettext-0.12.1-1
            libgcc_s.so.1(GCC_3.0) is needed by (installed) apt-0.5.15cnc3-0.1.fr
            libgcc_s.so.1(GCC_3.0) is needed by (installed) apt-0.5.15cnc6-0.1.fc1.fr
            libgcc_s.so.1(GCC_3.0) is needed by (installed) openjade-1.3.2-8
            libgcc_s.so.1(GCC_3.0) is needed by (installed) synaptic-0.52-1.1.fc1.fr
            libgcc_s.so.1(GCC_3.3) is needed by (installed) libstdc++-3.3.2-1
            libgcc_s.so.1(GCC_3.3) is needed by (installed) libgcj-3.3.2-1
            libgcc_s.so.1(GLIBC_2.0) is needed by (installed) libstdc++-3.3.2-1
            libgcc_s.so.1(GLIBC_2.0) is needed by (installed) db4-4.1.25-14
            libgcc_s.so.1(GLIBC_2.0) is needed by (installed) libgcj-3.3.2-1
            libgcc_s.so.1(GLIBC_2.0) is needed by (installed) compat-libstdc++-7.3-2.96.118
            libgcc is needed by (installed) glibc-2.3.2-101.4
            libgcc is needed by (installed) libstdc++-4.0.0-1

    how to fix this problem ??
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    It's ok. You have libgcc-3.4.0-5 installed already.
    gcc-3.3.7 requires libgcc version greater than 3.3.3-7.
    So you don't need to installed the 3.4.2-6.fc3 (Fedora Core 3 ?)
    Please use
    "rpm -e gcc-3.3.3-7" to remove gcc you have installed before and install it again.

    Then compile tcl8.5a1 ...

    Good luck,

    Wesly
    0
     
    LVL 5

    Expert Comment

    by:pbhj
    Incidentally, if you were using apt (for rpm) you wouldn't have this problem.

    When I used Fedorac Core 2, I installed Yum from rpm, then used Yum to install apt-rpm (or whatever it's called, yum find's the package and installs it for you). Then when you've got apt you can use Synaptic which is a great GUI front end.

    If you prefer the command line ... that's cool too. I use Slack 10 mainly and probably 80% of the time do manual installs.

    This page -> http://www.fedora.us/wiki/FedoraHOWTO has some useful detail on package management.

    'course you probably already know all that??

    HTH

    pbhj
    0
     

    Author Comment

    by:maxisgsm
    [root@fedora 3.3.3]# rpm -ivh cpp-3.3.3-7.i386.rpm
    warning: cpp-3.3.3-7.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
    Preparing...                ########################################### [100%]
       1:cpp                    ########################################### [100%]
    [root@fedora 3.3.3]# rpm -ivh gcc-3.3.3-7.i386.rpm
    warning: gcc-3.3.3-7.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
    Preparing...                ########################################### [100%]
       1:gcc                    ########################################### [100%]
    [root@fedora 3.3.3]# gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
    Thread model: posix
    gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

    success install gcc ..... but while try to compile tcl8.5 lib/cpp still errors ??

    [root@fedora unix]# ./configure
    checking whether to use symlinks for manpages... no
    checking compression for manpages... no
    checking for gcc... gcc
    checking for C compiler default output... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking how to run the C preprocessor... /lib/cpp
    configure: error: C preprocessor "/lib/cpp" fails sanity check
    See `config.log' for more details.
    [root@fedora unix]#

    what else i missing to install ???

    [root@fedora unix]# rpm -qa|grep cpp
    cpp-3.3.3-7
    [root@fedora unix]# rpm -qa|grep libstd
    libstdc++-3.3.2-1
    compat-libstdc++-7.3-2.96.118
    libstdc++-4.0.0-1
    [root@fedora unix]# rpm -qa|grep libgcc
    libgcc-3.4.0-5
    [root@fedora unix]# rpm -qa|grep g++
    [root@fedora unix]# rpm -qa|grep binutils
    binutils-2.15.90.0.3-5
    [root@fedora unix]# rpm -qa|grep glibc-devel
    glibc-devel-2.3.2-101.4
    [root@fedora unix]#
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    > [root@fedora unix]# rpm -qa|grep libstd
    > libstdc++-3.3.2-1    <====
    > compat-libstdc++-7.3-2.96.118
    > libstdc++-4.0.0-1   <===
    It looks like you have 2 versions of libstdc++ installed, which only need one.

    By the way, could you tell me where you download the " tcl8.5a1" so I can test for you?

    Wesly
    0
     

    Author Comment

    by:maxisgsm
    http://tcl.sourceforge.net/

    i not sure which one is needed....
    0
     
    LVL 38

    Accepted Solution

    by:
    Hi,
    You have
    ---
    > checking for gcc option to accept ANSI C... none needed
    > checking how to run the C preprocessor... /lib/cpp
    > configure: error: C preprocessor "/lib/cpp" fails sanity check

    And I got
    ----
    checking for gcc option to accept ANSI C... none needed
    checking how to run the C preprocessor... gcc -E   <====
    checking for egrep... grep -E
    ....

       So I suspect that your GNU C installation has some problem.

       You might want to uninstall what you have installed already.
    And then download all the files from the following link:
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/
    ---or
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/cpp-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/binutils-2.14.90.0.6-3.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/gcc-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/gcc-c++-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/gcc-objc-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/glib-devel-1.2.10-11.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/glibc-devel-2.3.2-101.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/glibc-kernheaders-2.4-8.36.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/kernel-source-2.4.22-1.2115.nptl.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/libstdc++-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/libstdc++-devel-3.3.2-1.i386.rpm
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/libgcc-3.3.2-1.i386.rpm
    --- or
     Download 3 Fedora Core 1 CD images and burn it. Then install
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/redhat-config-packages-1.2.6-1.noarch.rpm
     Then you can use /usr/bin/redhat-config-packages to intall the gcc from CDs easily.

    Good luck,

    Wesly
    0
     

    Author Comment

    by:maxisgsm
    Download 3 Fedora Core 1 CD images and burn it. Then install
    http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/redhat-config-packages-1.2.6-1.noarch.rpm
     Then you can use /usr/bin/redhat-config-packages to intall the gcc from CDs easily.

    can i just download redhat-config-packages-1.2.6-1.noarch.rpm then install using rpm -ivh ????
    0
     
    LVL 38

    Expert Comment

    by:wesly_chen
    > can i just download redhat-config-packages-1.2.6-1.noarch.rpm then install using rpm -ivh ????
    Yes, however, redh-config-packages will install all the dependent packages and tell you those packages are which CD automatically.

    Wesly
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now