[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Gcc Error While Compiling

Posted on 2004-10-26
14
Medium Priority
?
1,283 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
Comment
Question by:maxisgsm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12418773
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
ID: 12429578
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
ID: 12430371
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:maxisgsm
ID: 12440774
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
ID: 12440918
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
ID: 12441821
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
ID: 12441917
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
ID: 12450994
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
ID: 12469714
[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
ID: 12470228
> [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
ID: 12470595
http://tcl.sourceforge.net/

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

Accepted Solution

by:
wesly_chen earned 200 total points
ID: 12476547
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
ID: 12480534
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
ID: 12482684
> 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

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

649 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