Building 3.4.2 windows with ASIO worked eventually!

I have just spent a long day trying to build from the latest released code and following the build.md instructions I had numerous problems which I won’t go in to. To summarize here are the exact instructions which actual worked using the cmake command line not the gui version.

git clone -b Audacity-3.4.2 --depth 1 https://github.com/audacity/audacity/ audacity3.4.2

cmake -G "Visual Studio 16 2019" -DCMAKE_CONFIGURATION_TYPES=Release -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -Daudacity_use_ffmpeg=off -S D:\audacity3-4-2 -B d:\audacity3-4

Two key points are that the most recent “master” code has a linker problem; and the default ffmpeg option in Cmake which is
audacity_use_ffmpeg=linked
causes the ffmpeg options to dissappear in preferences including the Library section. Then wav and flac files etc. are not recognised and won’t load.

The projects were then built using VS 16 2019

I’m sparing you the many other attempts which didn’t work!

1 Like

Awesome, thank you! Worked for me. I used the following cmake command line because I wanted a Debug version, and I’m running VS 2022:

cmake -G “Visual Studio 17 2022” -DCMAKE_CONFIGURATION_TYPES=Debug -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -Daudacity_use_ffmpeg=off -S audacity3.4.2 -B audacity3.4.2.debug

@roadsterUK, all

My first post, and following my first attempt(s) to build Audacity 3.4.2 on Windows 7 64-bit (primarily to get support for ASIO), so please bear with me!

I’ve tried both the cmake gui and essentially your same cmake command line, but in both cases I’m using “Visual Studio 15 2017” rather than “Visual Studio 16 2019”, and both fail.

It seems to die while installing dependencies from Python (I’m using v3.8.10), but upstream there are indications that it just doesn’t like the compiler it’s finding in the Visual Studio 2017 Community Edition.

I can supply the detailed messages from cmake, but I guess I’ll just get right to the point: is it simply not possible to build Audacity 3.4.2 in the Visual Studio 2017 environment?

Thanks for any info or guidance!

My first post says exactly how I got around issues ( not all of which I can recall now). Essentially I give the command line methodology for obtaining the latest released version of the source code and invoking cmake with an odd extra setting to make ffmpeg included by external reference.

Having done this Visual Studio 2016 opened the project file and built the release version successfully.

This got round any issues with trying to build an alpha or beta version. Also I should mention that I updated Python and conan as recommended in build.md before I tried anything else; and I removed any references to the old version of WXwidgets in command environment variables and as previously installed on hard drive.

I hope these hints help and don’t just confuse!

Having done this Visual Studio 2016 opened the project file and built the release version successfully.

The Visual Studio version nomenclature is annoyingly confusing. You actually built with Visual Studio 16 2019, whereas I’m trying to build with Visual Studio 15 2017, and it doesn’t seem to be working, hence my question.

CMake actually quits on me while sorting out Python dependencies, but upstream of that point it flat out balks at the VS 2017 compiler:

…\conan\helpers\profiles.py, line 48, in get_conan_compiler_version:
RuntimeError: Visual Studio (19, 16, 27048, 0) is not supported

but for some reason continues with the configuration work, at least for a while.

I’m running a pretty bare-bones version of VS 2017, so I was wondering if anyone else had possibly managed an Audacity 3.4.2 build with a more complete VS 2017 install.

I’ll try a minimal install of the VS 2019 C++ development package and see if I have any better luck.

@jsouza and @roadsterUK
Thanks for your posts. So I also tried, but the configuring stopped with errors. Maybe my cmake is too new (v. 4.0.1)?

"C:/Users/JohnDoe/.conan2/p/b/portad540cc900bfdb/b/src/portadio"
CMake Error at CMakeLists.txt:7 (CMAKE_MINIMUM_REQUIRED):

and

portaudio/19.7.0@audacity/stable: ERROR:
Package 'e91d1a54526ac0d9d3fac1dca9ef40c4496fc296' build failed
  • Do you have an idea what I could do?

A question about your instructions: is this the right way to set the environment in power shell before starting the cmake-command? (Path where my Steinberg-Files are located).
$env:ASIOSDK_DIR = "C:\Program Files\Steinberg\ASIO_SDK\asiosdk_2.3.3_2019-06-14"

