Can't build Audacity on Windows 10

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
vexoxa8642
Posts: 4
Joined: Thu Oct 22, 2020 4:31 pm
Operating System: Windows 10

Can't build Audacity on Windows 10

Post by vexoxa8642 » Thu Oct 22, 2020 4:38 pm

Visual Studio 2019 and Windows 10. Compiling Audacity used to be a breeze, but this new system with CMake is impossible.

I've compiled WxWidgets no problem. I run CMake with no errors. But when I try to build Audacity from the generated Audacity.sln using "Release - Win32" Visual Studio craps out:

Code: Select all

========== Build: 3 succeeded, 3 failed, 21 up-to-date, 3 skipped ==========
The errors listed by Visual Studio:

Code: Select all

Error	MSB6006	"cmd.exe" exited with code 3.
Error	C1083	Cannot open include file: 'RevisionIdent.h': No such file or directory
Error	LNK1181	cannot open input file '..\..\src\Release\Audacity.lib
No binaries are built.

vexoxa8642
Posts: 4
Joined: Thu Oct 22, 2020 4:31 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by vexoxa8642 » Thu Oct 22, 2020 4:51 pm

Commenting out the link to RevisionIndent.h in AboutDialog.cpp fixed two errors, but the one about cmd exiting with an error remains. More detail:

Code: Select all

16>Generating ../bin/Release/Languages/af/audacity.mo
16>The system cannot find the path specified.
16>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: "cmd.exe" exited with code 3.
16>Done building project "locale.vcxproj" -- FAILED.

vexoxa8642
Posts: 4
Joined: Thu Oct 22, 2020 4:31 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by vexoxa8642 » Thu Oct 22, 2020 7:07 pm

SO I nuked everything and started again to carefully document each step.

Here are the steps and the results:

1. Clone WxWidgets with no errors

Code: Select all

git clone --recurse-submodules https://github.com/audacity/wxWidgets/
2. Open wxWidgets\build\msw\wx_vc16.sln and build ReleaseDLL - Win32 with no errors.

3. Clone Audacity 2.4.2 with no errors

Code: Select all

git clone --branch Audacity-2.4.2 https://github.com/audacity/audacity/
4. Open CMake and set proper directories and click "Configure" and "Generate"

Code: Select all

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
The C compiler identification is MSVC 19.24.28316.0
The CXX compiler identification is MSVC 19.24.28316.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x86/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x86/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
The ASM_NASM compiler identification is NASM
Found assembler: C:/Program Files/nasm/nasm.exe
Build Info:
  Host System: Windows-10.0.19041
  Host System Name: Windows
  Host System Processor: AMD64
  Host System Version: 10.0.19041

  Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x86/cl.exe
  Compiler Version: 19.24.28316.0
  Compiler Standard: 14
  Compiler Standard Required: ON
  Compiler Extensions: 

  MSVC Version: 1924
  MSVC Toolset: 142

  Current Commit: unknown

