English 中文(简体)
How do I get gcc-3.2.2 on RHEL 5?
原标题:
  • 时间:2010-01-06 22:23:22
  •  标签:
  • gcc
  • redhat

We just had our hosting provider build out a new RHEL 5 box for us to test some legacy stuff on:

uname -a: Linux myserver.foo.com 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:29:54 EST 2009 i686 i686 i386 GNU/Linux

cat /etc/redhat-release: Red Hat Enterprise Linux Server release 5.4 (Tikanga)

gcc -v: gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)

I m having a hell of a time figuring out how to get gcc-3.2.2 installed on this machine:

  • I can t seem to compile 3.2.2 with the gcc 4.1.2 compiler
  • I can t seem to find a 3.2.2 installation via yum
  • I m afraid of what would happen if I rpm d it manually

Any advice?

EDIT: thanks for the suggestions so far, but just to clarify - the "legacy stuff" I mentioned isn t actually my company s legacy stuff. It s a 3rd party package and I don t have access to the code (and wouldn t want to change it even if I did)

I guess I ll look into the chroot thing, because at this point going back to a different RHEL seems heartbreaking.

问题回答

You could try to install a RHEL 4 machine, it has gcc 3.4 which might work to build your stuff. Then you could try running the binaries on your RHEL 5.

It may just be easier to debug the legacy code to work on gcc 4.

What I would suggest is installing the rpm manually within a chroot. You would have to google a lot for the method but it should in theory work well. Alternatively you could just rewrite/update your legacy code (yes, I know it is easier said than done).





相关问题
gcc -fPIC seems to muck with optimization flags

Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...

Generate assembler code from C file in linux

I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...

Getting rid of pre-compiled headers

OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

How to compile for Mac OS X 10.5

I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...

热门标签