Add Windows/MinGW build support for RADE and Opus#550
Merged
Conversation
Collaborator
|
Thanks for the thorough Windows build support — this is well done. The CMake-based Opus build path, the PatchOpusNnet.cmake to replace Merging. 73, Jeremy KK7GWY & Claude (AI dev partner) |
The RADE/Opus integration assumed a POSIX build environment (autotools, sys/types.h, libm). This adds Windows support via three changes: CMakeLists.txt: - Use /w (MSVC) or -w (GCC/MinGW) for RADE source warning suppression - Add IS_BUILDING_RADE_API=1 to main target compile definitions - Conditionally link libm only on non-Windows (MSVC provides math functions in the CRT) BuildOpus.cmake: - Add Windows-specific ExternalProject path that builds Opus via its native CMake build system instead of autotools (which requires MSYS2/Cygwin on Windows) - Handle both MSVC (opus.lib) and MinGW (libopus.a) library naming - Enable OPUS_DRED and OPUS_OSCE for neural codec features PatchOpusNnet.cmake (new): - Pure-CMake replacement for the Unix `patch` command used by the autotools build to apply RADE_EXPORT attributes to Opus dnn/nnet.h - Downloads and extracts Opus neural network model data (fargan, plc, lace weights) with fallback mirror URL - Works on all platforms without requiring patch(1) kiss_fft.h / rade_api.h: - Replace <sys/types.h> with <stddef.h> on Windows (sys/types.h is a POSIX header not available in MSVC) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1a7eae5 to
433de69
Compare
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
The RADE/Opus integration assumed a POSIX build environment (autotools,
<sys/types.h>,libm). This PR adds full Windows build support so AetherSDR can be compiled with MinGW or MSVC toolchains while retaining the existing Linux/macOS build path.Changes
CMakeLists.txt/w(MSVC) or-w(GCC/MinGW) for RADE source warning suppression — the previous hardcoded-wflag is not valid for MSVCIS_BUILDING_RADE_API=1to the main target's compile definitions (was only set on the RADE sources, causing missing symbol errors when the main target includes RADE headers)libmonly on non-Windows — MSVC provides math functions in the CRT; linking-lmon MSVC produces linker errorsthird_party/radae/cmake/BuildOpus.cmakeExternalProjectpath that builds Opus via its native CMake build system instead of autotools. The autotools path (./configure && make) requires MSYS2/Cygwin on Windows and fails under MinGW-w64opus.lib) and MinGW (libopus.a) library naming conventionsOPUS_DREDandOPUS_OSCEfor the neural codec features used by RADEthird_party/radae/cmake/PatchOpusNnet.cmake(new file)patchcommand used by the autotools build to applyRADE_EXPORTattributes to Opusdnn/nnet.hfargan_data.h,plc_data.h,lace_data.hetc.) with a fallback mirror URL — the autotools build does this viaautogen.sh, which doesn't run under the CMake pathpatch(1)third_party/radae/src/kiss_fft.h/rade_api.h#include <sys/types.h>with#include <stddef.h>on Windows —sys/types.his a POSIX header not available in the MSVC standard library.stddef.hprovides the neededsize_ttype portably.Test Plan
/wflag andopus.libnaming🤖 Generated with Claude Code