To Reproduce
Steps to reproduce the behavior:
Attempt to build with ninja 1.12.0 and a recent version of CMake (3.29.2, in this case).
Expected behavior
Successful build.
Screenshots
N/A
Desktop (please complete the following information):
OS: FreeBSD - all supported releases
Desktop: KDE
Additional context
Ninja 1.12.0 seems to be more sensitive to unused headers and, at the very least, not first setting them as a dependency, leads to a potential race condition during the build if ui_midifilter.h isn't generated before trying to compile confmport.cpp. I've verified that building muse-sequencer with CMake 3.29.2 + ninja 1.11.1 is successful, so it's not a CMake problem.
Describe the bug Build fails with ninja 1.12.0.
FAILED: muse/components/CMakeFiles/components.dir/confmport.cpp.o /usr/bin/c++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -Dcomponents_EXPORTS -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/components -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/components -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/. -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/evdata -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/memory -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/midi_controller -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/midnam -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/mpevent -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/plugin -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/string -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/sysex_helper -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/time_stretch -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/wave -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/libs/xml -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/function_dialogs -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/widgets -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/instruments -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/function_dialogs -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/widgets -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/instruments -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/ctrl -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/vestige -I/usr/local/include/opus -I/usr/local/include/lash-1.0 -I/usr/local/include/raptor2 -I/usr/local/include/rtaudio -I/usr/local/include/lilv-0 -I/usr/local/include/sratom-0 -I/usr/local/include/sord-0 -I/usr/local/include/serd-0 -I/usr/local/include/zix-0 -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/lv2Support -I/usr/local/include/libinstpatch-2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/arranger -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/cliplist -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/driver -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/liste -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/midiedit -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/mixer -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/mplugins -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/remote -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/waveedit -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/arranger -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/cliplist -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/driver -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/liste -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/midiedit -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/mixer -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/mplugins -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/remote -I/wrkdirs/usr/ports/audio/muse-sequencer/work/.build/muse/waveedit -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtUiTools -isystem /usr/local/include/qt5/QtXml -isystem /usr/local/include/qt5/QtSvg -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wextra -Winvalid-pch -fexceptions -Wall -fPIC -O2 -DNDEBUG -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -fomit-frame-pointer -ffast-math -fno-finite-math-only -std=c++17 -fPIC -I../ -I/wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/synti -fPIC -MD -MT muse/components/CMakeFiles/components.dir/confmport.cpp.o -MF muse/components/CMakeFiles/components.dir/confmport.cpp.o.d -o muse/components/CMakeFiles/components.dir/confmport.cpp.o -c /wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/components/confmport.cpp In file included from /wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/components/confmport.cpp:48: /wrkdirs/usr/ports/audio/muse-sequencer/work/muse-4.2.1/src/muse/mplugins/midifilterimpl.h:28:10: fatal error: 'ui_midifilter.h' file not found
include "ui_midifilter.h"
1 error generated. ninja: build stopped: subcommand failed.
To Reproduce Steps to reproduce the behavior: Attempt to build with ninja 1.12.0 and a recent version of CMake (3.29.2, in this case).
Expected behavior Successful build.
Screenshots N/A
Desktop (please complete the following information):
Additional context Ninja 1.12.0 seems to be more sensitive to unused headers and, at the very least, not first setting them as a dependency, leads to a potential race condition during the build if ui_midifilter.h isn't generated before trying to compile confmport.cpp. I've verified that building muse-sequencer with CMake 3.29.2 + ninja 1.11.1 is successful, so it's not a CMake problem.
Results of FreeBSD's exp-run of updating CMake to 3.29.2 and ninja to 1.12.0: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278693
Failure of muse-sequencer in particular: https://pkg-status.freebsd.org/beefy22/data/140amd64-default-foo/2024-05-03_19h29m37s/logs/errors/muse-sequencer-4.2.1_1.log
Project builds and runs successfully after removing the unused header "midifilterimpl.h" from src/muse/components/confmport.cpp.