Is it possible to have Fortran 77 compiler (f77) in Manjaro?

Is it possible to install Fortran 77 compiler (f77) in Manjaro? I know it’s an old standard, but is still widely used for academic purposes (Also Ubuntu … and Debian, by extension, provides f77 via the standard gfortran package).

1 Like

enable the aur-packages in pamac and you’ll find a lot

Hi @sureshs2004,

Searching the AUR shows many, many, many packages for fortran:

$ pamac search fortran
tau                                                                                                                                                                                                                2.24.1-1                       AUR 
Profiling and tracing toolkit for Fortran, C, C++, Java and Python programs
shtools                                                                                                                                                                                                            4.9.1-1                        AUR 
Fortran interface for SHTOOLS
r-inline                                                                                                                                                                                                           0.3.19-1                       AUR 
Functions to Inline C, C++, Fortran Function Calls from R
ratfor                                                                                                                                                                                                             1.0-1                          AUR 
Preprocessor for fortran
python-gdbgui                                                                                                                                                                                                      0.15.0.1-1                     AUR 
Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in
your browser. https://gdbgui.com
python-f90nml                                                                                                                                                                                                      1.3-1                          AUR 
A Fortran namelist parser for Python
pgplot                                                                                                                                                                                                             5.2.2-7                        AUR 
Fortran- or C-callable, device-independent graphics package for making simple scientific graphs.
pg2plplot                                                                                                                                                                                                          5.13.0-1                       AUR 
Assist the transition from PGPlot to PLplot in Fortran programs
openwatcom-v2                                                                                                                                                                                                      2.0-7                          AUR 
The Open Watcom Fortran/C/C++ compiler, binary distribution -V2 fork
opencoarrays                                                                                                                                                                                                       2.9.2-1                        AUR 
A transport layer for coarray Fortran compilers.
ogpf-git                                                                                                                                                                                                           r49.578f7b6-1                  AUR 
An object-oriented Fortran module to access GnuPlot
ninja-kitware                                                                                                                                                                                                      1.10.2-1                       AUR 
Small build system with a focus on speed - Kitware version with JobServer and Fortran compatibility
ncregrid                                                                                                                                                                                                           1.5b-1                         AUR 
Tool (written in FORTRAN-90) for data transfer of gridded 2- and 3-dimensional (spatial) geophysical/geochemical scalar fields between grids of different resolutions.
mingw-w64-f2c                                                                                                                                                                                                      1.0-1                          AUR 
Fortran to C code translator (mingw-w64)
mingw-w64-cfitsio                                                                                                                                                                                                  4.0.0-1                        AUR 
'A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format (mingw-w64)
mingw-w64-arpack                                                                                                                                                                                                   3.7.0-2                        AUR 
Fortran77 subroutines designed to solve large scale eigenvalue problems (mingw-w64)
mcxx                                                                                                                                                                                                               2.3.0.20190627-1               AUR 
Mercurium is a C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping developed by the Programming Models group at the Barcelona Supercomputing Center.
makedepf90                                                                                                                                                                                                         2.8.9-1                        AUR 
Fortran dependency generation tool
libthesky                                                                                                                                                                                                          0.4.2-1                        AUR 
Fortran library to compute the positions of celestial bodies and events with great accuracy
libsufr                                                                                                                                                                                                            0.7.7-1                        AUR 
A LIBrary containing Some Useful Fortran Routines
libmatio-git                                                                                                                                                                                                       1.5.17.40.gfe484df-1           AUR 
C library with a fortran 90/95 module interface for reading/writing MATLAB MAT-files
libmatheval                                                                                                                                                                                                        1.1.11-1                       AUR 
A C/Fortran library to parse and evaluate symbolic expressions input as text.
libf2c                                                                                                                                                                                                             34.3.4.6.32-2                  AUR 
A library which is needed to run Fortran 77 dynamically linked programs built by g77 3.4.x (CentOS 7).
hipfort                                                                                                                                                                                                            5.1.1-1                        AUR 
Fortran interfaces for ROCm libraries
hdf4-static                                                                                                                                                                                                        4.2.14-1                       AUR 
General purpose library and file format for storing scientific data (version including the FORTRAN interfaces)
golem95                                                                                                                                                                                                            1.3.3-1                        AUR 
A package for the numerical evaluation of integrals and tensor form factors entering the calculation of one-loop amplitudes with up to six external legs, written in Fortran 95.
gcc34-g77-bin                                                                                                                                                                                                      3.4.6.4.1-3                    AUR 
Fortran 77 support for compatibility compiler.
g95                                                                                                                                                                                                                0.94-3                         AUR 
A stable, production Fortran 95 compiler available for multiple cpu architectures and operating systems
g2                                                                                                                                                                                                                 0.72-6                         AUR 
2D graphics library; can be used with C, C++, Fortran to generate flow charts.
fypp                                                                                                                                                                                                               3.1-1                          AUR 
Python powered Fortran preprocessor
ftl-git                                                                                                                                                                                                            r172.d977353-1                 AUR 
The Fortran Template Library
fprettify                                                                                                                                                                                                          0.3.7-1                        AUR 
An auto-formatter for modern Fortran code that imposes strict whitespace formatting, written in Python.
fortls                                                                                                                                                                                                             2.2.4-1                        AUR 
A modern Language Server for Fortran.
fort77                                                                                                                                                                                                             1.18-3                         AUR 
Compile Fortran code with your favourite C compiler (set CC).
fmlib                                                                                                                                                                                                              1.3-5                          AUR 
A fortran multiple-precision arithmetic library
findent                                                                                                                                                                                                            3.1.7-1                        AUR 
Indent, beautify Fortran source, generate dependencies
fgsl-git                                                                                                                                                                                                           1.4-1                          AUR 
A Fortran interface to the GNU Scientific Library
feynhiggs                                                                                                                                                                                                          2.18.1-1                       AUR 
FeynHiggs is a Fortran code for the (diagrammatic) calculation of the masses, mixings and much more of the Higgs bosons in the MSSM with real/complex parameters at the highest level of accuracy.
f90cache                                                                                                                                                                                                           0.99-1                         AUR 
Caching pre-processor for Fortran compilers
f4go-git                                                                                                                                                                                                           r587.b8b6202-1                 AUR 
Transpiling fortran code to golang code
f2c                                                                                                                                                                                                                20200916-2                     AUR 
Fortran to C code translator
cdi                                                                                                                                                                                                                2.0.0-2                        AUR 
CDI is a general purpose C-library with an additional Fortran interface for file IO in the geoscience area. Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG. CDI is the IO part of CDO
bxdecay0-git                                                                                                                                                                                                       1.0.10.13.g5366e1f-1           AUR 
C++ port of the legacy Decay0 FORTRAN library
bxdecay0-geant4-git                                                                                                                                                                                                1.0.10.13.g5366e1f-1           AUR 
C++ port of the legacy Decay0 FORTRAN library
bxdecay0-geant4                                                                                                                                                                                                    1.0.10-1                       AUR 
C++ port of the legacy Decay0 FORTRAN library
bxdecay0                                                                                                                                                                                                           1.0.10-1                       AUR 
C++ port of the legacy Decay0 FORTRAN library
binfmtc                                                                                                                                                                                                            0.17-2                         AUR 
Execute C/C++ and Fortran Programs like scripts.
arprec                                                                                                                                                                                                             2.2.19-1                       AUR 
An arbitrary precision math library for C++ and Fortran-90.
apache-ant-cpptasks                                                                                                                                                                                                1.0b5-3                        AUR 
C/C++, FORTRAN and MIDL tasks for Apache Ant.
lib32-gcc-libs                                                                                                                                                                                         [Installed] 11.2.0-4                       core 
32-bit runtime libraries shipped by GCC
gcc-libs                                                                                                                                                                                               [Installed] 11.2.0-4                       core 
Runtime libraries shipped by GCC
vim-fortran                                                                                                                                                                                                        0.4-2                          AUR 
Additional indentation rules for Fortran 95 and Fortran 90
python-fortranformat                                                                                                                                                                                               1.2.0-1                        AUR 
Mimics Fortran textual IO in Python
netcdf-fortran-openmpi                                                                                                                                                                                             4.5.3-3                        community 
NetCDF fortran bindings with parallel support (openmpi version)
netcdf-fortran                                                                                                                                                                                                     4.5.4-1                        community 
NetCDF fortran bindings
man-pages-fortran                                                                                                                                                                                                  0.1.0-1                        AUR 
Man pages for the Fortran language
libgfortran6                                                                                                                                                                                                       6.4.1-1                        AUR 
Fortran runtime libraries shipped by GCC6
lfortran                                                                                                                                                                                                           0.14.0-2                       AUR 
Modern interactive LLVM-based Fortran compiler
intel-oneapi-compiler-fortran                                                                                                                                                                                      2021.2.0-1                     AUR 
Intel® Fortran Compiler (Beta) & Intel® Fortran Compiler Classic 2021.2.0 for Linux* for Intel(R) 64
intel-fortran-compiler                                                                                                                                                                                             2020.4.304-3                   AUR 
Intel Fortran compiler 19.1.3
hdf5_18-cpp-fortran                                                                                                                                                                                                1.8.21-1                       AUR 
General purpose library and file format for storing scientific data
gtk-3-fortran-git                                                                                                                                                                                                  r536.6173c1f-2                 AUR 
A binding of the GTK+ 3.x libraries for Fortran 95/2003
gccrs-fortran-git                                                                                                                                                                                                  12.0.0_r189195.gca0b06f86fd-1  AUR
Fortran front-end for GCC
gcc-fortran-multilib-git                                                                                                                                                                                           12.0.0.r190435.840a22e0fee-1   AUR
Fortran front-end for GCC for multilib
gcc-fortran-git                                                                                                                                                                                                    13.0.0_r192889.g0c723bb4be2-1  AUR
Fortran front-end for GCC (git version)
gcc-fortran                                                                                                                                                                                                        11.2.0-4                       core
Fortran front-end for GCC
gcc9-fortran                                                                                                                                                                                                       9.4.0-1                        AUR
Fortran front-end for GCC (9.x.x)
gcc8-fortran                                                                                                                                                                                                       8.5.0-1                        AUR
Fortran front-end for GCC (8.x.x)
gcc7-fortran                                                                                                                                                                                                       7.5.0-3                        AUR
Fortran front-end for GCC (7.x.x)
gcc6-fortran                                                                                                                                                                                                       6.5.0-7                        AUR
Fortran front-end for GCC
gcc10-fortran                                                                                                                                                                                                      10.3.0-2                       AUR
Fortran front-end for GCC (10.x.x)
fortran_stdlib                                                                                                                                                                                                     0.2.1-1                        AUR
Fortran standard library
fortran-language-server                                                                                                                                                                                            1.12.0-1                       AUR
Fortran Language Server for the Language Server Protocol
fortran-fpm-bin                                                                                                                                                                                                    0.4.0-1                        AUR
A package manager and build system for Fortran.
fortran-fpm                                                                                                                                                                                                        0.5.0-1                        AUR
A Fortran package manager and build system