Looking for pow in m
Looking for pow in m - not found
Looking for __atomic_fetch_add_4 in atomic
Looking for __atomic_fetch_add_4 in atomic - not found
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Searching 16 bit integer - Using unsigned short
Check if the system is big endian - little endian
Building for 32-bit target
Looking for 4 include files float.h, ..., string.h
Looking for 4 include files float.h, ..., string.h - found
Looking for assert.h
Looking for assert.h - found
Looking for errno.h
Looking for errno.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for fenv.h
Looking for fenv.h - found
Looking for inttypes.h
Looking for inttypes.h - found
Looking for limits.h
Looking for limits.h - found
Looking for malloc.h
Looking for malloc.h - found
Looking for byteswap.h
Looking for byteswap.h - not found
Looking for memory.h
Looking for memory.h - found
Looking for stdbool.h
Looking for stdbool.h - found
Looking for stdlib.h
Looking for stdlib.h - found
Looking for string.h
Looking for string.h - found
Looking for strings.h
Looking for strings.h - not found
Looking for unistd.h
Looking for unistd.h - not found
Looking for xmmintrin.h
Looking for xmmintrin.h - found
Looking for sys/param.h
Looking for sys/param.h - not found
Looking for sys/stat.h
Looking for sys/stat.h - found
Looking for sys/wait.h
Looking for sys/wait.h - not found
Looking for bcopy
Looking for bcopy - not found
Looking for fileno
Looking for fileno - found
Looking for flock
Looking for flock - not found
Looking for fork
Looking for fork - not found
Looking for fsync
Looking for fsync - not found
Looking for ftruncate
Looking for ftruncate - not found
Looking for getpagesize
Looking for getpagesize - not found
Looking for gettimeofday
Looking for gettimeofday - not found
Looking for gmtime
Looking for gmtime - found
Looking for gmtime_r
Looking for gmtime_r - not found
Looking for lrint
Looking for lrint - found
Looking for lrintf
Looking for lrintf - found
Looking for lround
Looking for lround - found
Looking for lstat
Looking for lstat - not found
Looking for memcpy
Looking for memcpy - found
Looking for memmove
Looking for memmove - found
Looking for mlock
Looking for mlock - not found
Looking for pipe
Looking for pipe - not found
Looking for posix_fadvise
Looking for posix_fadvise - not found
Looking for posix_memalign
Looking for posix_memalign - not found
Looking for strchr
Looking for strchr - found
Looking for waitpid
Looking for waitpid - not found
Check size of int8_t
Check size of int8_t - done
Check size of int16_t
Check size of int16_t - done
Check size of uint16_t
Check size of uint16_t - done
Check size of u_int16_t
Check size of u_int16_t - failed
Check size of int32_t
Check size of int32_t - done
Check size of uint32_t
Check size of uint32_t - done
Check size of u_int32_t
Check size of u_int32_t - failed
Check size of int64_t
Check size of int64_t - done
Check size of short
Check size of short - done
Check size of unsigned short
Check size of unsigned short - done
Check size of int
Check size of int - done
Check size of unsigned int
Check size of unsigned int - done
Check size of long
Check size of long - done
Check size of unsigned long
Check size of unsigned long - done
Check size of long long
Check size of long long - done
Check size of unsigned long long
Check size of unsigned long long - done
Check size of float
Check size of float - done
Check size of double
Check size of double - done
Check size of long double
Check size of long double - done
Check size of loff_t
Check size of loff_t - failed
Check size of off_t
Check size of off_t - done
Check size of off64_t
Check size of off64_t - failed
Check size of size_t
Check size of size_t - done
Check size of wchar_t
Check size of wchar_t - done
Check size of void*
Check size of void* - done
Building for 32-bit target
Found Python3: C:/python/python.exe (found version "3.9.0") found components: Interpreter 
========== Configuring wxwidgets ==========
Found wxWidgets: C:/wxWidgets/lib/vc_dll/wxmsw31u_adv.lib;C:/wxWidgets/lib/vc_dll/wxbase31u.lib;C:/wxWidgets/lib/vc_dll/wxmsw31u_core.lib;C:/wxWidgets/lib/vc_dll/wxmsw31u_html.lib;C:/wxWidgets/lib/vc_dll/wxbase31u_net.lib;C:/wxWidgets/lib/vc_dll/wxmsw31u_qa.lib;C:/wxWidgets/lib/vc_dll/wxpng.lib;C:/wxWidgets/lib/vc_dll/wxtiff.lib;C:/wxWidgets/lib/vc_dll/wxjpeg.lib;C:/wxWidgets/lib/vc_dll/wxzlib.lib;C:/wxWidgets/lib/vc_dll/wxregexu.lib;C:/wxWidgets/lib/vc_dll/wxexpat.lib;winmm;comctl32;uuid;oleacc;uxtheme;rpcrt4;shlwapi;version;wsock32 (found version "3.1.3") found components: adv base core html net qa png tiff jpeg zlib regex expat 
Using 'wxwidgets' system library
========== Configuring expat ==========
Using 'expat' local library
========== Configuring lame ==========
Using 'lame' local library
========== Configuring sndfile ==========
Using 'sndfile' local library
Check size of SSIZE_T
Check size of SSIZE_T - done
Check size of int64_t
Check size of int64_t - done
Looking for S_IRGRP
Looking for S_IRGRP - not found
========== Configuring soxr ==========
Using 'soxr' local library
Trying SIMD32 C flags:  
Performing Test DETECT_SIMD32_C_FLAGS
Performing Test DETECT_SIMD32_C_FLAGS - Success
Found SIMD32:    
========== Configuring portaudio ==========
Using 'portaudio' local library
CMake Warning (dev) at C:/cmake-3.19.0-rc1-win64-x64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message):
  The package name passed to `find_package_handle_standard_args` (jack) does
  not match the name of the calling package (Jack).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  lib-src/portaudio-v19/cmake_support/FindJack.cmake:34 (find_package_handle_standard_args)
  cmake-proxies/portaudio-v19/CMakeLists.txt:84 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find jack (missing: JACK_LIBRARY JACK_INCLUDE_DIR) 
