How do I get gcc-3.2.2 on RHEL 5? - gcc

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).

Related

Is it possible to install gcc 5+ version on redhat 5?

I have developed a qt application on Ubuntu 16 but for testing I need to run it on redhat 5. But I am using c++11 standard features in my code and gcc (very old version on redhat) does not recognise this. I need to know is it possible to install gcc version (anything above than 5.0) on redhat 5?
I have already searched online but most of the links take me to redhat 7. Please note that I cannot upgrade to rhel 7.

I want to compile Boost 1.70 with Clang 60 on Centos 7

I want to try another C++ compiler (CLang 6) but I'm depending on Boost. How do I get Boost installed?
While compiling Boost with toolset=clang is easily implemented with a PR on the ansible-role https://github.com/dockpack/base_boost/pull/24, the problem really is where to get Clang 6 for Centos 7?
Note: Since the November 2018 release, Red Hat’s Clang/LLVM package
naming convention has changed so that the Red Hat version number now
reflects the upstream version. The llvm-toolset-7packages (without the
dot zero), are based on Clang/LLVM 5.0. The new package name for
Clang/LLVM 7.0 is llvm-toolset-7.0 (seven dot zero). Although this
might seem confusing now, hopefully it will make things easier for
everyone going forward.
I'm interested in llvm-toolset-6.0 which is available for RHEL 7, but can't be found in
CentOS 7.
Springdale Linux usually rebuilds SCL stuff much faster then the CentOS Software Collections SIG.
llvm-toolset-7 contains LLVM 5.0.1.
llvm-toolset-6.0 contains LLVM 6.
llvm-toolset-7.0 contains LLVM 7.
[SCL-core]
name=Springdale SCL Base $releasever - $basearch
mirrorlist=http://springdale.princeton.edu/data/springdale/SCL/$releasever/$basearch/mirrorlist
#baseurl=http://springdale.princeton.edu/data/springdale/SCL/$releasever/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-springdale

Which Ubuntu distribution version support GLES3

I build the cobalt with platform "linux-x64x11" on Ubuntu as below:
$cat /proc/version
Linux version 3.13.0-119-generic (buildd#lcy01-08) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #166-Ubuntu SMP Wed May 3 12:18:55 UTC 2017
But this Ubuntu can't not support GLES3 because coredump happens, I have to modify the src/starboard/linux/shared/gyp_configuration.gypi file, and substitute "system_gles3" with "system_gles2" to make Cobalt run successfully.
May I ask which linux distribution version support GLES3 perfectly? Otherwise I have to upgrade my opengles library in this Ubuntu.
Wait for help, thanks,
Jenson.
What is your Cobalt version? My up-to-date Cobalt on Linux falls back to GLES2 gracefully.
It looks Ubuntu 17.04 official repository does not have GLES3 yet. If you want to use GLES3, you need to manually install it. Or set the "gl_type" to "system_gles2". I recommend the latter.

Build GCC 4.8.1 or higher on CentOS 6.5

I want to use GCC 4.8.1 or higher on a HPC machine with CentOS 6.5 which has a very old GCC. I do not have admin rights so everything has to be local. Do I have to really compile everything from source? Isn't there any rpm package that I can only install GCC with its dependencies? I found GCC rpms for CentOS 7 but not 6.5.
Without admin rights, building from source is
likely most reliable means to use gcc-4.8.1.
You can try installing (or extracting) gcc-4.8.1
from the redhat developer tool kit 2.0 described here
https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
CentOS 7 RPM's are unlikely to work in general on CentOS 6.x.
The developer 2.0 toolkit was built on CentOS6

Installing gcc 4.8 on Debian

I want to start playing around with some of the newer C++11 features and it appears that the best support for this is with gcc 4.8, and Squeeze ships with 4.4.5.
However, I don't want to cause any "damage" to my current setup. What's the best way to get both versions of gcc running side-by-side? I'm concerned mostly at the large number of dependencies and that taking them all in to my current system may render it unstable.
Has anyone managed to do this, and what are the steps involved?
Failing that, I'll probably just create a VM and run an "unstable" Debian under that but it's a less-than-ideal solution.
If you install GCC from source just make sure you don't install it to /usr and it won't mess anything up. If you install it as your own user, not root, then there is zero chance of messing up the system.
See http://gcc.gnu.org/wiki/InstallingGCC for the almost-idiot-proof minimal configuration.
I have various versions built as my user and installed in ~/gcc/4.X for various X.
The only thing to be aware of using that set up is that the shared libraries for the new version aren't in the dynamic linker's default search path, so you need to use LD_LIBRARY_PATH or some other solution to ensure executables find the libs from 4.8, see the libstdc++ FAQ and the page it links to in the manual
I use a wrapper script call g++11 which simply calls the new version of GCC with -std=gnu++11 and passes a flag to the linker telling it to set the path to the 4.8 libs in the executable:
$HOME/gcc/4.8/bin/g++ -Wl,-rpath,$HOME/gcc/4.8/lib64 -std=gnu++11 -Wall -Wextra -g "$#"
I had the same problem, and didn't want to fully upgrade to testing.
Jessie (testing) now contains g++-4.8 which is compliant with C++11.
I used apt-pinning in the following way:
A source to jessie was added to /etc/apt/sources.list:
deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib
/etc/apt/preferences was edited as such:
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: gcc*
Pin: release n=jessie
Pin-Priority: 910
Then,
$ sudo aptitude update
$ sudo aptitude install gcc/jessie
At which point I selected the second presented option to resolve dependencies fully.
Debian has the package under the name gcc-4.8 (or for the c++ compiler, g++-4.8). Installing those packages will not mess up your OS, as long as you do not rename it to g++. The package is listed as experimental though.
Information on the package is here.
Update: g++-4.8 is now in testing, but an updated package is in unstable
Quick ones:
Just upgrade to testing, it is rock-solid and offers you several concurrent gcc versions. Similar for Ubuntu, on 12.10 I have gcc/g++ 4.4, 4.5, 4.6 and 4.7 in parallel.
Try the Debian backports archive, it may have a port of gcc 4.8.
Use virtualization: I prefer libvirt / kvm which is incredibly lightweight on Linux as it is kernel based. My amd64 server has two other 32 bit installations for that very reason.
Not really a SO question...
Have you tried chroot to install a newer Debian flavor?
you can play around without fear to break you working system.
install a Debian flavor that support you gcc version desired.
install a gcc version manually without affecting you working system.
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Chroot

Resources