I am not familiar with NetBSD, only Linux, but a quick search suggests that
gfortran should be included with gcc, but it may not be in the default PATH.
If NetBSD provides locate, you can try
locate gfortran
Alternatively, it may be somewhere in ${PREFIX}/gcc14
I don’t know what PREFIX would be – I just got it from a Google search –
presumably it’s the root for pkgsrc so maybe /usr or /usr/local or something
like that. So cd to that directory and run
find . -name gfortran
Or try which gcc to find that, then poke around in other directories at a
similar level in the tree.
https://wiki.netbsd.org/languages/
In rpm-based distros I can run
rpm -ql packagename
which gives me the full manifest of the files. Maybe there is an equivalent
for pkgsrc.
Katherine Holcomb
UVA Research Computing https://www.rc.virginia.edu
[email protected]<mailto:[email protected]> 434-982-5948
From: [email protected] <[email protected]>
Sent: Sunday, October 26, 2025 10:02 AM
To: FX Coudert <[email protected]>
Cc: Fortran <[email protected]>
Subject: Re: pkgsrc port
Hello!
Apologies, I was not clear enough. I have used Debian before and it was simpler
to install package using `apt install gfortran` (or it was pre-installed, I do
not recall).
Here, I seem to have gcc pre-installed on NetBSD, but not gfortran.
[cid:[email protected]]
I installed gcc14 from the
repo<https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.1/All/> using
`pkgin install gcc14` (base gcc15 was not available) and the result is the same.
I have never tried to build from source so I am unsure about how to proceed.
But, I think it would be more convenient to have gfortran available as a
separate install-and-use package.
If you could provide me with some guidance, I would be happy to help with that.
:)
Regards,
Raj
--
Secured with Tuta Mail:
https://tuta.com/free-email
26 Oct 2025, 15:30 by [email protected]<mailto:[email protected]>:
Hi,
gfortran is part of GCC. pkgsrc appears to have many versions of gcc available,
and they include gfortran: see
https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/lang/gcc15/index.html and
https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/lang/gcc14/index.html and the
gcc-fortran option: "Build the gcc Fortran frontend and libraries”.
FX