========== Configuring ffmpeg ==========
Will dynamically load 'ffmpeg' library at runtime
Using 'ffmpeg' local includes
========== Configuring id3tag ==========
Using 'id3tag' local library
========== Configuring mad ==========
Using 'mad' local library
========== Configuring nyquist ==========
Using 'nyquist' local library
========== Configuring vamp ==========
Using 'vamp' local library
========== Configuring ogg ==========
Using 'ogg' local library
========== Configuring vorbis ==========
Using 'vorbis' local library
========== Configuring flac ==========
Using 'flac' local library
========== Configuring lv2 ==========
Using 'lv2' local library
========== Configuring midi ==========
Using 'midi' local library
========== Configuring portmixer ==========
Using 'portmixer' local library
========== Configuring portsmf ==========
Using 'portsmf' local library
========== Configuring sbsms ==========
Using 'sbsms' local library
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
========== Configuring soundtouch ==========
Using 'soundtouch' local library
========== Configuring twolame ==========
Using 'twolame' local library
========== Configuring manual ==========
========== Configuring images ==========
========== Configuring locale ==========
========== Configuring mod-null ==========
========== Configuring mod-nyq-bench ==========
========== Configuring mod-script-pipe ==========
========== Configuring nyquist ==========
========== Configuring plug-ins ==========
========== Configuring Audacity ==========
Using precompiled headers
========== Configuring minsrc ==========
Configuring done
Generating done
4. Open Audacity.sln and build Release Win32. No binaries built.

Code: Select all

Error	E1696	cannot open source file "RevisionIdent.h"
Error	C1083	Cannot open include file: 'RevisionIdent.h': No such file or directory
Error	LNK1181	cannot open input file '..\..\lib\audacity\Release\Audacity.lib'
Error	LNK1181	cannot open input file '..\..\lib\audacity\Release\Audacity.lib'
Error	LNK1181	cannot open input file '..\..\lib\audacity\Release\Audacity.lib'
5. Edit AboutDialog.cpp and comment out line 66, clean solution and try again. Everything blows up.

Code: Select all

