Where is the mingw cross-compiler?

I have been using the Mingw32 cross compiler in Linux for creating Windows executables for many years, but lately it doesn’t seem to be in any of the usual RPM style repositories.

yum search mingw

doesn’t turn anything up, nor does dnf. There is a page:

https://fedoraproject.org/wiki/MinGW

that seems to offer the software, but no link and no name is given. I don’t need the most recent version - something from 2008 would be fine. 32 or 64 bit is fine. gcc or LLVM are fine. Any compiler that will run in Centos and produce Windows exe files from standard f77 is fine. I would like to avoid a virtual machine or container, though.

I did find a version for FreeBSD in the the ports collection, and I was able to build that from source, and it does work. But I am still looking for a Linux version as the rest of the project is mostly Linux based.

Daniel Feenberg
NBER

1 Like

I have no experience with MinGW, nor Fedora. On the other hand – since mingw doesn’t show up in Debian’s package manager synaptic either – typing just mingw in Debian’s package tracker points to multiple entries, including binutils-mingw-w64 with a time stamp of 2021-11-02 for Debian’s branch testing (12/bookworm) (more details here eventually lead to download a .deb package).

Like there is benefit to complement Windows by a WSL or a .true. Linux installation, the cohabitation of two (or more) different Linuxes on one machine requires some rules but then equally works fine. Possibly equally here.

You can try to search in https://repology.org/ for the MinGW cross toolchain, Fedora is for sure included in the repology database. Note that the naming of the cross-compiler is probably very inconsistent across distributions.

The string “mingw” is used in the names of two separate projects. One is Windows compiler forked from gcc, another is a cross compiler for Linux or Freebsd that compiles to Windows executables, also forked from gcc. As far as I can tell, everything in Repology is either the Windows compiler, or it’s libraries, none are for the cross-compiler. I can’t be sure of that, since none of the packages listed have any sort of descriptive label. “binutils” is identified on the gcc site as a collection of routines other than the compiler itself. There are a couple of links to packages call “mingw-gcc-*” which would be where the compiler should be, but they are very small - a few hundred lines, so they can’t be a cross-compiler.

It is a pity that a significant development effort for something so potentially valuable seems so hard to find. It is out there somewhere.

For Arch Linux there is Arch Linux - mingw-w64-gcc 12.1.0-1 (x86_64), which is the actual cross-compiler.

Searching repology for mingw in the Fedora repositories returns its C runtime: Overview - rpms/mingw-crt - src.fedoraproject.org. By analogy one could guess that there is probably a compiler as well: Overview - rpms/mingw-gcc - src.fedoraproject.org.

Since it doesn’t show up in the repo, it might have been dropped from the Fedora distribution. You can always reach out to the Fedora project and volunteer as new maintainer for the MinGW cross-compiler, checkout Fedora Packaging Guidelines :: Fedora Docs for more details on how to get involved with the Fedora project (I haven’t packaged for Fedora yet, but I know at least one Fedora package maintainer).