This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: upgrading gcc/gfortran on linux, glibc=2.5


Am 28.03.2012 17:53, schrieb Tom Roche:


Paul Richard Thomas Wed, 28 Mar 2012 16:26:17 +0200
I believe that I have RHEL5.4 as a virtual machine at home. If so,
I'll build a release version of 4.7.0 on it.

Thanks!


It'll take a few days because I know that some of the dependencies
will need updating and all the usual good stuff. I have to say that,
whilst I am a gfortran maintainer and would say this :-), building
your own is very straight forward on linices

Except we lack root :-( Our cluster (which is currently running




Definitely not needed. You can compile GCC as a normal user, and install
it everywhere you want.


$ lsb_release -ds
"Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
$ gfortran --version
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
$ ldd --version
ldd (GNU libc) 2.5

) is maintained by contractors for a larger group, who dissuade us
from building dependencies as fundamental as gcc. While there are
plans to upgrade the cluster to RHEL 6 "soon," that may not be for
months, and anyway that would only get us to gcc-4.4 (IIUC). However,
one of the admins has stated

I tried to compile the 4.6 version of GCC from source and could not
get it to work. If you have a working version, I would be happy to
put it [up]


It's easy to compile GCC, you just have to RTFM (gcc.gnu.org/install/),
it is just a bit different than compiling other software, and a bit
time consuming. But not magic. If your admin would have done this way,
he would have succeded, I guess.



so if you can build gcc-4.7, that should work. However I also note


http://gfortran.com/download/x86_64/PLEASE_README.txt
this directory

http://gfortran.com/download/x86_64/


[provides] GCC builds for linux x86_64 systems[, including]
compilers for the c, c++ and fortran languages built on a linux
system with glibc 2.6.1.

The provided [compilers] need glibc 2.4 or newer, however the
library libgomp needs glibc 2.6,

Unfortunately we do need OMP for the parallel versions of our model, though being able to build/test serial with a newer gcc/gfortran would be good for us. I note

$ ldconfig -p | fgrep -ie 'omp'
-bash: ldconfig: command not found


Yes, ldconfig is /sbin/ldconfig, you have to be root
to use it. So you have to resort to either setting LD_LIBRARY_PATH
or to use the -rpath linking option.


$ locate *gomp* | fgrep -e '.so'
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgomp.so
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/32/libgomp.so
/usr/lib64/libgomp.so.1
/usr/lib64/libgomp.so.1.0.0

So I'm wondering,

1 Can we also get or build glibc>= 2.6 for RHEL 5.4?


glibc is special. It is not recommended to upgrade it yourself. Really.
And installing and using an alternative version is possible, but tricky.
You have to compile your software against your alternative glibc and
then change the loader location in the resulting binary. This can be done
e.g. with patchelf. However, I never tried it.


2 If we cannot build/get a glibc>= 2.6: what is the latest gcc with a
   libgomp that works with glibc == 2.5?



That's no problem. Just compile it.
The binaries at gfortran.org are compiled against glibc 2.6.1, that's the
only reason.


Cheers, Manfred




TIA, Tom Roche<Tom_Roche@pobox.com>




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]