LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-25-2014, 09:43 AM   #1
mohammad taqy bayat
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Rep: Reputation: Disabled
g77 installation on ubuntu 12.04 (64-bit)


hi there,
My laptop is 64-bit machine that ubuntu 12.04 LTS(64-bit) installed on it and I need g77 compiler to run a makefile like this:

LEADIR := ./lea

FC := g77

CC := gcc

FFLAGS := -c -fno-underscoring -fugly-logint

CFLAGS := -c -O -DLinux -I $(LEADIR)/inc

LDFLAGS:= -O2 -L$(LEADIR) -llea -L/usr/X11R6/lib -lXext -lX11

%.o : %.for ; $(FC) $(FFLAGS) $<

fsources := $(shell echo *.for)
csources := $(shell echo *.c)

fobjects := $(fsources:.for=.o)
cobjects := $(csources:.c=.o)

all: prog

prog: $(fobjects) $(cobjects) $(fsources) $(csources)
$(FC) $(fobjects) $(cobjects) -o ReadData -lpthread $(LDFLAGS)


clean:
rm *.o *~ ReadData

here is the error massage:

bayat@ubuntu:~/BINA/ReadData_off$ make
g77 -c -fno-underscoring -fugly-logint analyse.for
make: g77: Command not found
make: *** [analyse.o] Error 127

please tell me how can i install it.

Last edited by mohammad taqy bayat; 08-31-2014 at 02:37 AM.
 
Old 08-26-2014, 05:48 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Change "FC" from g77 to gfortran

gfortran is now the all-encompassing fortran compiler, including 77, 90, 95, etc.
http://www2.physics.ox.ac.uk/it-serv...as-g77-gone-to

Last edited by suicidaleggroll; 08-26-2014 at 05:53 PM.
 
Old 08-26-2014, 09:54 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
i was under the impression that for 77 you needed "gcc33-fortran "
that 90 and up are in the current gcc4
 
Old 08-31-2014, 01:06 AM   #4
mohammad taqy bayat
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Change "FC" from g77 to gfortran

gfortran is now the all-encompassing fortran compiler, including 77, 90, 95, etc.
http://www2.physics.ox.ac.uk/it-serv...as-g77-gone-to
I changed the "g77" to "gfortran" but I encountered with this error:
f951: error: unrecognized command line option ‘-fugly-logint’
 
Old 08-31-2014, 07:12 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
"g77" for Ubuntu 12.04 - 64bits : compat-gcc34-g77-3.4.6-ubuntu12-1_amd64.deb
https://drive.google.com/file/d/0B7S...it?usp=sharing

Depends on : compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb
https://drive.google.com/file/d/0B7S...it?usp=sharing
... and compat-libf2c-3.4.6-ubuntu12-2_amd64.deb
https://drive.google.com/file/d/0B7S...it?usp=sharing

-
 
Old 08-31-2014, 10:37 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by mohammad taqy bayat View Post
I changed the "g77" to "gfortran" but I encountered with this error:
f951: error: unrecognized command line option ‘-fugly-logint’
Then whoever wrote the initial code didn't know what they were doing. Your best option is to remove that flag and fix the actual problems with the code:
https://who.rocq.inria.fr/Michel.Kern/G77/g77_9.html

That flag is essentially telling the compiler, "I know that what I wrote isn't actually fortran, but try to figure out what I meant and do that instead." It was thankfully removed from gfortran, since it has no business being in a compiler.

Last edited by suicidaleggroll; 08-31-2014 at 10:40 AM.
 
Old 08-31-2014, 10:56 PM   #7
mohammad taqy bayat
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Original Poster
Rep: Reputation: Disabled
I removed the flag of "-fugly-logint" but it shows the following ERROR:
gfortran -c -fno-underscoring analyse.for
eve_buff.inc:64.72:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 adc_buf(0:m_adc_max,0:15),
1
Error: Syntax error in COMMON statement at (1)
eve_buff.inc:65.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 tdc_buf(0:m_tdc_max,0:31,1:16),
1
Error: Invalid character in name at (1)
eve_buff.inc:107.24:
Included at KVI_include.inc:9:
Included at analyse.for:17:

common /evebuf1/
1
Error: Syntax error in COMMON statement at (1)
eve_buff.inc:108.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 nev, sec, nsec, ireg, nsca, nadc, ntdc, npcs
1
Error: Invalid character in name at (1)
eve_buff.inc:110.72:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 n_event,
1
Error: Syntax error in COMMON statement at (1)
eve_buff.inc:111.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 s_poi,
1
Error: Invalid character in name at (1)
eve_buff.inc:112.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 a_poi,
1
Error: Invalid character in name at (1)
eve_buff.inc:113.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 t_poi,
1
Error: Invalid character in name at (1)
eve_buff.inc:114.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 p_poi
1
Error: Invalid character in name at (1)
eve_buff.inc:115.24:
Included at KVI_include.inc:9:
Included at analyse.for:17:

common /evebuf3/
1
Error: Syntax error in COMMON statement at (1)
eve_buff.inc:116.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 sca(1:m_scl_max),
1
Error: Invalid character in name at (1)
eve_buff.inc:117.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 adc(1:eve_adc_max),
1
Error: Invalid character in name at (1)
eve_buff.inc:118.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 tdc(1:eve_tdc_max),
1
Error: Invalid character in name at (1)
eve_buff.inc:119.9:
Included at KVI_include.inc:9:
Included at analyse.for:17:

1 pcos(1:eve_pcs_max)
1
Error: Invalid character in name at (1)
make: *** [analyse.o] Error 1
 
Old 09-01-2014, 12:42 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
As I said before, you need to remove the flag and fix the code
You have two options:
1) Try to pigeonhole a modern compiler intro attempting to interpret the code you have in front of you.
or
2) Fix the code to conform to actual Fortran standards and use any modern Fortran compiler you wish to build it.

Last edited by suicidaleggroll; 09-01-2014 at 10:02 AM.
 
  


Reply

Tags
64-bit, compat-g77, compiler, fortran, gcc34-g77, ubuntu 12.04


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
[SOLVED] Overwriting the Ubuntu 64 bit partition with installation of 32 bit version brantkings Ubuntu 7 09-12-2011 12:12 PM
[SOLVED] installation of g77 compiler in ubuntu sayan007 Linux - Software 2 03-08-2011 10:14 AM
Installation of UBUNTU 10.10 (64 bit) alongside Windows XP (32 bit) jjjdavey Linux - Newbie 7 03-01-2011 06:26 PM
g77 installation on gcc 4.3 rafopar Linux - Software 6 02-21-2009 08:33 PM
g77 installation johnpaulodonnell Linux - Newbie 2 11-28-2006 12:18 PM


All times are GMT -5. The time now is 10:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration