LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 08: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 01:37 AM.
 
Old 08-26-2014, 04:48 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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 04:53 PM.
 
Old 08-26-2014, 08:54 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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, 12: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, 06:12 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
"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, 09:37 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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 09:40 AM.
 
Old 08-31-2014, 09: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 08-31-2014, 11:42 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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 09:02 AM.
 
  


Reply

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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