LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-10-2006, 05:21 AM   #1
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Rep: Reputation: 15
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77.


Hello, time for stupid questions again. I downloaded gcc-4.1.0.tar.bz2 from the GNU project website so I could get the fortran complier which are not in the stock version of gcc with SUSE 10.0. Accourding to the doumentation
" The full distribution includes the C, C++, Objective-C, Fortran 77, Fortran (in case of GCC 4.0 and later), Java, and Ada (in case of GCC 3.1 and later) compilers".
However after I have installed gcc I only seem to have gfortran which is a fortran 95 compiler and I need fortran 77. I am guessing now that although I downloaded what I belive is the full version I will have to download an exstra bit. In older versions of gcc e.g 3.3.6 there is a gcc-g77 component to download but only a fortran component for 4.1.0. Does this mean I will have to build an old version of gcc? Ihave looked in the documentation but can't find any other refereance to fortrann 77 compilation other than g77.

The documentation also states that
"If you also intend to build binutils (either to upgrade an existing installation or for use in place of the corresponding tools of your OS), unpack the binutils distribution either in the same directory or a separate one. In the latter case, add symbolic links to any components of the binutils you intend to build alongside the compiler (bfd, binutils, gas, gprof, ld, opcodes, ...) to the directory containing the GCC sources."

Is this what I will have to do if I wich to add g77, if so could some one please explain this paragraph as I do not realy understand it and what bit I sould download. I am running SUSE 10.0 if that is important. I know this is proibibly a solution which is stairing me in the face but I don't understand why I do not seem to have the fortran 77 compiler.

Thanks for your time.
 
Old 04-02-2006, 06:12 PM   #2
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
gcc-g77 is separate from gcc and was probably not included with the gcc 4.* "group" because it has not been recently updated. Just get the one from the older release of gcc and it should work just fine.

regards,
...drkstr
 
Old 08-16-2006, 08:01 AM   #3
richardash1981
LQ Newbie
 
Registered: Aug 2006
Posts: 25
Blog Entries: 1

Rep: Reputation: 18
The g77 project is dead, so there will be no more releases, only the 3.x versions already out there. Fortran 95 compilers should be capable of compiling fortran 77 code, so you should be able to use either gfortran or (I find it works better, although more work to install) g95
 
Old 07-04-2007, 07:39 AM   #4
tethysgods
Member
 
Registered: May 2004
Posts: 166

Rep: Reputation: 17
getting it running

Yes, g77 is no longer supported as of version 4.

If you want to mix C and fortran and still use g77, download
a gcc-3.4.6 tarball. If your gcc-4.something is in /usr/bin
do a configure --prefix=/usr/local so as not to overwite it.
(It is the default anyhow, but just in case...) and the usual make
and (as root) make install.

Then do

export PATH=$PATH:/usr/local/bin

ln -s /usr/local/bin/gcc gcc2

so when you do gcc2 --version you see you pick up the right one.

You also need

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

If you decide on gfortran, download a tarball. This unpacks the whole thing into a directory called irun, there is no intallation to do.
So, if you move the tarball (as root of course) to say /etc, and unpack it there you will need

export PATH=$PATH=/etc/irun/bin

and add /etc/irun/lib to the library path as above
 
  


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 debugging question with g77 and gdb miasmak Programming 1 08-16-2006 08:03 AM
Fortran compiler gcc-g77 installation problem refp16 Linux - Software 6 11-26-2005 01:49 PM
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 09:59 AM
compile( gcc-g77) fortran with fedora core 3 gambato79 Programming 1 05-06-2005 01:49 PM
G77 Fortran included in Fedora 2 ? aeslin Linux - Software 1 11-08-2004 08:27 AM


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