PG64

I also tried to add options to your cmake command. Like

-D “CMAKE_POLICY_VERSION_MINIMUM=3.5”
or
-D"CMAKE_POLICY_VERSION_MINIMUM=3.5"
or
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
(Not sure about the syntax). The output recommended this, see below…

Here is a longer part of the messages I received :

...
portaudio/19.7.0@audacity/stable: Unzipping 5.6MB, this can take a while

portaudio/19.7.0@audacity/stable: CMakeToolchain generated: conan_toolchain.cmake
portaudio/19.7.0@audacity/stable: CMakeToolchain generated: C:\Users\JohnDoe\.conan2\p\b\portad540cc900bfdb\b\build\generators\CMakePresets.json
portaudio/19.7.0@audacity/stable: CMakeToolchain generated: C:\Users\JohnDoe\.conan2\p\b\portad540cc900bfdb\b\src\portadio\CMakeUserPresets.json
portaudio/19.7.0@audacity/stable: Generating aggregated env files
portaudio/19.7.0@audacity/stable: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
portaudio/19.7.0@audacity/stable: Calling build()
portaudio/19.7.0@audacity/stable: Running CMake.configure()
portaudio/19.7.0@audacity/stable: RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/JohnDoe/.conan2/p/b/portad540cc900bfdb/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:/Users/JohnDoe/.conan2/p/b/portad540cc900bfdb/b/src/portadio"
CMake Error at CMakeLists.txt:7 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

portaudio/19.7.0@audacity/stable: ERROR:
Package 'e91d1a54526ac0d9d3fac1dca9ef40c4496fc296' build failed
portaudio/19.7.0@audacity/stable: WARN: Build folder C:\Users\JohnDoe\.conan2\p\b\portad540cc900bfdb\b\build
ERROR: portaudio/19.7.0@audacity/stable: Error in build() method, line 120
        cmake.configure()
        ConanException: Error 1 while executing
Generating options profile...
Traceback (most recent call last):
  File "C:\Program Files\Audacity-ASIO_SDK\audacity-Audacity-3.4.2\conan\conan_runner.py", line 109, in <module>
    subprocess.check_call(conan_options)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\JohnDoe\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 419, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['conan.exe', 'install', 'C:\\Program Files\\Audacity-ASIO_SDK\\audacity-Audacity-3.4.2\\conan', '--build=missing', '--output-folder', 'C:/Program Files/Audacity-ASIO_SDK/Audacity-3.4.2-mybuild-cmake', '--remote', 'audacity-binaries-conan2', '--profile:build', 'C:\\Program Files\\Audacity-ASIO_SDK\\Audacity-3.4.2-mybuild-cmake\\conan\\profiles\\build.profile', '--profile:host', 'C:\\Program Files\\Audacity-ASIO_SDK\\Audacity-3.4.2-mybuild-cmake\\conan\\profiles\\host-debug.profile']' returned non-zero exit status 1.
CMake Error at cmake-proxies/cmake-modules/AudacityDependencies.cmake:209 (message):
  Conan failed to install dependencies (1)
  C:/Users/JohnDoe/AppData/Local/Programs/Python/Python313/python.exe
Call Stack (most recent call first):
  CMakeLists.txt:579 (include)


-- Configuring incomplete, errors occurred!

I executed this in my power shell:

cmake -DCMAKE_CONFIGURATION_TYPES=Release -Daudacity_has_asio_support=On -DAUDACITY_BUILD_LEVEL=2 -Daudacity_use_ffmpeg=off -S “C:\Program Files\Audacity-ASIO_SDK\audacity-Audacity-3.4.2” -B “C:\Program Files\Audacity-ASIO_SDK\Audacity-3.4.2-mybuild-cmake”

IMO, Muse should get a license and SELL an ASIO version, or sell a plug-in if that’s possible.

This is an old thread and I have since posted an update to Audacity 3.7 which is working for me.https://forum.audacityteam.org/t/cannot-get-viable-source-code-for-latest-3-7-release/130710