LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2004, 06:53 AM   #16
vasilakis
LQ Newbie
 
Registered: Jun 2004
Location: Greece
Posts: 11

Rep: Reputation: 0

I followed the instructions of Andrew Benton
After make install I got this message

make[2]: Leaving directory `/opt/gcc-build/i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/opt/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/opt/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/opt/gcc-build/i686-pc-linux-gnu/libiberty'


Is it everything OK with instalation?

after export CC=/opt/gcc-2.95/bin/gcc

I don't know how to use the gcc 2.95.3 compliler

when I type gcc -v
it returns

[root@MAT23 gcc-build]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

I need to use 2.95.3 instead of 3.2.2

Any advices ?
 
Old 06-11-2004, 07:18 AM   #17
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
If you type gcc -v it will go looking for gcc and then tell you what version it is. If you do
Code:
export CC=/opt/gcc-2.95/bin/gcc
$CC -v
What does it say? You can usually see which C compiler is being used when you run ./configure. Most configure scripts print out stuff about the tests they perform. I haven't got gcc-2.95 installed, but I have got gcc-3.3.3 installed in /usr/local/gcc-3.3.3/bin/gcc as some things won't compile with gcc-3.4, so I'll use that as an example. Xine-libs won't compile with gcc-3.4.0 so this is the start of the output in the terminal when I configure it with gcc-3.3.3
Code:
andy:~$ cd /home/andy/Desktop/xine-lib-1-rc4a
andy:~/Desktop/xine-lib-1-rc4a$ export CC=/usr/local/gcc-3.3.3/bin/gcc
andy:~/Desktop/xine-lib-1-rc4a$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... /usr/local/gcc-3.3.3/bin/gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
See where it says "checking for gcc... /usr/local/gcc-3.3.3/bin/gcc"? Job's a good 'un.
 
Old 06-16-2004, 02:10 AM   #18
ayie
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
i also followed instruction by Andrew but i got this error

Code:
 gcc-2.95.3/install/TEST
gcc-2.95.3/.brik
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /root/opt/gcc-build
../gcc-2.95.3/configure: line 7: cc: command not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
anyone can explain it to me ???? why line 7: cc: command not found ???
what should i do ???
 
Old 06-16-2004, 06:30 AM   #19
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
"You must set the environment variable CC to a working compiler" Do you have a working C compiler?
 
Old 06-16-2004, 08:30 PM   #20
ayie
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
Quote:
Originally posted by Andrew Benton
"You must set the environment variable CC to a working compiler" Do you have a working C compiler?
how to check my server have working C compiler ??? if none how to make it ???
 
Old 06-17-2004, 03:53 AM   #21
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Open a shell and enter

gcc -v

if it says something like

bash: gcc: command not found

then you don't have gcc installed. You'll need to install a gcc.rpm off your linux CD's.
 
Old 06-18-2004, 12:56 AM   #22
ayie
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
Quote:
Originally posted by Andrew Benton
Open a shell and enter

gcc -v

if it says something like

bash: gcc: command not found

then you don't have gcc installed. You'll need to install a gcc.rpm off your linux CD's.
how if i don't have cd, where can i find gcc.rpm in the net, give me the best links ..... thanks Andrew Benton.
 
Old 06-18-2004, 02:22 AM   #23
ayie
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
i success install gcc, but i got another problems ......
Code:
[ayie@fedora ayie]$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.0/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.0 20040613 (Red Hat Linux 3.4.0-5)
when i try to install eggdrop on my server
Code:
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
y ????

Code:
binutils-2.15.90.0.3-7.i386.rpm  
glibc-headers-2.3.2-101.4.i386.rpm
cpp-3.4.0-5.i386.rpm             
kernel-headers-2.6.6-1.i386.rpm
gcc-3.4.0-5.i386.rpm             
libgcc-3.4.0-5.i386.rpm
glibc-devel-2.3.2-101.i386.rpm
all this files that i use to install gcc
 
Old 08-01-2004, 05:26 PM   #24
Spnets
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
Hi all, hope I post on the right forum,

I've install gcc-3.3.4_20040505 on my FreeBSD 4.1 using FreeBSD ports collection....it's install but
when i type gcc -v it show: gcc version 2.95.4 20020320

What must I do next to get the machine to run on gcc-3.3 and not the 2.95
please help.

Thanks
 
Old 10-29-2009, 01:30 AM   #25
jeni_m110
LQ Newbie
 
Registered: Oct 2009
Posts: 17

Rep: Reputation: 0
installing gcc 2.95

Quote:
Originally Posted by Andrew Benton View Post
I would advise you not to put gcc-2.95 in /usr/local as /usr/local/bin is probably in your $PATH so you will have two versions of gcc in your $PATH, one in /usr/bin and one in /usr/local/bin. This may cause problems. I would suggest that you install it somewhere out of the way, such as /opt/gcc-2.95. That way there is less chance of confusion. When you need to use it you can temporarily set the variable
export CC=/opt/gcc-2.95/bin/gcc
Install gcc-2.95 in /opt by doing
Code:
tar xzf gcc-2.95.3.tar.gz &&
mkdir gcc-build &&
cd gcc-build &&
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ &&
make bootstrap &&
make install

hi
i should install the gcc 2.95, i use RedHat7.2, and try these commands:

[root@localhost gcc-2.95]# export CC=/opt/gcc-2.95/bin/gcc
[root@localhost gcc-2.95]# tar xzf gcc-2.95.3.tar.gz && mkdir gcc-build && cd gcc-build &&/opt/gcc-2.95/gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ && make bootstrap && make install

but it gives me this:
"configuring for a i686-pc-linux-gnuoldldhost.
created "makefile" in /opt/gcc-2.95/gcc-build
/opt/gcc-2.95/gcc-2.95.3/configure: /opt/gcc-2.95/bin/gcc: No such file or directory
***the commanad 'cc -o conftest -g conftest.c' failed.
***you must set the enviroment variable CC to a working compiler."

by the way, when i check the /usr/local/bin folder, it's empty, is that ok?
 
Old 10-29-2009, 01:53 AM   #26
jeni_m110
LQ Newbie
 
Registered: Oct 2009
Posts: 17

Rep: Reputation: 0
installing gcc

Quote:
Originally Posted by Andrew Benton View Post
Open a shell and enter

gcc -v

if it says something like

bash: gcc: command not found

then you don't have gcc installed. You'll need to install a gcc.rpm off your linux CD's.
hi,
i try this,
and when i insert my installation cd No.2, i write this command:

[root@localhost /]# rpm -iv /mnt/cdrom1/RedHat/RPMS/gcc- (i press tab here and show me these)
gcc-2.96-98.i386.rpm gcc-g77-2.96.98.i386.rpm
gcc-c++-2.96-98.i386.rpm gcc-java-2.96-98.i386.rpm
gcc-chill-2.96-98.i386.rpm gcc-objc-2.96-98.i386.rpm

i select gcc-2.96-98.i386.rpm for example , it gives me the

"error: failed dependencies:
binutils >=2.11.90.0.8-3 is needed by gcc-2.96.98
cpp= 2.96-98 is needed by gcc-2.96-98
glibc-devel is needed by gcc-2.96-98"

how can i fix this problem?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
downgrade of GCC version nelnel Linux - Software 7 06-29-2005 01:10 AM
how to downgrade from 9.2 to 9.1 netsurf SUSE / openSUSE 10 04-10-2005 12:44 PM
downgrade glibc subash Linux - General 8 08-14-2003 12:13 AM
gcc downgrade: help required ludwig W Linux - Software 12 03-31-2003 02:09 AM
any recomendations to downgrade GCC 2.96 to 2.95? Hano Linux - Distributions 2 06-09-2002 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration