Bug 2430586 - MinGW CMake toolchain circumvents ccache
Summary: MinGW CMake toolchain circumvents ccache
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw-filesystem
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-17 13:50 UTC by Pierre Ossman
Modified: 2026-01-31 17:28 UTC (History)
4 users (show)

Fixed In Version: mingw-filesystem-151-1.fc42 mingw-filesystem-151-1.fc43
Clone Of:
Environment:
Last Closed: 2026-01-31 17:11:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.