LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-27-2010, 01:15 PM   #1
richards3974
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
gcc 3.3.3 on RHEL5 ?


I realize that gcc 3.3.3 is not the default compiler on RHEL5. But we have 10 million lines of code that we dont want to experiment with 4.1.2 . How can we get a pre-built binary of gcc 3.3.3 for RHEL5 ? As a backup I guess we pull down the source for 3.3.3 from the gnu site and build that using the 4.1.2 compiler .
 
Old 03-27-2010, 01:33 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
call your paid for tech support
the gcc34 ( compact-gcc) is in the repos
Code:
yum search gcc
will find it

Now if you are using a "not payed for" unsupported RHEL5.1
then install Centos5.4
 
Old 03-28-2010, 12:58 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# yum search gcc
# yum install compat-gcc-34 compat-gcc-34-c++
.. As said by @John VV.

If you can't use gcc-3.4.6 and need a gcc-3.3 :
http://ftp.uwsg.iu.edu/array2/linux/...po/RPMS.extra/
http://ftp.uwsg.iu.edu/array2/linux/...s2007.i586.rpm
> gcc3.3-cpp-3.3.6-1pclos2007.i586.rpm
# rpm -Uvh --force gcc3.3-cpp-3.3.6-1pclos2007.i586.rpm
Reason for using --force :
The link /lib/cpp -> /usr/bin/cpp is already present.

http://ftp.uwsg.iu.edu/array2/linux/...s2007.i586.rpm
> gcc3.3-3.3.6-1pclos2007.i586.rpm
# rpm -Uvh gcc3.3-3.3.6-1pclos2007.i586.rpm
There is a solution for g++-3.3.6 too. Please ask.
.....

Last edited by knudfl; 03-28-2010 at 01:06 PM.
 
Old 04-03-2010, 01:03 PM   #4
nikole
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
I am also facing same isssue; Cant compile gcc 333

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



[root@localhost gcc-3.3.3-src]# pwd
/home/nikole/gccmy/gcc-3.3.3-src
[root@localhost 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:.)
[root@localhost gcc-3.3.3-src]#
[root@localhost gcc-3.3.3-src]# which cpp
/usr/bin/cpp
[root@localhost 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.


[root@localhost gcc-3.3.3-src]# export CC=/usr/bin/cpp
[root@localhost gcc-3.3.3-src]#
[root@localhost gcc-3.3.3-src]#
[root@localhost 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.
[root@localhost gcc-3.3.3-src]#


I cant use 'yum' as it fails
[root@localhost 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
[root@localhost gcc-3.3.3-src]#



Can anyone please suggect correct steps.
Regards
 
Old 04-03-2010, 05:02 PM   #5
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Of course. Either pay for RHEL or install CentOS instead. CentOS is 99% binary compatible, mostly logos are changed, and there are some more powerful kernels and additions as an option. Then use yum and third party repositories from CentOS wiki to find what you need.
 
Old 04-03-2010, 05:55 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
nikole you might state WHY you NEED gcc 3.3
gcc 3.4 IS IN THE CENT AND RED HAT repos
 
Old 04-03-2010, 06:32 PM   #7
nikole
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
Hi John and DrLove73,
Thanks for taking time to reply.
I was porting my apps to RHEL5.
I like to upgrade compiler later but as of now i like to use gcc 3.3.3 (which was the complier I used to compile my Apps).

I appriciate if you could guide me in installling gcc 3.3.3 in RHEL5.
Regards
 
Old 04-03-2010, 08:10 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you do know how OLD gcc 3.3 is right??

i take it there is some VERY BIG codding problem with porting it to gcc 3.4 ( although as i recall there was not much of a change from 3.3 )
Unlike gcc 3 to gcc 4.4 ( or even gcc 4.1 to 4.4 )

but gcc 4.4 dose FORCE really FORCE one to build better( and secure) code
 
Old 04-04-2010, 03:56 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ nikole : ' gcc-3.3.6 ' will behave like version 3.3.3 .
I think, gcc-3.3.6 is the latest bug fix version of 3.3.3.

Just follow the instructions in post # 2 and install
the ' gcc3.3-3.3.6-1pclos2007 ' etc. !
Using, example : 'make CC=gcc-3.3.6 CXX=g++-3.3.6'

I usually have four compilers on each Linux, they are made
to be installed, and to be used, all at the same time.
.....

And by the way : using an option like ' ../configure --prefix=/usr '
is never a good idea, when it is about system files.
Some of your current system files will be trashed,
if you do a # make install.

One of these would probably be more reasonable :
../configure --prefix=/usr/local/gcc33/
../configure --prefix=/opt/gcc33/
../configure --prefix=/usr/gcc33/
.. .....
And with no gcc, you will not be able to build anything.
# 'yum install gcc glibc-devel' will provide gcc-4.1.2 .


Instructions, building e.g. gcc-3.3.3 :
The gcc people recommend the LFS method
http://archive.linuxfromscratch.org/...OK-5.1.1-HTML/
1) pass 1 , 2) pass 2 , 3) "pass 3" : Installation of GCC.
.....

Last edited by knudfl; 04-04-2010 at 06:37 AM.
 
Old 04-06-2010, 09:56 AM   #10
nikole
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
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
 
Old 04-06-2010, 09:56 AM   #11
nikole
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
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
 
Old 04-08-2010, 12:25 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
gcc-3.3.3 , c++-3.3.3 .. .. EL5

GCC-3.3.3 is easy to build on EL 5 / SL54 / CentOS 5.x
using http://connie.slackware.com/~alien/s...c34.SlackBuild
.. with the version entries modified to "33" and "3.3.3".
The compiler used to build gcc and g++ is gcc-3.3.6 :
export CC=gcc-3.3.6 CXX=g++-3.3.6
The result is two Slackware packages.
I created some rpm packages too with pkgtool2,
in case somebody are interested :
gcc33-3.3.3el5-1.i386.rpm gcc33c++-3.3.3el5-1.i386.rpm
Please ask, I can upload the 5 MB to an email.

The new compilers were tested with ns-allinone-2.26, 80 MB.
Work perfect with these files from 2003.
Attached Files
File Type: txt gcc333.SlackBuild.txt (8.4 KB, 29 views)

Last edited by knudfl; 04-09-2010 at 09:53 AM.
 
  


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
[SOLVED] building with make/gcc/cc over SSH via Putty onto RHEL5 gives â not quotes IanVaughan Linux - General 2 07-28-2009 03:28 AM
SELinux: RHEL4 to RHEL5 rules migration - unknown type var_lib_t in RHEL5 zbiggy Red Hat 2 05-12-2009 03:14 AM
How to make one rhel5 server control passwords for several rhel5 servers. folkrm Linux - Newbie 3 03-11-2009 02:17 PM
Determining patch level of Redhat RHEL5 vs RHEL5.1 or RHEL4.5-4.6 dfezz1 Linux - Newbie 2 01-23-2009 09:17 AM
RHEL5 - I have RHEL5 DVD , how i install ofice packages like SPREADSHEET ETC, bharath@linux Linux - Newbie 3 10-12-2008 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:01 AM.

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