LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2009, 11:16 PM   #1
bleed!
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
Smile How do I know which fortran complier is installed on my machine?


Hi guys,

I am a total newbie on linux. But I have to work on some software (Petsc) that runs on linux.

So while configuring Petsc, I get the following error message :

Fortran compiler you provided with --with-fc=g77 does not work

So how can I find out which Fortran complier I DO have installed on this machine? Or how can I install one?

Thank you!!
 
Old 03-27-2009, 11:23 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
g77 is part of GCC (GNU Compiler Collection). It should be in your distribution repository (or, on the install disk). There are some other FORTRAN compilers, like gfortran. Probably, you can find it in your repository too. What distribution are you using? In Slackware the package is called gcc-gfortran-4.2.4-i486-1
 
Old 03-27-2009, 11:33 PM   #3
bleed!
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Uncle Theodore, thank you for your prompt reply.

When I type "uname -rs" I get Linux 2.6.18-92.1.22.el5

I just got access to this machine and haven't installed anything on it (So I have no CD whatsoever). Is there a command I can type to know whether I have a Fortran compiler or not?
 
Old 03-27-2009, 11:44 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Well, Linux 2.6.18-92.1.22.el5 is the name of the kernel, not of the distribution. But from the "el5" piece at the end I'm going to guess it's Red Had Enterprise Linux v5.

As to FORTRAN versions. Type
g77 -v
in the terminal. Does it return information on the program version or says there's no such command found?
Then, try
gfortran -v

I think you need to install the gcc package. I'm not familiar with RHEL, so I'll leave it to somebody else to tell you the exact procedure.
 
Old 03-27-2009, 11:52 PM   #5
bleed!
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
For now, I've managed to go through with petcs installation without specifying a Fortran complier at all (which is somehow strange, but it worked).

In any case, g77 -c returns command not found.. While gfortran -v returns :

Using built-in specs.
Target: x86_64-redhat-linux
...
gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)

So I guess gfortran was the one I should have used.

Again, thank you very much sir and have a great night.
 
Old 03-28-2009, 12:12 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
You may also want to look at the compat-gcc-34-g77 package. It is in the standard repo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Someone installed in this machine? bruno buys Linux - Hardware 2 01-23-2008 10:44 AM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 07:39 AM
Gnu Fortran versus Intel Fortran tomatoefish Linux - Software 3 02-20-2006 02:31 PM
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 09:59 AM
I've installed gcc, how do i build a complier environment? Derek-kun Linux - Newbie 4 09-23-2003 10:50 PM


All times are GMT -5. The time now is 03:57 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration