LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-29-2012, 01:03 PM   #1
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Rep: Reputation: 48
How to get f77 compiler on Ubuntu 12.04


Hello,

I am in the process of upgrading one of my systems to a newer beefier server. We are transitioning from Red Hat version 4 update 9 to the latest LTS version of Ubuntu, 12.04. One of the users of this system absolutely needs the f77 fortran compiler (don't ask) and this package does not seem to be available from Ubuntu (which makes sense since the compiler is 9 years my senior).

Any suggestions on an easy way to get the compiler on the Ubuntu system?

Thanks for any help in advance.
 
Old 11-29-2012, 04:29 PM   #2
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 775

Rep: Reputation: 173Reputation: 173
A quick google, and

I found this that may help:
May 4th, 2010, 05:14 PM
Edit your /etc/apt/sources.list to add:
deb http://cz.archive.ubuntu.com/ubuntu hardy-updates main universe

Then use:
sudo apt-get update
sudo apt-get install g77
--------------------
G77 is the GNU F77 compiler package that is part of the GCC/G++ world. To get it all on Ubuntu, you may need to download new libs (after checking the requirments) and the GCC source package and compile the compiler with the right options to create a new GCC with G77. Rather a pain, but someone on the Ubuntu team decided we will never need FORTRAN again. How silly!

------------
I have not checked the Debian repos and packages. There may be something interesting there! I run CentOS and Debian on my systems, but cross loading packages is not recommended.
 
1 members found this post helpful.
Old 12-01-2012, 11:10 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
The g77-compat compiler for Ubuntu 11* .. 12* :
g77-compat-3.4.6.ubuntu11_i386.deb
https://docs.google.com/open?id=0B7S...kZXX0xWN0M0Um8

Ubuntu 12.04, g77-compat depends on gcc34-compat-3.4.6.ubuntu1204_i386.deb
https://docs.google.com/open?id=0B7S...GdETGREbXp2T1U
 
1 members found this post helpful.
Old 12-02-2012, 07:30 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
It would be good to investigate why he needs g77. Some defaults are different any maybe gfortran needs -finit-local-zero or other switches. But this could also be fixed inside the source code not to rely on this behavior of the compiler.
 
1 members found this post helpful.
Old 12-03-2012, 08:28 AM   #5
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
@knudfl

thank you very much!

@Reuti

Have ya ever met someone who is "set in their ways"? That's what I'm dealing with here. Nothing could be said to change the situation. Appreciate the response though.
 
Old 12-10-2012, 02:43 PM   #6
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
I just found out that there is a fortan 77 compiler for Ubuntu 12.04 (fort77). Has anyone used this? Is it the same as f77?

Also, while installing the application, apt had the following output:

Code:
update-alternatives: using /usr/bin/fort77 to provide /usr/bin/f77 (f77) in auto mode.
I'm not sure what this means, and Google didn't yield anything helpful. Does anyone know what this means?
 
1 members found this post helpful.
Old 12-10-2012, 03:44 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 6.

gcc34-compat-3.4.6, g77-compat-3.4.6 : A gcc-3.4.6 build.


'fort77' is a 7.5 kB perl script that "Invokes f2c like a real compiler"
http://packages.ubuntu.com/precise/fort77

Works with some f77 code, not all. If I remember right.


.
 
1 members found this post helpful.
Old 12-11-2012, 08:44 AM   #8
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by knudfl View Post
# 6.

gcc34-compat-3.4.6, g77-compat-3.4.6 : A gcc-3.4.6 build.


'fort77' is a 7.5 kB perl script that "Invokes f2c like a real compiler"
http://packages.ubuntu.com/precise/fort77

Works with some f77 code, not all. If I remember right.


.
Have you used it before? Would it work the same way (despite some code possibly not working)?
 
Old 12-12-2012, 06:36 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 8

Why not use the proof tool ? I.e. g77-compat-3.4.6 .
 
1 members found this post helpful.
Old 12-12-2012, 07:58 AM   #10
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by knudfl View Post
# 8

Why not use the proof tool ? I.e. g77-compat-3.4.6 .
I had tried to use it but the system was complaining about missing packages when I tried to install the .deb file. I forget exactly what.
 
Old 12-12-2012, 08:28 AM   #11
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
Here's the error I was talking about:

Code:
# dpkg -i gcc34-compat-3.4.6.ubuntu1204_i386.deb
Selecting previously unselected package gcc34-compat:i386.
(Reading database ... 24090 files and directories currently installed.)
Unpacking gcc34-compat:i386 (from gcc34-compat-3.4.6.ubuntu1204_i386.deb) ...
dpkg: dependency problems prevent configuration of gcc34-compat:i386:
 gcc34-compat:i386 depends on libc6.
dpkg: error processing gcc34-compat:i386 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gcc34-compat:i386
 
Old 12-12-2012, 10:23 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 11

May be you have a 64bits OS ?

This command will reply with i686 for 32bits, and x86_64 for 64bits :
$ uname -m
 
1 members found this post helpful.
Old 12-12-2012, 10:36 AM   #13
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
Yes, it's a 64 bit system.
 
Old 12-13-2012, 10:21 AM   #14
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 210

Original Poster
Rep: Reputation: 48
#12

Do I require 64 bit versions of the deb files that you provided for it to work? If so, do you know where I could get them?
 
Old 12-13-2012, 10:49 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,675

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
# 14.

The gccXx-compat compilers for 32bits Ubuntu 11* - 12* :
They were created by me, mainly to be used for old versions of ns2,
which work best on a 32bits OS.

I will check if it's possible to build a 64bits gcc-3.4.6 + f77,
and let you know.


.

Last edited by knudfl; 12-13-2012 at 04:38 PM.
 
1 members found this post helpful.
  


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
Fortran (f77) for linux? need compiler for SLES10 preferably free ron7000 Programming 7 08-14-2008 12:21 PM
Neither an F77 compiler nor f2c found Peter Shepard Ubuntu 5 08-11-2006 10:13 PM
no f77 in the suse 10.1 ztdep Suse/Novell 4 06-02-2006 08:02 AM
how to use a library in f77 or itel fortran compiler ztdep Programming 1 12-31-2005 03:55 PM
f77 Jozsef Linux - Newbie 1 10-08-2004 01:34 PM


All times are GMT -5. The time now is 11:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration