LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-12-2012, 11:15 PM   #1
rulrich
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Rep: Reputation: Disabled
How do I install g95 on a centos 6.3 system?


I have extracted files into directories starting at /usr/local/g95/
and obtained all the files listed in the g95 manual. The executable
compiler is supposed to be in
/usr/local/g95/g95-install/bin/
with the name: i686-pc-linux-gnu-g95
and there is a file with this name in that location. I added the
symbolic link at /usr/bin/ as recommended.
However when I try to execute the i686-pc-linux-gnu-g95 I get
an error
bash: /usr/bin/g95: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

I think the g95 may be a 32 bit app and I need to install some 32 bit
libraries but would rather not do this if there is a better solution.
 
Old 09-13-2012, 04:06 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

# yum install glibc.i686


Are you sure that a 32bits fortran compiler can be of any use in a 64bits OS ?


.
 
Old 09-14-2012, 01:40 AM   #3
rulrich
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks. Some progress but a new problem.

Based on your recommendation, I went ahead and installed the additional 32 bit package. Now I get a new
error:

g95 Hello.f90
/tmp/ccfBpywF.s: Assembler messages:
/tmp/ccfBpywF.s:11: Error: suffix or operands invalid for `push'

The code is just:
program hello
print *,"Hello World!"
end program hello

Concerning the running of a 32-bit compiler on a 64-bit OS, there should not be a problem as long as we do not use the
extended address space available from a 64-bit system and as long as we do not use 64-bit integers. Obviously there
are some difficulties in setting up the compiler without the assistance of an rpm process. Any ideas about our new
error (which is far from self explanatory) would be welcome.
 
Old 09-14-2012, 02:12 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Suggest : A 64bits G95 http://www.g95.org/downloads.shtml
> g95-x86_64.deb
( # 'alien -r g95-x86_64.deb' creates : g95-20100616-2.x86_64.rpm )


Or may be the 64bits "f95 compiler" for your OS.
That's gfortran. Package name = gcc-gfortran


.

Last edited by knudfl; 09-14-2012 at 02:29 AM.
 
Old 09-15-2012, 01:51 AM   #5
rulrich
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
More on 32-bit versus 64-bit

Thanks again for the help. The gfortran package was in fact already installed on our machine and appears to function
correctly. What we do not yet know is whether we can effectively us a 64-bit compiler. Our problem is a bunch of
legacy code (probably not a rare situation). Our binary records of observations have been managed using a method
that is generally considered poor code practice -- we just pack a number of different quantities into arrays then
pull out the parts as integers, reals or character strings depending on a mapping that is known to us. The mapping
is organized through a set of equivalence statements. What we will need to figure out is the flags necessary to have
the parts extracted as if the mapping were done using 32-bit quantities -- the reals especially. I think the integers
can be declared the same as before, possibly just from an implicit statement that applies to all the code. I am
not so sure about the reals.

Our code began in the late 1960's and has been ported forward a number of times.

Any comments about these word size questions would be welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum update on CentOS 5.3 upgraded my system to CentOS 5.4 diskoe Red Hat 1 10-29-2009 04:41 PM
the detailed steps to install g95 on Fedora linux platform naishi Linux - Newbie 9 04-19-2009 10:48 PM
LXer: Install CentOS 5 DomU on CentOS 5 Dom0(64 bit) from NFS share LXer Syndicated Linux News 0 11-09-2007 03:41 AM
how to configure LAPACK with g95 ztdep Programming 0 07-30-2005 10:06 PM
Fortran g95 source-code line truncation feature is annoying elavid Programming 1 06-09-2005 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration