install latest gcc as a non-privileged user
Posted
by
voth
on Super User
See other posts from Super User
or by voth
Published on 2012-12-18T10:54:58Z
Indexed on
2012/12/18
11:04 UTC
Read the original article
Hit count: 318
I want to compile a program on a cluster (as a non-privileged user), which requires gcc-4.6, but the cluster has only gcc-4.1.2.
I don't want to tell the administrator to update gcc, because 1) he is busy and would do it only after several days. 2) He probably wouldn't update it anyway, since other users may need the older gcc version (gcc is not backward compatible)
I tried to compile gcc from source, which seems more difficult that it sounds, since it requires several other packages to be installed (GMP, MPFR, MPC, ...), and when I did it, after several hours I got a message like
checking for __gmpz_init in -lgmp... no
configure: error: libgmp not found or uses a different ABI (including static vs shared).
at which point a got stuck.
My question is: what is the easiest way to install the latest version of gcc as a non-privileged user? (something like apt-get install XXXXX, with an option to not install as root for example)
The setup of the cluster is the following:
CentOS release 5.4 (Final)
Rocks release 5.3 (Rolled Tacos)
If there are no other options than compiling from source, do you have any ideas how to handle the above error?
© Super User or respective owner