Bug 2430586

Summary: MinGW CMake toolchain circumvents ccache
Product: [Fedora] Fedora Reporter: Pierre Ossman <ossman>
Component: mingw-filesystemAssignee: Kalev Lember <kalevlember>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 42CC: kalevlember, manisandro, marcandre.lureau, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mingw-filesystem-151-1.fc42 mingw-filesystem-151-1.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-31 17:11:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pierre Ossman 2026-01-17 13:50:56 UTC
Description of problem:
Building a CMake project using MinGW is slow on Fedora because ccache isn't used.

Version-Release number of selected component (if applicable):
mingw64-filesystem-150-1.fc42.noarch

How reproducible:
100%


Steps to Reproduce:
1. cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake
2. make -C build
3. GOTO 1

Actual results:
Second run takes the same time as the first.

Expected results:
Second run is blindingly fast.

Additional info:
The issue is that the toolchain file gives absolute paths to the tools, preventing the ccache $PATH magic from working.

Comment 1 Pierre Ossman 2026-01-17 13:51:53 UTC
Given the way the toolchain is constructed, it's possible to work around the issue by manually specifying the environment variable CC and CXX:

> CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ cmake ...

Comment 2 Fedora Update System 2026-01-22 10:27:27 UTC
FEDORA-2026-3e7a97700c (mingw-filesystem-151-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-3e7a97700c

Comment 3 Fedora Update System 2026-01-22 10:27:28 UTC
FEDORA-2026-790fdbf049 (mingw-filesystem-151-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-790fdbf049

Comment 4 Fedora Update System 2026-01-23 01:30:33 UTC
FEDORA-2026-3e7a97700c has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-3e7a97700c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-3e7a97700c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2026-01-23 01:49:33 UTC
FEDORA-2026-790fdbf049 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-790fdbf049`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-790fdbf049

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2026-01-31 17:11:46 UTC
FEDORA-2026-3e7a97700c (mingw-filesystem-151-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2026-01-31 17:28:33 UTC
FEDORA-2026-790fdbf049 (mingw-filesystem-151-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.