werman / noise-suppression-for-voice

Noise suppression plugin based on Xiph's RNNoise
GNU General Public License v3.0
4.62k stars 225 forks source link

32 bit build on Windows #161

Open DanielO opened 1 year ago

DanielO commented 1 year ago

Hi, I'm trying to build a 32 bit VST version on Windows (because another plugin I want to use is 32 bit only) and I've not managed it yet.

I installed mingw x86_64-12.2.0-release-posix-seh-msvcrt-rt_v10-rev2.7z (plus cmake & ninja). I also had to copy windres to x86_64-w64-mingw32-windres.exe so it gets found.

I get the following error:

PS C:\temp\noise-suppression-for-voice-1.03\build> & cmake -Bbuild-mingw64 -GNinja -DCMAKE_TOOLCHAIN_FILE='toolchains/toolchain-mingw64.cmake' -DCMAKE_MAKE_PROGRAM='C:/temp/ninja.exe' -DCMAKE_BUILD_TYPE=Release ..
CMake Warning (dev) at CMakeLists.txt:1 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    CMAKE_PROJECT_VERSION
    CMAKE_PROJECT_VERSION_MAJOR
    CMAKE_PROJECT_VERSION_MINOR
    CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring juceaide
-- Building juceaide
CMake Error at external/JUCE/extras/Build/juceaide/CMakeLists.txt:101 (message):
  Failed to build juceaide

  [0/2] Re-checking globbed directories...

  [1/2] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.cpp.obj

  FAILED:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.cpp.obj

  C:\temp\mingw64_posix_msvcrt\bin\c++.exe -DDEBUG=1
  -DJUCE_DISABLE_JUCE_VERSION_PRINTING=1
  -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1
  -DJUCE_MODULE_AVAILABLE_juce_build_tools=1
  -DJUCE_MODULE_AVAILABLE_juce_core=1
  -DJUCE_MODULE_AVAILABLE_juce_data_structures=1
  -DJUCE_MODULE_AVAILABLE_juce_events=1
  -DJUCE_MODULE_AVAILABLE_juce_graphics=1
  -DJUCE_MODULE_AVAILABLE_juce_gui_basics=1 -DJUCE_STANDALONE_APPLICATION=1
  -DJUCE_USE_CURL=0 -D_CONSOLE=1 -D_DEBUG=1
  -IC:/temp/noise-suppression-for-voice-1.03/build/build-mingw64/external/JUCE/tools/extras/Build/juceaide/juceaide_artefacts/JuceLibraryCode
  -IC:/temp/noise-suppression-for-voice-1.03/external/JUCE/extras/Build
  -IC:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules
  -Wa,-mbig-obj -g -O0 -Wall -Wextra -Wpedantic -Wstrict-aliasing
  -Wuninitialized -Wunused-parameter -Wsign-compare -Wsign-conversion
  -Wunreachable-code -Wcast-align -Wno-implicit-fallthrough
  -Wno-maybe-uninitialized -Wno-ignored-qualifiers -Wswitch-enum
  -Wredundant-decls -Wno-strict-overflow -Wshadow -Woverloaded-virtual
  -Wreorder -Wzero-as-null-pointer-constant -MD -MT
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.cpp.obj
  -MF  extras\Build\juceaide\CMakeFiles\juceaide.dir\__\__\__\modules\juce_gui_basics\juce_gui_basics.cpp.obj.d
  -o
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.cpp.obj
  -c
  C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp

  In file included from
  C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:291:

  C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/native/accessibility/juce_win32_AccessibilityElement.h:29:
  warning: "UIA_FullDescriptionPropertyId" redefined

     29 | #define UIA_FullDescriptionPropertyId 30159
        |

  In file included from
  C:/temp/mingw64_posix_msvcrt/x86_64-w64-mingw32/include/UIAutomation.h:20,

                   from C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:70:

  C:/temp/mingw64_posix_msvcrt/x86_64-w64-mingw32/include/uiautomationclient.h:420:
  note: this is the location of the previous definition

    420 | #define UIA_FullDescriptionPropertyId (30159)
        |
...
  C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/native/accessibility/juce_win32_ComInterfaces.h:123:12:
  error: expected unqualified-id before numeric constant

    123 | const long UIA_InvokePatternId = 10000;
        |            ^~~~~~~~~~~~~~~~~~~

  C:/temp/noise-suppression-for-voice-1.03/external/JUCE/modules/juce_gui_basics/native/accessibility/juce_win32_ComInterfaces.h:123:12:
  error: expected ')' before numeric constant

    123 | const long UIA_InvokePatternId = 10000;
        |            ^~~~~~~~~~~~~~~~~~~
...

Is there a known working compiler that I can test against?

Thanks.

werman commented 1 year ago

The mingw is known not to be working. So you are left with MSVC:

cmake -B build-x32 -A Win32
cmake --build build-x32 --config Release --parallel
DanielO commented 1 year ago

Thanks.

I found if I installed Visual Studio with the "C++ Application" install ran the 'x86 Native Tools Command Prompt for VS 2022' command prompt I could then build with just 'cmake -GNinja ..'

Do you think it's worth updating the README with such a hint?