Development Environment / Machine
This step is used with minimal and full Eclipse development environments.
This documentation describes the latest tested development 64-bit environments.
The computer and operating system used for development control how other software components are installed. The target environment is Windows 10/11/+ and Linux, with initial focus being Windows given the needs of the State of Colorado and its contractors.
StateMod code is Fortran and there is a desire to use a recent version of the free and open source gfortran
compiler,
rather than the previous Lahey 95 compiler.
The 32-bit MinGW gfortran
development environment was previously implemented to create 32-bit StateMod executables
and testing showed close agreement with 64-bit executable.
Therefore, the 64-bit executable is the current focus.
Lahey and gfortran
executables were created during transition to gfortran
,
but the current focus is on the gfortran
StateMod version.
This documentation describes how to install the 64-bit MSYS2 MinGW development environment,
which is used to create 64-bit StateMod executables.
The initial approach for StateMod is to use a MinGW environment within Windows,
given that this approach has previously been implemented with success.
When more time is available, Cygwin and Linux development environments will also be tested and documented,
to allow more flexibility for developers that prefer or require those environments.
StateMod is known to have been succefully compiled and used on Linux, using the gfortran
compiler.
See the following resources:
- Binaries available for gfortran - access to various
gfortran
distributions - mingw-w64 - MinGW for Windows 64-bit, can also compile 32-bit executables
- GFortran release notes - these release notes may lag the version that is available in MSYS2
The following sections are included in this documentation for various operating systems. The choice of development environment by the software developer will determine other configuration steps. Windows MinGW is the initial focus.
Linux
Windows
- Install MSYS2 64-bit Software - Linux-like development environment that is the focus of this documentation
- Install 64-bit MinGW Software - additional software needed to compile 64-bit executables
- Install Useful MinGW Software - useful software development tools
- Additional MinGW Environment Configuration for Developer
Install Cygwin - alternative to MinGW environment (not tested)
Linux
This section will be completed when resources are available for Linux development and testing.
A Linux environment is known to have been successfully used with StateMod using the standard gfortran
compiler
and makefile provided with the StateMod source code.
Windows
The use of gfortran
constrains the development environment, especially on Windows,
requiring that either MinGW or Cygwin are used for development,
each of which mimic Linux functionality and allow creating Windows-compatible binary StateMod executable.
Using Eclipse/Photran IDE provides some isolation from the command line environment,
but developers will be more effective if they understand command line programs
and some developers may choose to use text editor and command line tools rather than Eclipse/Photran.
The Eclipse/Photran IDE is currently not the focus of development
and consequently this documentation focuses on command line compiling with make
command.
MinGW or Cygwin are the recommended compiler environments. MinGW is the focus as it has been previously used to compile StateMod and is straightforward to install. The following sections provide documentation for installing MSYS2:
- Install MSYS2 64-bit Software - current instructions, see the following section
- Archive of instructions for MSYS2 12.2
Install MSYS2 64-bit Software
The following documentation was created on 2025-02-16 on a Windows 11 computer
using the MSYS2 installer available at the time,
resulting in the installation of gcc
12.2 and gfortran
12.2.
The process may be different if run at a different time, but will hopefully be similar.
MSYS2 developers change the configuration over time.
The following illustrates the Start menu for different versions of MSYS2. It is important to use the correct menu when following the instructions below. Old versions can be uninstalled if no longer used.
MSYS2 Start Menu | Comments |
---|---|
![]() |
Used with installer containing gcc and gfortran 14.2. |
![]() |
Used with installer containing gcc and gfortran 12.2. |
![]() |
Used with installer containing gcc and gfortran 10.3. |
![]() |
Used with installer containing gcc and gfortran 10.2. |
The Minimalist GNU for Windows (MinGW) environment provides a minimal Linux implementation on Windows.
MinGW provides an environment in which the gcc
and gfortran
compilers will run.
Various software tools are shipped to run inside a MinGW environment, including Git for Windows, separate from the MinGW implementation that is used to compile code. It is OK to install multiple MinGW environments, as long as the software developer understands why each was installed and does not get confused. For example, if a Bash shell is used, the title bar usually indicates what environment is being used.
Title Bar for MinGW Shells
Window Title Bar Image | Description |
---|---|
![]() |
Git Bash window title (after installing Git for Windows), does not typically include gfortran . |
![]() ![]() |
MinGW window title (see installation instructions below), does include gfortran if the following instructions are completed. The title may vary depending on terminal window and MinGW version. The first example shown displays the current folder in the title and ~ indicates the user's home folder. |
See the following for MinGW installation instructions:
- mingw-w64 - current MinGW tools - however, see below for more specific instructions that have been tested
- note that the original
mingw.org
website that was used with initial StateModgfortran
work is not maintained and should be avoided
The documentation below recommends using MSYS2 environment, which includes MinGW 64-bit and 32-bit compilers.
If MSYS2 has previously been installed, it does not need to be reinstalled and can be used to compile StateMod.
See the StateMod release notes for information about which version of gfortran
is used for current development.
To determine whether MSYS2 is installed, look for a C:\msys64
folder.
If it exists, then MSYS2 was previously installed and can continue to be used for StateMod development.
The software also can be reinstalled to use the latest version, if necessary.
If MSYS2/MinGW needs to be installed, download from the mingw-w64 Downloads page, as shown below.
This page provides multiple installers for different target environments,
which changes over time.
However, see the instructions below for the download link - do not use links in the table.
The table is provided in case someone uses a different environment from MSYS2 used in this documentation
and to illustrate how different environments use different gfortran
versions.
Note in the following that some Linux distributions that are recognized for keeping very current with software
versions have the latest gfortran
version whereas Linux distributions that focus on stability will lag.
Download Page for MinGW Packages (see full-size image)
The MSYS2 for Windows installer includes C, C++, and Fortran and is used for development below. Although other installers are available, MSYS2 includes more recent compiler versions than other installers. Do not use links in the above table. Instead, retrieve the installation program from the msys2.org download page, which is similar to the following.
Installation Instructions for MSYS2 (see full-size image)
Download the installer program, which will save to the Downloads
folder.
For the following, the download file is msys2-x86_64-20241208.exe
.
Optionally, follow the instructions for validating the download by using the link on the MSYS2 web page (under the download link). Or, follow the instructions below.
The checksum can optionally be verified using Git Bash sha256sum
program (if Git for Windows is installed)
to ensure that the download file is valid.
Use a download link similar to the main download but with .sha256sum
at the end,
for example ending in msys2-x86_64-20241208.exe.sha256
.
The file contents will be similar to:
dcce4f115cdcb76453c3f0937c8c2629c3b1923f34bc2aa50fd39e9a63ade1fa msys2-x86_64-20241208.exe
Then verify the download using the following in Git Bash, substituting the current installer file, similar to the following. This cuts out the first field from both files and compares the values.
cat msys2-x86_64-20241208.exe.sha256 | cut -d ' ' -f 1 > sum1.txt
sha256sum msys2-x86_64-20241208.exe | cut -d ' ' -f 1 > sum2.txt
diff sum1.txt sum2.txt
The output from the diff
command should be empty, indicating that the checksums are the same
and consequently the installer contents are as expected.
Run the downloaded installer program, for example using Windows File Explorer, and follow the instructions on the above web page. This does not require running as administrator.
Initial Setup Step for MSys2 (see full-size image)
Press Next to start the installation process.
Select Installation Folder for MSys2 (see full-size image)
Press Next to accept the default installation folder. If a warning like the following is shown, several options are available:
-
Update MSYS2 in place. See the Updating MSYS2 documentation. Old software versions will be updated to new versions. After completing the update the following instructions can be ignored.
Because this documentation describes how to set up a new installation, a copy of the folder was created as an archive and then option 2 was used. 2. Remove the old version first. Use the Windows search tool to search for "uninstall" and then select Add or remove programs. Removing an old version will require that all additional software is reinstalled. Before removing, all open MSYS64 windows and applications must be closed. 3. Rename the existing
C:\msys64
to a new name (e.g.,C:\msys64-12.2
for the oldgfortran
version`). Renaming the folder will preserve the files but menus created by the installer will be updated in a later step. Or, copy this folder as an archive and then run option 2.
Select Installation Folder for MSys2 - Directory Exists Error (see full-size image)
If action was taken to deal with the above error, the C:\msys64
should not exist so press Next > to retry installing the software.
Select Start Menu Folder for MSys2 (see full-size image)
Press Next to accept the default Start Menu shortcuts and start the installation process, which will show a progress indicator as shown below.
MSys2 Installation Progress (see full-size image)
The following will be shown when the installation is complete.
MSys2 Installation Complete (see full-size image)
The C:\msys64
folder will include the MSSYS files, including C:\msys64\mingw32
and C:\msys64\mingw64
folders.
Press Finish to open an MSYS2 UCRT24 environment terminal window, as shown below, which will be used to install the MinGW 64-bit (and if necessary, 32-bit environments).
MSYS2 Terminal Window (see full-size image)
In the terminal window, as per the MSYS2 installation instructions,
run the following to update the package repository database that
allows the pacman
package installer to retrieve the latest software.
See also the pacman
documentation to explain command line usage.
Accept the defaults when installing by pressing Enter
. Completing the last step will close the terminal window.
$ pacman -Syu
:: Synchronizing package databases...
clangarm64 438.4 KiB 158 KiB/s 00:03 [###############################] 100%
mingw32 163.2 KiB 61.7 KiB/s 00:03 [###############################] 100%
mingw64 457.1 KiB 163 KiB/s 00:03 [###############################] 100%
ucrt64 490.9 KiB 172 KiB/s 00:03 [###############################] 100%
clang32 21.0 B 8.00 B/s 00:02 [###############################] 100%
clang64 478.1 KiB 863 KiB/s 00:01 [###############################] 100%
msys 351.4 KiB 1195 KiB/s 00:00 [###############################] 100%
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...
Packages (6) bash-5.2.037-2 filesystem-2024.12.18-1 mintty-1~3.7.7-2 msys2-runtime-3.5.7-2
pacman-6.1.0-10 pacman-mirrors-20241217-1
Total Download Size: 11.55 MiB
Total Installed Size: 61.29 MiB
Net Upgrade Size: -0.38 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
filesystem-2024.12.18-1-x86_64 92.2 KiB 137 KiB/s 00:01 [###############################] 100%
mintty-1~3.7.7-2-x86_64 843.5 KiB 827 KiB/s 00:01 [###############################] 100%
pacman-mirrors-20241217-1-any 3.1 KiB 6.99 KiB/s 00:00 [###############################] 100%
pacman-6.1.0-10-x86_64 6.4 MiB 3.42 MiB/s 00:02 [###############################] 100%
msys2-runtime-3.5.7-2-x86_64 1876.6 KiB 836 KiB/s 00:02 [###############################] 100%
bash-5.2.037-2-x86_64 2.4 MiB 871 KiB/s 00:03 [###############################] 100%
Total (6/6) 11.5 MiB 3.83 MiB/s 00:03 [###############################] 100%
(6/6) checking keys in keyring [###############################] 100%
(6/6) checking package integrity [###############################] 100%
(6/6) loading package files [###############################] 100%
(6/6) checking for file conflicts [###############################] 100%
(6/6) checking available disk space [###############################] 100%
:: Processing package changes...
(1/6) upgrading bash [###############################] 100%
(2/6) upgrading filesystem [###############################] 100%
(3/6) upgrading mintty [###############################] 100%
(4/6) upgrading msys2-runtime [###############################] 100%
(5/6) upgrading pacman-mirrors [###############################] 100%
(6/6) upgrading pacman [###############################] 100%
:: To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n]
Multiple versions of the MSYS2 environment are provided, as configured with different Start menu selections.
See the MSYS2 Environment
documentation for a description.
Based on experimentation, the MSYS2 MINGW64 environment is the only version that provides gcc
and gfortran
compilers after the following installation is completed.
Note that executables created by linking files compiled with different libraries, such as MSVCRT and UCRT64 libraries, cannot be mixed. Be consistent when compiling software.
Note also that different versions of installers show "64" (for 64-bit) differently in menus. Newer installers default to 64-bit so "64" does not seem to be shown as often.
Open a new MSYS2 terminal using Start menu MSYS2 / MSYS2 MINGW64,
which will look similar to the following.
Note that the prompt includes MINGW64
.
MSYS2 MINGW64 Terminal Window (see full-size image)
Then run the following to update the environment to current software (note that this is not yet installing the compiler):
$ pacman -Su
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: libintl will be installed before its libiconv dependency
Packages (34) bash-completion-2.16.0-1 ca-certificates-20241223-1 curl-8.12.1-1 getent-2.18.90-5
gettext-0.22.5-1 grep-1~3.0-7 libargp-20241207-1 libasprintf-0.22.5-1
libcurl-8.12.1-1 libedit-20240808_3.1-1 libffi-3.4.7-1 libgettextpo-0.22.5-1
libgnutls-3.8.9-1 libhogweed-3.10.1-1 libiconv-1.18-1 libintl-0.22.5-1
liblzma-5.6.4-1 libnettle-3.10.1-1 libopenssl-3.4.1-1 libpcre-8.45-5
libssh2-1.11.1-1 libtasn1-4.20.0-1 libunistring-1.3-1 libutil-linux-2.40.2-2
libxcrypt-4.4.38-1 msys2-keyring-1~20250214-1 msys2-launcher-1.5-3 nano-8.3-1
nettle-3.10.1-1 openssl-3.4.1-1 perl-5.38.2-3 tzcode-2025a-1 util-linux-2.40.2-2
xz-5.6.4-1
Total Download Size: 21.24 MiB
Total Installed Size: 96.08 MiB
Net Upgrade Size: 3.57 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
libgnutls-3.8.9-1-x86_64 1417.0 KiB 870 KiB/s 00:02 [###############################] 100%
libopenssl-3.4.1-1-x86_64 1858.5 KiB 970 KiB/s 00:02 [###############################] 100%
curl-8.12.1-1-x86_64 840.2 KiB 1173 KiB/s 00:01 [###############################] 100%
gettext-0.22.5-1-x86_64 1841.8 KiB 726 KiB/s 00:03 [###############################] 100%
libunistring-1.3-1-x86_64 745.7 KiB 601 KiB/s 00:01 [###############################] 100%
libiconv-1.18-1-x86_64 709.9 KiB 859 KiB/s 00:01 [###############################] 100%
perl-5.38.2-3-x86_64 6.9 MiB 2047 KiB/s 00:03 [###############################] 100%
openssl-3.4.1-1-x86_64 643.6 KiB 737 KiB/s 00:01 [###############################] 100%
xz-5.6.4-1-x86_64 608.4 KiB 1759 KiB/s 00:00 [###############################] 100%
libcurl-8.12.1-1-x86_64 314.5 KiB 1031 KiB/s 00:00 [###############################] 100%
ca-certificates-20241223-1-any 387.2 KiB 1019 KiB/s 00:00 [###############################] 100%
nano-8.3-1-x86_64 641.5 KiB 1190 KiB/s 00:01 [###############################] 100%
libutil-linux-2.40.2-2-x86_64 301.3 KiB 1182 KiB/s 00:00 [###############################] 100%
tzcode-2025a-1-x86_64 259.3 KiB 904 KiB/s 00:00 [###############################] 100%
libssh2-1.11.1-1-x86_64 225.2 KiB 739 KiB/s 00:00 [###############################] 100%
grep-1~3.0-7-x86_64 243.4 KiB 626 KiB/s 00:00 [###############################] 100%
bash-completion-2.16.0-1-any 217.0 KiB 716 KiB/s 00:00 [###############################] 100%
util-linux-2.40.2-2-x86_64 2.2 MiB 472 KiB/s 00:05 [###############################] 100%
libhogweed-3.10.1-1-x86_64 181.8 KiB 440 KiB/s 00:00 [###############################] 100%
libnettle-3.10.1-1-x86_64 138.7 KiB 335 KiB/s 00:00 [###############################] 100%
libgettextpo-0.22.5-1-x86_64 125.6 KiB 278 KiB/s 00:00 [###############################] 100%
libtasn1-4.20.0-1-x86_64 97.3 KiB 381 KiB/s 00:00 [###############################] 100%
nettle-3.10.1-1-x86_64 97.3 KiB 327 KiB/s 00:00 [###############################] 100%
msys2-launcher-1.5-3-x86_64 96.4 KiB 326 KiB/s 00:00 [###############################] 100%
libpcre-8.45-5-x86_64 93.9 KiB 348 KiB/s 00:00 [###############################] 100%
libedit-20240808_3.1-1-x86_64 91.9 KiB 339 KiB/s 00:00 [###############################] 100%
liblzma-5.6.4-1-x86_64 86.2 KiB 284 KiB/s 00:00 [###############################] 100%
libxcrypt-4.4.38-1-x86_64 77.0 KiB 249 KiB/s 00:00 [###############################] 100%
libintl-0.22.5-1-x86_64 49.4 KiB 182 KiB/s 00:00 [###############################] 100%
msys2-keyring-1~20250214-1-any 41.2 KiB 144 KiB/s 00:00 [###############################] 100%
libargp-20241207-1-x86_64 36.9 KiB 129 KiB/s 00:00 [###############################] 100%
libffi-3.4.7-1-x86_64 30.4 KiB 101 KiB/s 00:00 [###############################] 100%
getent-2.18.90-5-x86_64 11.6 KiB 38.4 KiB/s 00:00 [###############################] 100%
libasprintf-0.22.5-1-x86_64 5.4 KiB 21.3 KiB/s 00:00 [###############################] 100%
Total (34/34) 21.2 MiB 3.45 MiB/s 00:06 [###############################] 100%
(34/34) checking keys in keyring [###############################] 100%
(34/34) checking package integrity [###############################] 100%
(34/34) loading package files [###############################] 100%
(34/34) checking for file conflicts [###############################] 100%
(34/34) checking available disk space [###############################] 100%
:: Processing package changes...
( 1/34) upgrading bash-completion [###############################] 100%
( 2/34) upgrading libopenssl [###############################] 100%
( 3/34) upgrading openssl [###############################] 100%
( 4/34) upgrading libintl [###############################] 100%
( 5/34) upgrading libiconv [###############################] 100%
( 6/34) upgrading libffi [###############################] 100%
( 7/34) upgrading libxcrypt [###############################] 100%
( 8/34) upgrading libtasn1 [###############################] 100%
( 9/34) upgrading ca-certificates [###############################] 100%
(10/34) upgrading libunistring [###############################] 100%
(11/34) upgrading libssh2 [###############################] 100%
(12/34) upgrading libedit [###############################] 100%
(13/34) upgrading libcurl [###############################] 100%
(14/34) upgrading curl [###############################] 100%
(15/34) upgrading libargp [###############################] 100%
(16/34) upgrading getent [###############################] 100%
(17/34) upgrading libgettextpo [###############################] 100%
(18/34) upgrading libasprintf [###############################] 100%
(19/34) upgrading gettext [###############################] 100%
(20/34) upgrading libpcre [###############################] 100%
(21/34) upgrading grep [###############################] 100%
(22/34) upgrading libhogweed [###############################] 100%
(23/34) upgrading libnettle [###############################] 100%
(24/34) upgrading libgnutls [###############################] 100%
(25/34) upgrading liblzma [###############################] 100%
(26/34) upgrading libutil-linux [###############################] 100%
(27/34) upgrading msys2-keyring [###############################] 100%
==> Appending keys from msys2.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2025-08-13
(28/34) upgrading msys2-launcher [###############################] 100%
(29/34) upgrading nano [###############################] 100%
(30/34) upgrading nettle [###############################] 100%
(31/34) upgrading perl [###############################] 100%
(32/34) upgrading tzcode [###############################] 100%
(33/34) upgrading util-linux [###############################] 100%
(34/34) upgrading xz [###############################] 100%
:: Running post-transaction hooks...
(1/1) Updating the info directory file...
If the above results in errors, follow the instructions to run additional commands.
For example, the second step may need to be run if pacman -Su
results in errors:
$ pacman -Sy
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
ucrt64 is up to date
clang64 961.3 KiB 808 KiB/s 00:01 [#######] 100%
clang64.sig 566.0 B 0.00 B/s 00:00 [#######] 100%
msys is up to date
$ pacman -Sy
...additional output follows...
Install 64-bit MinGW Software
The environment is now ready to install 64-bit compiler software including GCC (gcc
) and Fortran (gfortran
).
If not already open, open a new MSYS2 terminal using Start menu MSYS2 / MSYS2 MINGW64
and cd
to the folder that includes the downloaded installer,
for example:
cd /c/Users/someuser/Downloads
Run the following command. The x86_64
indicates 64-bit installer.
This will install many packages that may require several minutes.
Full output is shown below.
Running 64-bit compiler tools after completing the following installation step requires
opening a 64-bit MSYS2 / MSYS2 MINGW64 terminal.
$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
:: There are 13 members in group mingw-w64-x86_64-toolchain:
:: Repository mingw64
1) mingw-w64-x86_64-binutils 2) mingw-w64-x86_64-crt-git 3) mingw-w64-x86_64-gcc
4) mingw-w64-x86_64-gdb 5) mingw-w64-x86_64-gdb-multiarch 6) mingw-w64-x86_64-headers-git
7) mingw-w64-x86_64-libmangle-git 8) mingw-w64-x86_64-libwinpthread-git
9) mingw-w64-x86_64-make 10) mingw-w64-x86_64-pkgconf 11) mingw-w64-x86_64-tools-git
12) mingw-w64-x86_64-winpthreads-git 13) mingw-w64-x86_64-winstorecompat-git
Enter a selection (default=all):
resolving dependencies...
looking for conflicting packages...
Packages (52) binutils-2.44-1 bison-3.8.2-5 diffstat-1.67-1 diffutils-3.10-1 dos2unix-7.5.2-1
flex-2.6.4-4 m4-1.4.19-2 make-4.4.1-2 mingw-w64-x86_64-bzip2-1.0.8-3
mingw-w64-x86_64-expat-2.6.4-1 mingw-w64-x86_64-gcc-libs-14.2.0-2
mingw-w64-x86_64-gettext-runtime-0.23.1-1 mingw-w64-x86_64-gmp-6.3.0-2
mingw-w64-x86_64-isl-0.27-1 mingw-w64-x86_64-libffi-3.4.7-1
mingw-w64-x86_64-libiconv-1.18-1 mingw-w64-x86_64-libsystre-1.0.1-6
mingw-w64-x86_64-libtre-0.9.0-1 mingw-w64-x86_64-mpc-1.3.1-2
mingw-w64-x86_64-mpdecimal-4.0.0-1 mingw-w64-x86_64-mpfr-4.2.1-2
mingw-w64-x86_64-ncurses-6.5.20241228-3 mingw-w64-x86_64-openssl-3.4.1-1
mingw-w64-x86_64-python-3.12.9-3 mingw-w64-x86_64-readline-8.2.013-1
mingw-w64-x86_64-sqlite3-3.47.2-1 mingw-w64-x86_64-tcl-8.6.13-1
mingw-w64-x86_64-termcap-1.3.1-7 mingw-w64-x86_64-tk-8.6.13-1
mingw-w64-x86_64-tzdata-2025a-1 mingw-w64-x86_64-windows-default-manifest-6.4-4
mingw-w64-x86_64-xxhash-0.8.3-1 mingw-w64-x86_64-xz-5.6.4-1
mingw-w64-x86_64-zlib-1.3.1-1 mingw-w64-x86_64-zstd-1.5.6-2 patch-2.7.6-3
texinfo-7.1.1-1 texinfo-tex-7.1.1-1 base-devel-2024.11-1
mingw-w64-x86_64-binutils-2.44-1 mingw-w64-x86_64-crt-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-gcc-14.2.0-2 mingw-w64-x86_64-gdb-16.2-1
mingw-w64-x86_64-gdb-multiarch-16.2-1
mingw-w64-x86_64-headers-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-libmangle-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-libwinpthread-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-make-4.4.1-3 mingw-w64-x86_64-pkgconf-1~2.3.0-1
mingw-w64-x86_64-tools-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-winpthreads-git-12.0.0.r487.g9e8f2a7b5-1
mingw-w64-x86_64-winstorecompat-git-12.0.0.r487.g9e8f2a7b5-1
Total Download Size: 127.22 MiB
Total Installed Size: 922.04 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
mingw-w64-x86_64-headers-g... 6.3 MiB 2.34 MiB/s 00:03 [###############################] 100%
mingw-w64-x86_64-openssl-3... 7.5 MiB 2.71 MiB/s 00:03 [###############################] 100%
mingw-w64-x86_64-python-3.... 23.2 MiB 4.77 MiB/s 00:05 [###############################] 100%
mingw-w64-x86_64-binutils-... 6.0 MiB 1970 KiB/s 00:03 [###############################] 100%
mingw-w64-x86_64-crt-git-1... 4.5 MiB 3.79 MiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-gdb-16.2-... 3.9 MiB 5.56 MiB/s 00:01 [###############################] 100%
binutils-2.44-1-x86_64 5.6 MiB 1355 KiB/s 00:04 [###############################] 100%
mingw-w64-x86_64-tcl-8.6.1... 2.7 MiB 2.82 MiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-tk-8.6.13... 2029.2 KiB 3.22 MiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-ncurses-6... 1747.4 KiB 2.62 MiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-sqlite3-3... 2.2 MiB 1712 KiB/s 00:01 [###############################] 100%
texinfo-7.1.1-1-x86_64 1431.4 KiB 2.84 MiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-gcc-libs-... 1023.6 KiB 1851 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-isl-0.27-... 1456.4 KiB 1243 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-gdb-multi... 6.4 MiB 718 KiB/s 00:09 [###############################] 100%
bison-3.8.2-5-x86_64 777.2 KiB 1224 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-libiconv-... 726.4 KiB 1640 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-mpfr-4.2.... 535.8 KiB 1353 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-zstd-1.5.... 635.9 KiB 1180 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-gmp-6.3.0... 577.8 KiB 984 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-xz-5.6.4-... 467.6 KiB 1400 KiB/s 00:00 [###############################] 100%
make-4.4.1-2-x86_64 507.6 KiB 682 KiB/s 00:01 [###############################] 100%
dos2unix-7.5.2-1-x86_64 446.5 KiB 802 KiB/s 00:01 [###############################] 100%
mingw-w64-x86_64-readline-... 411.7 KiB 733 KiB/s 00:01 [###############################] 100%
diffutils-3.10-1-x86_64 379.8 KiB 795 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-tools-git... 316.6 KiB 499 KiB/s 00:01 [###############################] 100%
flex-2.6.4-4-x86_64 303.5 KiB 1008 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-gettext-r... 314.3 KiB 796 KiB/s 00:00 [###############################] 100%
m4-1.4.19-2-x86_64 238.1 KiB 937 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-tzdata-20... 196.7 KiB 800 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-expat-2.6... 164.1 KiB 636 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-make-4.4.... 138.5 KiB 590 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-mpdecimal... 150.8 KiB 338 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-mpc-1.3.1... 128.7 KiB 319 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-zlib-1.3.... 104.4 KiB 408 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-xxhash-0.... 119.2 KiB 315 KiB/s 00:00 [###############################] 100%
patch-2.7.6-3-x86_64 96.1 KiB 389 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-pkgconf-1... 85.7 KiB 340 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-bzip2-1.0... 90.9 KiB 303 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-libtre-0.... 79.5 KiB 225 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-libffi-3.... 42.6 KiB 174 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-winpthrea... 40.1 KiB 169 KiB/s 00:00 [###############################] 100%
diffstat-1.67-1-x86_64 29.1 KiB 113 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-libwinpth... 28.7 KiB 115 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-termcap-1... 27.3 KiB 85.0 KiB/s 00:00 [###############################] 100%
texinfo-tex-7.1.1-1-x86_64 25.4 KiB 105 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-winstorec... 24.9 KiB 104 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-libmangle... 22.1 KiB 97.0 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-libsystre... 9.6 KiB 39.3 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-windows-d... 3.1 KiB 13.3 KiB/s 00:00 [###############################] 100%
base-devel-2024.11-1-any 1875.0 B 8.21 KiB/s 00:00 [###############################] 100%
mingw-w64-x86_64-gcc-14.2.... 43.5 MiB 1275 KiB/s 00:35 [###############################] 100%
Total (52/52) 127.2 MiB 3.63 MiB/s 00:35 [###############################] 100%
(52/52) checking keys in keyring [###############################] 100%
(52/52) checking package integrity [###############################] 100%
(52/52) loading package files [###############################] 100%
(52/52) checking for file conflicts [###############################] 100%
(52/52) checking available disk space [###############################] 100%
:: Processing package changes...
( 1/52) installing binutils [###############################] 100%
( 2/52) installing m4 [###############################] 100%
( 3/52) installing bison [###############################] 100%
( 4/52) installing diffstat [###############################] 100%
( 5/52) installing diffutils [###############################] 100%
( 6/52) installing dos2unix [###############################] 100%
( 7/52) installing flex [###############################] 100%
( 8/52) installing texinfo [###############################] 100%
( 9/52) installing texinfo-tex [###############################] 100%
(10/52) installing make [###############################] 100%
(11/52) installing patch [###############################] 100%
Optional dependencies for patch
ed: for patch -e functionality
(12/52) installing base-devel [###############################] 100%
(13/52) installing mingw-w64-x86_64-libwinpthread-git [###############################] 100%
(14/52) installing mingw-w64-x86_64-gcc-libs [###############################] 100%
(15/52) installing mingw-w64-x86_64-libiconv [###############################] 100%
(16/52) installing mingw-w64-x86_64-gettext-runtime [###############################] 100%
(17/52) installing mingw-w64-x86_64-zlib [###############################] 100%
(18/52) installing mingw-w64-x86_64-zstd [###############################] 100%
(19/52) installing mingw-w64-x86_64-binutils [###############################] 100%
(20/52) installing mingw-w64-x86_64-headers-git [###############################] 100%
(21/52) installing mingw-w64-x86_64-crt-git [###############################] 100%
(22/52) installing mingw-w64-x86_64-gmp [###############################] 100%
(23/52) installing mingw-w64-x86_64-isl [###############################] 100%
(24/52) installing mingw-w64-x86_64-mpfr [###############################] 100%
(25/52) installing mingw-w64-x86_64-mpc [###############################] 100%
(26/52) installing mingw-w64-x86_64-windows-default-manifest [###############################] 100%
(27/52) installing mingw-w64-x86_64-winpthreads-git [###############################] 100%
(28/52) installing mingw-w64-x86_64-gcc [###############################] 100%
(29/52) installing mingw-w64-x86_64-expat [###############################] 100%
(30/52) installing mingw-w64-x86_64-libtre [###############################] 100%
(31/52) installing mingw-w64-x86_64-libsystre [###############################] 100%
(32/52) installing mingw-w64-x86_64-ncurses [###############################] 100%
(33/52) installing mingw-w64-x86_64-bzip2 [###############################] 100%
(34/52) installing mingw-w64-x86_64-libffi [###############################] 100%
(35/52) installing mingw-w64-x86_64-mpdecimal [###############################] 100%
(36/52) installing mingw-w64-x86_64-openssl [###############################] 100%
Optional dependencies for mingw-w64-x86_64-openssl
mingw-w64-x86_64-ca-certificates
(37/52) installing mingw-w64-x86_64-termcap [###############################] 100%
(38/52) installing mingw-w64-x86_64-readline [###############################] 100%
(39/52) installing mingw-w64-x86_64-sqlite3 [###############################] 100%
Optional dependencies for mingw-w64-x86_64-sqlite3
mingw-w64-x86_64-tcl: for sqlite3_analyzer [pending]
(40/52) installing mingw-w64-x86_64-tcl [###############################] 100%
(41/52) installing mingw-w64-x86_64-tk [###############################] 100%
(42/52) installing mingw-w64-x86_64-xz [###############################] 100%
(43/52) installing mingw-w64-x86_64-tzdata [###############################] 100%
(44/52) installing mingw-w64-x86_64-python [###############################] 100%
(45/52) installing mingw-w64-x86_64-xxhash [###############################] 100%
(46/52) installing mingw-w64-x86_64-gdb [###############################] 100%
Optional dependencies for mingw-w64-x86_64-gdb
mingw-w64-x86_64-python-pygments: for syntax highlighting
(47/52) installing mingw-w64-x86_64-gdb-multiarch [###############################] 100%
Optional dependencies for mingw-w64-x86_64-gdb-multiarch
mingw-w64-x86_64-python-pygments: for syntax highlighting
(48/52) installing mingw-w64-x86_64-libmangle-git [###############################] 100%
(49/52) installing mingw-w64-x86_64-make [###############################] 100%
(50/52) installing mingw-w64-x86_64-pkgconf [###############################] 100%
(51/52) installing mingw-w64-x86_64-tools-git [###############################] 100%
(52/52) installing mingw-w64-x86_64-winstorecompat-git [###############################] 100%
:: Running post-transaction hooks...
(1/1) Updating the info directory file...
Whereas the above in version 12.2 installed gfortran
, it did not do so in version 14.2.
Therefore, also run the following:
$ pacman -S mingw-w64-x86_64-gcc-fortran
resolving dependencies...
looking for conflicting packages...
Packages (2) mingw-w64-x86_64-gcc-libgfortran-14.2.0-2 mingw-w64-x86_64-gcc-fortran-14.2.0-2
Total Download Size: 13.64 MiB
Total Installed Size: 46.85 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
mingw-w64-x86_64-gcc-libgfortran-14.2.0-2-any 910.3 KiB 449 KiB/s 00:02 [###############################################] 100%
mingw-w64-x86_64-gcc-fortran-14.2.0-2-any 12.8 MiB 5.19 MiB/s 00:02 [###############################################] 100%
Total (2/2) 13.6 MiB 5.41 MiB/s 00:03 [###############################################] 100%
(2/2) checking keys in keyring [###############################################] 100%
(2/2) checking package integrity [###############################################] 100%
(2/2) loading package files [###############################################] 100%
(2/2) checking for file conflicts [###############################################] 100%
(2/2) checking available disk space [###############################################] 100%
:: Processing package changes...
(1/2) installing mingw-w64-x86_64-gcc-libgfortran [###############################################] 100%
(2/2) installing mingw-w64-x86_64-gcc-fortran [###############################################] 100%
Use the Start menu MSYS2 / MSYS2 MINGW64 to open a new terminal window for 64-bit compilers. This may be necessary because there may have been changes to the environment necessary to use the compilers. The default prompt indicates that the environment is for MINGW64, as shown in the following figure.
MinGW 64-bit Terminal Window (see full-size image)
The environment is now configured, including the PATH
.
The compiler versions can be confirmed, as follows.
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gfortran --version
GNU Fortran (Rev2, Built by MSYS2 project) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The home folder is /home/user
within the MinGW environment
and user files are separate from normal Windows users files.
Similar to Git Bash, the user's Windows files can be accessed using path /C/Users/user
.
Modify files in /home/user
to impact only the MinGW environment.
A useful utility is cygpath
.
For example, use the following to print the Windows equivalent folder for MinGW folder:
$ cygpath -w /home/steve
C:\msys64\home\steve
Install Useful MinGW Software
It may be useful to install additional software, for example vim
text editor and git
version control software.
$ pacman -S vim
$ pacman -S git
Similar to other Linux distributions, software is distributed in packages and can
be installed with pacman -S package-name
.
See the MSYS2 Packages page for a list of available packages
(the search tool does not seem to match substrings and does not match some known packages such as used in the instructions above).
The following are useful packages.
Optional Software Packages to Install
MSYS2 Package | Description |
---|---|
git |
Git version control. If Git is installed, it should be configured consistent with Git for Windows (Git Bash), and other Git utilities that may be used with CDSS development. Because the /home/user folder for MSys2 MinGW is different from other similar installations, it is necessary to set the Git configuration for the user. It will also be necessary to configure other user environment settings that a developer may be accustomed to. |
vim |
Vim editor - optionally configure with .vimrc . |
Additional MinGW Environment Configuration for Developer
Software developers often configure their user environment to increase efficiency. This will be necessary for a new computer setup. See the following:
Install Cygwin
This section can be completed if necessary.
Cygwin can be useful in cases where software is not available in Git Bash or Windows.
The Cygwin environment is similar to Linux and should work if gfortran
is installed.