LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-29-2009, 10:03 AM   #1
pratyuze
LQ Newbie
 
Registered: Jan 2009
Posts: 16

Rep: Reputation: 0
g77 compiler for opensuse 11.1


Hello,

I have certain old codes in fortran which can be compiled with g77 only. Also some of the old softwares like pgplot requre g77 to be present for installation.

It would be great if I knew how to install g77 on suse 11.1. I have gcc version 4.3. I tried a couple of rpms, but all of them fail because of dependency issues. Apparently, g77 requires an older version of gcc.

Please help!
 
Old 04-29-2009, 10:24 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Indeed, the g77 compiler was integrated in release 3.x of gcc. Since release 4.x the g77 compiler has been replaced by gfortran. You can use gfortran to compile programs following the Fortran77 standard. If you want to strictly compile them in the old way, you can use the -ff2c flag, which "generates code designed to be compatible with code generated by g77 and f2c". If you need the g77 command to compile old software, you can just create a symbolic link:
Code:
ln -s /usr/bin/gfortran /usr/bin/g77
gfortran is provided by the gcc-fortran package.
 
1 members found this post helpful.
Old 04-29-2009, 10:26 AM   #3
valencequark
Member
 
Registered: Aug 2004
Location: greater dc metro area
Distribution: various, mostly fedora
Posts: 79

Rep: Reputation: 16
Quote:
Originally Posted by pratyuze View Post
Hello,

I have certain old codes in fortran which can be compiled with g77 only. Also some of the old softwares like pgplot requre g77 to be present for installation.

It would be great if I knew how to install g77 on suse 11.1. I have gcc version 4.3. I tried a couple of rpms, but all of them fail because of dependency issues. Apparently, g77 requires an older version of gcc.

Please help!
you can always compile an older version of gcc (with g77) from source, but make sure you give it a different prefix path than your default version of gcc.

cheers.
 
Old 04-29-2009, 10:35 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,805

Rep: Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003
Quote:
Originally Posted by pratyuze View Post
Hello,

I have certain old codes in fortran which can be compiled with g77 only. Also some of the old softwares like pgplot requre g77 to be present for installation.

It would be great if I knew how to install g77 on suse 11.1. I have gcc version 4.3. I tried a couple of rpms, but all of them fail because of dependency issues. Apparently, g77 requires an older version of gcc.

Please help!
Did you try going into YAST? Under Yast->Software->"Software Management", type in "fortran" in the search box. Select what you want, click ACCEPT. That's it.
 
Old 04-30-2009, 04:06 AM   #5
pratyuze
LQ Newbie
 
Registered: Jan 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks guys it worked. just a passing curiosity :

I have suse 11.1 on my laptop too, and I was able to install the older g77 with the new gcc 4.3. And I could not do the same on my desktop( though I have gfortran installed now, and it works perfectly). The only difference between my laptop and desktop is that my laptop has 32-bit architecture, while the desktop is 64-bit.

I am curious if this has something to do with the problem. Answer if you have the time and the will !!!
 
  


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
g77 for opensuse 10.3 uwchn Linux - Software 1 01-24-2008 06:26 PM
Installing g77 fortran compiler for xfoil! flipwhy Linux - Newbie 9 11-16-2006 05:30 AM
Fedora Core4 and g77 compiler hhegab Programming 8 12-18-2005 04:57 PM
gcc/g77 compiler in FC2? serendipitysdc Fedora 1 06-24-2004 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:54 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