F77(3pm)
β¨ F77 β ExtUtils::F77 π
okay bestie, gather round, because this is the User Contributed Perl Documentation page for ExtUtils::F77, and it's literally the little module that figures out how to glue your C code to Fortran π§
πΈ NAME πΈ
ExtUtils::F77 β a simple interface to F77 libs. no cap, that's the whole job description.
π DESCRIPTION π
so here's the vibe: this module is out here trying to figure out how to link C programs with Fortran subroutines on your system π«Ά Basically you gotta add a whole list of Fortran runtime libraries. the problem?? their location AND their name change with every single OS/compiler combo π it's giving chaos.
fun origin story: it was originally built to make building and installing the PGPLOT module easier (that one links to the pgplot Fortran graphics library). and now a bunch of perl modules use it. glow-up, honestly π
what it does: this module tries to implement a simple 'rule-of-thumb' database for various flavours of UNIX systems. a self-documenting Perl database of knowledge/code for figuring out how to link for various combinations of OS and compiler is embedded right in the module's Perl code β¨
and likeβ¦ please help save the world π₯Ί by submitting patches for new database entries for your system at https://github.com/PDLPorters/extutils-f77. the maintainers will love you forever, fr fr.
π note: the default on most systems is now to search for a generic 'GNU' compiler, which can be gfortran, g77, g95 or fort77 (in that order, based on usage), and then find the appropriate link libraries automatically. (this is the 'Generic' 'GNU' database entry in the code, iykyk.)
you can explicitly override the target compiler by setting the environment variable F77, like:
% setenv F77 "x86_64-pc-linux-gnu-gfortran"
% perl -MExtUtils::F77 -e 'print ExtUtils::F77->compiler, "\n"'
and you can explicitly override the library list the module returns by setting the environment variable F77LIBS, like:
% setenv F77LIBS "-lfoo -lbar"
% perl -MExtUtils::F77 -e 'print ExtUtils::F77->runtime, "\n"'
...
π SYNOPSIS π
use ExtUtils::F77; # Automatic guess
use ExtUtils::F77 qw(sunos); # Specify system
use ExtUtils::F77 qw(linux g77); # Specify system and compiler
$fortranlibs = ExtUtils::F77->runtime;
π¦ METHODS π¦
the following are all class methods bestie. every single one. π
β runtime
Returns a list of F77 runtime libraries. the whole point of the module tbh.
$fortranlibs = ExtUtils::F77->runtime;
β runtimeok
Returns TRUE only if runtime libraries have been found successfully. so if this is falseβ¦ yeah. sad girl hours π
β trail_
Returns true if F77 names have trailing underscores. yes the underscore. it matters. don't ask me why, ask Fortran π
β compiler
Returns the command to execute the compiler (e.g. 'f77'). main character energy right there π
β cflags
Returns compiler flags. flags. slay. π©
β testcompiler
Test to see if the compiler actually works. like, does it actually work, or is it just talking π vibe check for your compiler.
π DEBUGGING π
wanna snoop on this module and/or get more info about its workings? set $ExtUtils::F77::DEBUG to a true value. if it's set, it will "warn" various information about its operations. detective mode π
as of version 1.22, this module will no longer print or warn if it is working normally. so if it's quiet, it's happy. no news is good news, bestie π
π SEE ALSO π
PDL(and inside it:PDL::MinuitandPDL::Slatec) πPGPLOTβ¨
π AUTHOR π
Karl Glazebrook, with many other contributions β see the git repository at https://github.com/PDLPorters/extutils-f77 π
and that's the whole page, bestie π«Ά this was the F77(3pm) manual, shipped with perl v5.32.1, dated 2021-02-19. go link some Fortran. periodt π
β¨
π¦ where this page comes from
- debian bookworm: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libextutils-f77-perl 1.26-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms