1

I am using g77 (gcc 3.4.6) in my fedora 20. I got compiler errors:

g77: unrecognized option `-trapuv'

f771: error: invalid option `ips2'

How can I solve this problem?

Also, if I want to use gfortran instead, what are the equivalent options?

Thanks.

Community
  • 1
  • 1
manojg
  • 59
  • 8
  • What is the result of `g77 --version`? It's possible `g77` is calling `gfortran` with legacy options anyways. – Ross Sep 23 '15 at 22:30
  • g77 --version gives: GNU Fortran (GCC) 3.4.6 20060404 (Red Hat 3.4.6-29.fc19) Copyright (C) 2006 Free Software Foundation, Inc. – manojg Sep 23 '15 at 23:49
  • 3
    Why are you using an ancient compiler? – Jeff Hammond Sep 24 '15 at 02:07
  • 1
    -trapuv is a flag to f2c, a "compiler" of even more ancient vintage than g77, no idea what the error is though. Moving to a modern Fortran compiler is almost certainly the way to go, could you show us your full compile and link lines, then somebody will probably be able to help you with the gfortran equivalent. – Ian Bush Sep 24 '15 at 08:11
  • Thanks. It is a already written code by somebody else and it comes with makefile using g77. Here are the compiling flags that is used: FFLAGS = -C -trapuv -mips2 -c. I am also looking for the gfrotran equivalent of these flags. – manojg Sep 24 '15 at 14:56
  • 1
    Well those are debugging flags - you do realise that if you use them the code will run at far from full speed? Anyway a rough equivalent for gfortran is -fcheck=all -finit-real=snan -c . You should also show us the linker flags, you might need to make changes there. – Ian Bush Sep 25 '15 at 07:39
  • Ian, Thanks a lot. It compiles by using the flags you provided but a lot of errors like: Warning: Deleted feature: ASSIGN statement at (1) and Warning: Deleted feature: Assigned GOTO statement at (1). The linkage flag is gfortran -o a.out $(OBJECTS) /usr/local/lib/2003/lib/libkernlib.a – manojg Sep 26 '15 at 15:43
  • Try -std=legacy for the assigned goto warnings – cup Sep 27 '15 at 08:37
  • Works, thanks a lot. – manojg Sep 28 '15 at 13:54

0 Answers0