Error	LNK2019	unresolved external symbol "private: static class wxString __cdecl TranslatableString::DoSubstitute(class std::function<class wxString __cdecl(class wxString const &,enum TranslatableString::Request)> const &,class wxString const &,bool)" ([email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@@[email protected]@@[email protected][email protected]) referenced in function "public: __thiscall FileDialogWrapper::FileDialogWrapper(class wxWindow *,class TranslatableString const &,class wxString const &,class wxString const &,class std::vector<struct FileNames::FileType,class std::allocator<struct FileNames::FileType> > const &,long,class wxPoint const &,class wxSize const &,class TranslatableString const &)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected])
Error	LNK2019	unresolved external symbol "protected: __thiscall MessageBoxException::MessageBoxException(class TranslatableString const &)" ([email protected]@[email protected]@@@Z) referenced in function "public: __thiscall FileException::FileException(enum FileException::Cause,class wxFileName const &,class TranslatableString const &,class wxFileName const &)" ([email protected]@[email protected]@[email protected]@@[email protected]@[email protected])
Error	LNK2019	unresolved external symbol "protected: virtual __thiscall MessageBoxException::~MessageBoxException(void)" ([email protected]@[email protected]) referenced in function [email protected]@[email protected]@@Z$0
Error	LNK2019	unresolved external symbol "protected: __thiscall MessageBoxException::MessageBoxException(class MessageBoxException const &)" ([email protected]@[email protected]@@Z) referenced in function "public: __thiscall FileException::FileException(class FileException const &)" ([email protected]@[email protected]@@Z)
Error	LNK2019	unresolved external symbol "void __cdecl wxTabTraversalWrapperCharHook(class wxKeyEvent &)" ([email protected]@[email protected]@@Z) referenced in function "public: __thiscall FileDialogWrapper::FileDialogWrapper(class wxWindow *,class TranslatableString const &,class wxString const &,class wxString const &,class std::vector<struct FileNames::FileType,class std::allocator<struct FileNames::FileType> > const &,long,class wxPoint const &,class wxSize const &,class TranslatableString const &)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected])
Error	LNK2019	unresolved external symbol "class wxString __cdecl FileNames::FormatWildcard(class std::vector<struct FileNames::FileType,class std::allocator<struct FileNames::FileType> > const &)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@@Z) referenced in function "public: __thiscall FileDialogWrapper::FileDialogWrapper(class wxWindow *,class TranslatableString const &,class wxString const &,class wxString const &,class std::vector<struct FileNames::FileType,class std::allocator<struct FileNames::FileType> > const &,long,class wxPoint const &,class wxSize const &,class TranslatableString const &)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected])
Error	LNK2019	unresolved external symbol "public: virtual __thiscall Registry::BaseItem::~BaseItem(void)" ([email protected]@@[email protected]) referenced in function "public: virtual void * __thiscall Registry::BaseItem::`scalar deleting destructor'(unsigned int)" ([email protected]@@[email protected])
Error	LNK2019	unresolved external symbol "public: virtual __thiscall Registry::GroupItem::~GroupItem(void)" ([email protected]@@[email protected]) referenced in function [email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@Z$5
The error list is much longer.

So that's where I'm at. Where am I going wrong?

rafadess
Posts: 21
Joined: Wed Apr 15, 2020 6:28 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by rafadess » Wed Oct 28, 2020 3:13 pm

Hi,

Are you using python 2.7? I had a issue when building Audacity and it was because I was using python3.

Also make sure on your path you have it pointing to python 2.7 path, if you have both versions installed on your machine.

Hope it helps you,

Rafa

roadsterUK
Posts: 188
Joined: Sat Apr 15, 2017 8:00 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by roadsterUK » Sun Nov 01, 2020 9:56 am

I confess that these kinds of problems have caused me to give up on the latest version. Its a classic mistake to change something that is tried and tested, properly documented, working well, and giving quick results. I shall be sticking with version 2.4.1 which is the last that I managed to build with mostly old methodology. Having said that I only need to get asio input working for my regular use. The volunteers who maintain Audacity have the right to take it in any direction they choose so I'm not complaining provided it doesn't become commercialized.

The build.txt file in the 2.4.1 release source is not helpful but the version from previous releases can still be used for reference although it is probably better to go back to compile.txt in version 2.2 to avoid the use of cmake/python. In my experience the patches for wxwidgets (3.1.3) are not necessary in any of the more recent Audacity versions but that may be because I only use basic Audacity functionality.

vexoxa8642
Posts: 4
Joined: Thu Oct 22, 2020 4:31 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by vexoxa8642 » Sun Nov 01, 2020 11:30 pm

rafadess wrote:
Wed Oct 28, 2020 3:13 pm
Hi,

Are you using python 2.7? I had a issue when building Audacity and it was because I was using python3.

Also make sure on your path you have it pointing to python 2.7 path, if you have both versions installed on your machine.

Hope it helps you,

Rafa
You can't use Python < 3 or you get the error:

Code: Select all

Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "C:/python/python.exe"

steve
Site Admin
Posts: 81858
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can't build Audacity on Windows 10

Post by steve » Mon Nov 02, 2020 9:01 am

vexoxa8642 wrote:
Sun Nov 01, 2020 11:30 pm
You can't use Python < 3 or you get the error:
Do you still get the error if you disable building the manual?

If you can, then you probably just need this small fix: https://github.com/audacity/audacity/co ... 104f340d99
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

stevelee
Posts: 4
Joined: Fri Mar 27, 2020 6:59 pm
Operating System: Windows 10

Re: Can't build Audacity on Windows 10

Post by stevelee » Sun Nov 22, 2020 12:59 pm

I just updated and tested my gist with instructions and a script - hope it helps

https://gist.github.com/SteveALee/da24c ... dd98eb5d0b

PS Do pass it on if it helps

Steve

Post Reply