Gcc Error While Compiling

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.




maxisgsmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wesly_chenCommented:
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
maxisgsmAuthor Commented:
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
wesly_chenCommented:
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
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

maxisgsmAuthor Commented:
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
wesly_chenCommented:
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
maxisgsmAuthor Commented:
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
wesly_chenCommented:
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
pbhjCommented:
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
maxisgsmAuthor Commented:
[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
wesly_chenCommented:
> [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
maxisgsmAuthor Commented:
http://tcl.sourceforge.net/

i not sure which one is needed....
0
wesly_chenCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maxisgsmAuthor Commented:
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
wesly_chenCommented:
> 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.