Fix build with GCC 15, CMake 4.x, and Boost 1.89#217
Open
filliformes wants to merge 12 commits into
Open
Conversation
GCC 15 with Boost 1.89 requires C++17 for std::conditional_t used in boost/lockfree/spsc_queue.hpp. C++11 doesn't define std::conditional_t, and GCC 15's -Wtemplate-body catches this at template parse time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GCC 15 treats implicit function declarations as errors by default. - pmlinux.c: add forward declaration for find_default_device() - finddefault.c: add forward declaration for pm_find_default_device() and missing #include <ctype.h> for isspace() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GCC 15 with C++17 no longer implicitly includes <cstdint> through other standard headers. The Faust-generated DSP headers use intptr_t and uint32_t in ScopedNoDenormals but don't include <cstdint>. Added the include after the first #include <cmath> in each file. Affects 111 auto-generated headers across an/, dyn/, env/, flt/, fx/, lfo/, misc/, noise/, osc/, pieces/, spat/, and synth/ directories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With Boost 1.89 and C++17, boost::hash_value<T> becomes ambiguous
between std::complex<T> and std::optional<T> overloads when T is
a pointer type. Use boost::hash<T>{} functor instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GCC 15's -Wtemplate-body detects member name mismatch in move constructor and assignment operator. The member is named freeSlots_ but was referenced as freeSlots (missing trailing underscore). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
M_PI is not guaranteed by the C++ standard. With C++17 strict mode, it may not be available without _USE_MATH_DEFINES. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GCC 15's -Wtemplate-body requires std::generate_n to be declared at template parse time, not just at instantiation time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- class-wrapper/CMakeLists.txt: split SOVERSION/VERSION into separate set_property calls to avoid Makefile generator producing invalid target names with semicolons - hw/CMakeLists.txt: guard RPi GPIO externals behind WITH_RUST_HW since they depend on hw_rust.hpp from the Rust hw crate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The RPi hardware setup functions were declared and called unconditionally in mod_hw.cpp, causing undefined symbol errors when building without the Rust hw module. Guard both declarations and calls behind #ifdef WITH_RUST_HW, and propagate the compile definition from CMake. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mod_net.cpp unconditionally included net_rust.hpp and called ceammc_net_logger_init(), causing build failures when all Rust net features (MQTT, Telegram, HTTP, Freesound, WebSocket) are disabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mod_proto.cpp unconditionally included proto_rust.hpp and called ceammc_proto_log_init() and setup_proto_obs_client(), causing build failures when WITH_OBS is disabled (no proto_rust library available). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
base_bitmap depends on core_rust (uses ceammc_core_async_bitmap from core_rust.hpp). When WITH_RUST_CORE is OFF, the core_rust library is not built, causing link failures. Guard the bitmap sources, include paths, and setup call behind WITH_RUST_CORE. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
uliss
approved these changes
Mar 18, 2026
uliss
reviewed
Mar 18, 2026
Owner
There was a problem hiding this comment.
this is auto generated file, so changes should be made not here, but in faust_arch_ceammc.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes compilation with modern toolchains (GCC 15.2, CMake 4.2, Boost 1.89) on rolling-release Linux distributions like Arch/CachyOS. The upstream code currently fails to build on these systems due to several compatibility issues.
Problems and Fixes
1. C++17 required for Boost 1.89 lockfree headers
Problem:
boost/lockfree/spsc_queue.hppusesstd::conditional_twhich is C++14+. GCC 15's new-Wtemplate-bodydiagnostic catches this at template parse time, causing hard errors even with C++11.Fix: Upgrade
CMAKE_CXX_STANDARDfrom 11 to 17.2. Implicit function declarations in portmidi (GCC 15)
Problem: GCC 15 treats implicit function declarations as errors (
-Wimplicit-function-declaration).pmlinux.ccallsfind_default_device()andfinddefault.ccallspm_find_default_device()without declarations.Fix: Add forward declarations and missing
#include <ctype.h>.3. Missing
#include <cstdint>in 111+ Faust-generated headersProblem: With C++17,
intptr_tanduint32_tare no longer implicitly available through other standard headers. All Faust-generated DSP headers use these types inScopedNoDenormalsbut only include<cmath>,<cstdio>, etc.Fix: Add
#include <cstdint>after the first#include <cmath>in each affected header.4. Ambiguous
boost::hash_valuewith Boost 1.89 + C++17Problem: In
base_clone.cpp,boost::hash_value<t_symbol*>()becomes ambiguous betweenstd::complex<T>andstd::optional<T>overloads (both available in C++17).Fix: Use
boost::hash<T>{}()functor instead.5. MemoryPool typo exposed by GCC 15
Problem:
MemoryPool.tccreferencesmemoryPool.freeSlotsbut the member is namedfreeSlots_. GCC 15's-Wtemplate-bodycatches this latent bug.Fix: Correct to
freeSlots_.6. Missing
M_PIdefinitionProblem:
ui_canvas_cairo.cppusesM_PIwhich is not guaranteed by the C++ standard in strict mode.Fix: Add
#define _USE_MATH_DEFINESand#include <cmath>.7. Missing
#include <algorithm>in noniusProblem:
execution_plan.h++usesstd::generate_nwithout including<algorithm>. GCC 15's template body checking requires it at parse time.Fix: Add the missing include.
8. CMake 4.x Makefile generator issues
Problem:
set_property(TARGET ... PROPERTY SOVERSION 1 VERSION "1.0.0")produces Makefile targets with semicolons, which breaks GNU Make. RPi GPIO externals are unconditionally compiled but depend onhw_rust.Fix: Split into separate
set_propertycalls; guard RPi externals behindWITH_RUST_HW.Build Configuration
Tested on CachyOS (Arch-based) x86_64 with:
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DFAUST_INCLUDE_DIR=/usr/include -DFAUST_LIBRARY=/usr/lib/libfaust.so-DWITH_VEROVIO=OFF -DWITH_RUST_HW=OFF -DWITH_GAMEPAD=OFF -DWITH_PRINTER=OFFTest plan
pdbinary runsceammc.pd_linuxexternal built (124MB)make install🤖 Generated with Claude Code