• gcc: error: fort77: No such file or directory

    From Anouar BOUANO@21:1/5 to All on Wed Sep 14 05:14:39 2022
    I want to compile a fortran77 code and after using the commange :
    fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f
    I got the message : gcc: error: fort77: No such file or directory

    Do you know any idea please how to solve this problem?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Koenig@21:1/5 to Anouar BOUANO on Wed Sep 14 14:14:02 2022
    Anouar BOUANO <aboulanouar1@gmail.com> schrieb:
    I want to compile a fortran77 code and after using the commange :
    fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f
    I got the message : gcc: error: fort77: No such file or directory

    Do you know any idea please how to solve this problem?

    What you have posted is a single command line, but that looks messed up;
    you are passing fort77 as an input file to the "fort77" command, which is probably not what is intended (and which is what the compiler is
    complaining about).

    What is that fort77 command, is it a local script, or an alias, or... ?

    It is best to read an introduction to your compiler to see how
    executables are generated. At a guess, you probably want to set
    the name of the output file with -o and add all the files that
    should be compiled or linked in. So, if you wanted to compile
    an output file named hello_goodbye from the source files
    hello.f and goodbye.f, it could look something like (using
    gfortran here)

    gfortran -o hello_goodbye hello.f goodbye.f

    Hope this helps.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to Anouar BOUANO on Wed Sep 14 07:57:06 2022
    On Wednesday, September 14, 2022 at 5:14:41 AM UTC-7, Anouar BOUANO wrote:
    I want to compile a fortran77 code and after using the commange :

    fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f
    I got the message : gcc: error: fort77: No such file or directory

    It looks like what should have been three lines, three commands, was combined into one.


    fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsacio.a fort77 lscodaq-sn butfilter.f four1.f /home/dell/Documents/SAC/lib/libsac.a
    gcc -o mlmcodaq-sn.f -o mlmcodaq-sn.f

    That still leaves a few questions:

    Is lscodeqan-sn options for the f77 command?

    The gcc command doesn't make sense at all, with two -o options ...

    The fort77 lines seem to compile the same Fortran programs with different libraries,
    but don't specify an output file.
    The default is a.out, which will be overwritten by the second one.

    Most often, I recommend gfortran, even for older programs. As well as I know, it does everything that fort77 does.

    Last year, I was compiling Fortran programs written for the IBM 1130
    with gfortran. Most things work just fine, even old depracated
    features. The one problem I remember, is that IBM allows for
    apostrophed character data in DATA statements, instead of the
    more usual (for the time), Hollerith constants. gfortran only allows the latter.

    You will need to recompile and generate new .a files, though,
    to use any other compiler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anouar BOUANO@21:1/5 to All on Thu Sep 15 03:02:47 2022
    thank you so much for your quick replay,
    In this commande, you can find two fortran77 source files:
    mlmcodaq-sn.f
    lscodaq-sn.f

    and two C-Shell files.

    batch-mlmcodaq-sn.csh

    batch-lscodaq-sn.csh
    Because the fiels are written with fortran77, could you please tell me how I should compile these files

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arjen Markus@21:1/5 to Anouar BOUANO on Thu Sep 15 03:26:51 2022
    On Thursday, September 15, 2022 at 12:02:50 PM UTC+2, Anouar BOUANO wrote:
    thank you so much for your quick replay,
    In this commande, you can find two fortran77 source files:
    mlmcodaq-sn.f
    lscodaq-sn.f

    and two C-Shell files.

    batch-mlmcodaq-sn.csh

    batch-lscodaq-sn.csh
    Because the fiels are written with fortran77, could you please tell me how I should compile these files

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arjen Markus@21:1/5 to Anouar BOUANO on Thu Sep 15 03:30:33 2022
    On Thursday, September 15, 2022 at 12:02:50 PM UTC+2, Anouar BOUANO wrote:
    thank you so much for your quick replay,
    In this commande, you can find two fortran77 source files:
    mlmcodaq-sn.f
    lscodaq-sn.f

    and two C-Shell files.

    batch-mlmcodaq-sn.csh

    batch-lscodaq-sn.csh
    Because the fiels are written with fortran77, could you please tell me how I should compile these files

    There is nothing particularly special about FORTRAN 77: gfortran and a variety of other Fortran compilers can handle such source files as Fortran in its modern versions (90, 95, 2003, 2008, 2018, ...) are all backward compatible. There may be small
    issues, but those relate to very obscure features of older versions and unusual extensions. So probably, if you replace "fort77" by "gfortran" in the command you showed, it will simply work.

    Regards,

    Arjen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to arjen.m...@gmail.com on Thu Sep 15 04:49:43 2022
    On Thursday, September 15, 2022 at 3:30:35 AM UTC-7, arjen.m...@gmail.com wrote:

    (snip)

    There is nothing particularly special about FORTRAN 77: gfortran and a variety of other Fortran compilers can handle such source files as
    Fortran in its modern versions (90, 95, 2003, 2008, 2018, ...)
    are all backward compatible. There may be small issues, but those
    relate to very obscure features of older versions and unusual extensions.
    So probably, if you replace "fort77" by "gfortran" in the command
    you showed, it will simply work.

    Except that there are also some .a files, which are likely compiler specific.

    If there is a Makefile, it will tell how to generate them, possible from C
    or Fortran source.

    It would be useful to see what the .csh files say, too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)