nasdarwish
asked on
Where and how can I download g++3.2 if have gcc4.1.2 to compile an old code?
Where can I download and install g++3.2?
If your linux is RPMs based then you can simply download using YUM
Issue the following command
yum install gcc
The above should work on CentOS, Redhat (if you have enabled subscription). It also requires YUM repository to be properly setup.
If you have CD/DVD for your Linux, it may already have it and you can simply install it from it.
Issue the following command
yum install gcc
The above should work on CentOS, Redhat (if you have enabled subscription). It also requires YUM repository to be properly setup.
If you have CD/DVD for your Linux, it may already have it and you can simply install it from it.
ASKER
This is what I get:
[root@pet1 pluginconf.d]# yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
http://download.fedora.redhat.com/pub/fedora/linux/extras/6/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Date: Thu, 03 Mar 2011 16:24:52 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 343
Content-Type: text/html; charset=iso-8859-1
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: extras
[root@pet1 pluginconf.d]# yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
http://download.fedora.redhat.com/pub/fedora/linux/extras/6/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Date: Thu, 03 Mar 2011 16:24:52 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 343
Content-Type: text/html; charset=iso-8859-1
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: extras
ASKER
Hi,
I have g++3.2 already downloaded it but I don't know how to install it. I was told that I need to install with gcc3.4 but not sure how..
I downloaded it in /usr/local directory and I do the following:
./configure ;which works fine
make ; but I get the following error message
[root@pet1 gcc-3.2]# make
make[1]: Entering directory `/usr/local/gcc-3.2/libibe rty'
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bcmp bcopy bzero; do \
for g in mkstemps.o ; do \
case "$g" in \
*$f*) echo $g >> needed-list ;; \
esac; \
done; \
done
echo regex.o cplus-dem.o cp-demangle.o md5.o alloca.o argv.o choose-temp.o concat.o dyn-string.o fdmatch.o fibheap.o floatformat.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o strerror.o strsignal.o ternary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o > required-list
make[2]: Entering directory `/usr/local/gcc-3.2/libibe rty/testsu ite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/gcc-3.2/libibe rty/testsu ite'
make[1]: Leaving directory `/usr/local/gcc-3.2/libibe rty'
make[1]: Entering directory `/usr/local/gcc-3.2/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh /usr/local/gcc-3.2/install -sh -c" "INSTALL_DATA=/bin/sh /usr/local/gcc-3.2/install -sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /usr/local/gcc-3.2/install -sh -c " "INSTALL_SCRIPT=/bin/sh /usr/local/gcc-3.2/install -sh -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64 -unknown-l inux-gnu" "AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
make[1]: Leaving directory `/usr/local/gcc-3.2/zlib'
make[1]: Entering directory `/usr/local/gcc-3.2/fastja r'
make[1]: Leaving directory `/usr/local/gcc-3.2/fastja r'
make[1]: Entering directory `/usr/local/gcc-3.2/gcc'
HEADERS="auto-host.h ansidecl.h i386/biarch64.h i386/i386.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/x86-64.h i386/linux64.h defaults.h" DEFINES="POSIX" \
TARGET_CPU_DEFAULT="TARGET _CPU_DEFAU LT_athlon_ sse" \
/bin/sh ./mkconfig.sh config.h
config.h is unchanged
HEADERS="auto-host.h ansidecl.h i386/biarch64.h i386/i386.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/x86-64.h i386/linux64.h defaults.h" DEFINES="POSIX" \
TARGET_CPU_DEFAULT="TARGET _CPU_DEFAU LT_athlon_ sse" \
/bin/sh ./mkconfig.sh hconfig.h
hconfig.h is unchanged
gcc -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I. -I./. -I./config -I./../include ./read-rtl.c -o read-rtl.o
In file included from ./read-rtl.c:24:
./rtl.h:125: warning: type of bit-field âcodeâ is a GCC extension
./rtl.h:128: warning: type of bit-field âmodeâ is a GCC extension
./read-rtl.c: In function âfatal_with_file_and_lineâ :
./read-rtl.c:62: warning: traditional C rejects ISO C style function definitions
./read-rtl.c: In function âread_rtxâ:
./read-rtl.c:662: error: invalid lvalue in increment
make[1]: *** [read-rtl.o] Error 1
make[1]: Leaving directory `/usr/local/gcc-3.2/gcc'
make: *** [all-gcc] Error 2
I have g++3.2 already downloaded it but I don't know how to install it. I was told that I need to install with gcc3.4 but not sure how..
I downloaded it in /usr/local directory and I do the following:
./configure ;which works fine
make ; but I get the following error message
[root@pet1 gcc-3.2]# make
make[1]: Entering directory `/usr/local/gcc-3.2/libibe
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bcmp bcopy bzero; do \
for g in mkstemps.o ; do \
case "$g" in \
*$f*) echo $g >> needed-list ;; \
esac; \
done; \
done
echo regex.o cplus-dem.o cp-demangle.o md5.o alloca.o argv.o choose-temp.o concat.o dyn-string.o fdmatch.o fibheap.o floatformat.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o strerror.o strsignal.o ternary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o > required-list
make[2]: Entering directory `/usr/local/gcc-3.2/libibe
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/gcc-3.2/libibe
make[1]: Leaving directory `/usr/local/gcc-3.2/libibe
make[1]: Entering directory `/usr/local/gcc-3.2/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh /usr/local/gcc-3.2/install
make[1]: Leaving directory `/usr/local/gcc-3.2/zlib'
make[1]: Entering directory `/usr/local/gcc-3.2/fastja
make[1]: Leaving directory `/usr/local/gcc-3.2/fastja
make[1]: Entering directory `/usr/local/gcc-3.2/gcc'
HEADERS="auto-host.h ansidecl.h i386/biarch64.h i386/i386.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/x86-64.h i386/linux64.h defaults.h" DEFINES="POSIX" \
TARGET_CPU_DEFAULT="TARGET
/bin/sh ./mkconfig.sh config.h
config.h is unchanged
HEADERS="auto-host.h ansidecl.h i386/biarch64.h i386/i386.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/x86-64.h i386/linux64.h defaults.h" DEFINES="POSIX" \
TARGET_CPU_DEFAULT="TARGET
/bin/sh ./mkconfig.sh hconfig.h
hconfig.h is unchanged
gcc -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I. -I./. -I./config -I./../include ./read-rtl.c -o read-rtl.o
In file included from ./read-rtl.c:24:
./rtl.h:125: warning: type of bit-field âcodeâ is a GCC extension
./rtl.h:128: warning: type of bit-field âmodeâ is a GCC extension
./read-rtl.c: In function âfatal_with_file_and_lineâ
./read-rtl.c:62: warning: traditional C rejects ISO C style function definitions
./read-rtl.c: In function âread_rtxâ:
./read-rtl.c:662: error: invalid lvalue in increment
make[1]: *** [read-rtl.o] Error 1
make[1]: Leaving directory `/usr/local/gcc-3.2/gcc'
make: *** [all-gcc] Error 2
You need to type make bootstrap to build gcc from source. I don't think bootstrap is the default target.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very helpful
http://rpm.pbone.net/