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. |
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 was under the impression that for 77 you needed "gcc33-fortran "
that 90 and up are in the current gcc4 |
Quote:
f951: error: unrecognized command line option ‘-fugly-logint’ |
"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 - |
Quote:
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. |
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 |
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. |
All times are GMT -5. The time now is 11:56 AM. |