Searching for fortran 77 narrows it down quite drastically:

$ pamac search fortran 77
mingw-w64-arpack                                                                                                                                                                                                                         3.7.0-2        AUR
Fortran77 subroutines designed to solve large scale eigenvalue problems (mingw-w64)
libf2c                                                                                                                                                                                                                                   34.3.4.6.32-2  AUR
A library which is needed to run Fortran 77 dynamically linked programs built by g77 3.4.x (CentOS 7).
gcc34-g77-bin                                                                                                                                                                                                                            3.4.6.4.1-3    AUR
Fortran 77 support for compatibility compiler.
fort77                                                                                                                                                                                                                                   1.18-3         AUR
Compile Fortran code with your favourite C compiler (set CC).

So you could try one of those packages:

pamac build <packageName>

Where <packageName> is the name of the package you wish to install.

This?

pacman -Ss gcc-fortran
core/gcc-fortran 11.2.0-4
    Fortran front-end for GCC

In Debian f77 is just a link to gfortran . Nothing more. gfortran is provided by gcc-fortran in Manjaro.

1 Like

@xabbu , Yes, I’ve seen that too, but is that completely true? I’ve compiled newer Fortran code (Fortran 90 compliant) successfully with gfortran but the same code compilation failed if ran with f77. If f77 is just a symlink, should that happen?

1 Like

A program can act differently if it is started by a different name. I don’t know if that is the case with gfortran .
And since in Debian uses it’s update-alternatives for these things, are you sure you use gfortran for f77 . Maybe you use an older GCC release for it or a comply different compiler.