I’m having an issue with a cmake error while trying to compile Audacity 3.4.0 x64 in Windows with ASIO support. I’ve followed the instructions in the BUILD.md and in several other posts but it dies in the cmake with the following.
Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
The ASM_NASM compiler identification is unknown
Didn't find assembler
Build Info:
Host System: Windows-10.0.19045
Host System Name: Windows
Host System Processor: AMD64
Host System Version: 10.0.19045
Host System Architecture: 64-bit
Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
Compiler Version: 19.37.32825.0
Compiler Standard: 17
Compiler Standard Required: ON
Compiler Extensions:
MSVC Version: 1937
MSVC Toolset: 143
Current Commit: unknown
========== Using Conan version of ZLIB ==========
========== Using Conan version of EXPAT ==========
========== Using Conan version of PNG ==========
========== Using Conan version of JPEG ==========
========== Using Conan version of wxWidgets ==========
========== Using Conan version of libmp3lame ==========
========== Using Conan version of mpg123 ==========
========== Using Conan version of libid3tag ==========
========== Using Conan version of WavPack ==========
========== Using Conan version of Ogg ==========
========== Using Conan version of FLAC ==========
========== Using Conan version of Opus ==========
========== Using Conan version of opusfile ==========
========== Using Conan version of Vorbis ==========
========== Using Conan version of SndFile ==========
========== Using Conan version of PortAudio ==========
========== Using Conan version of RapidJSON ==========
========== Using Conan version of PortMidi ==========
========== Using Conan version of vst3sdk ==========
========== Using Conan version of Catch2 ==========
Traceback (most recent call last):
File "E:\Src\Audacity\conan\conan_runner.py", line 91, in <module>
conan_version = validate_conan(required_conan_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Src\Audacity\conan\helpers\conan_environment.py", line 141, in validate_conan
conan_version = get_conan_version()
^^^^^^^^^^^^^^^^^^^
File "E:\Src\Audacity\conan\helpers\conan_environment.py", line 90, in get_conan_version
version_string = subprocess.check_output([get_conan(), '--version']).decode('utf-8').strip()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\subprocess.py", line 992, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\subprocess.py", line 1348, in _get_handles
p2cread = _winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 6] The handle is invalid
CMake Error at cmake-proxies/cmake-modules/AudacityDependencies.cmake:209 (message):
Conan failed to install dependencies (1) C:/Program
Files/Python312/python.exe
Call Stack (most recent call first):
CMakeLists.txt:578 (include)
Configuring incomplete, errors occurred!
I’ve installed and reinstalled several different versions of conan with the same results.
TIA for any suggestions.
I checked there, one other user with the identical problem, no answers. I’ll just put the project on hold for a bit and wait to see if anyone posts a solution.
After trying a number of different things I believe the problem was that cmake-gui was not spawning conan for some reason.
I did the initial configure in cmake-gui and it error-ed out here…
version_string = subprocess.check_output([get_conan(), ‘–version’]).decode(‘utf-8’).strip()
which should have run conan --version but did not return a handle to the output.
The fix… Open a command prompt, do a “cd \src\audacity-build”, and do a “cmake .”
So step by step what worked for me as I had to repeat it a couple of times having downloaded Audacity 3.5.0-alpha the first time.
Do all the steps in the BUILDING.md - install all of the prerequisites. Python, cmake, visual studio, conan. I downloaded the ASIO dev kit but never did anything with it.
Git or download the right set of source code for Audacity.
With cmake-gui set up the compiler, source directory, build directory. Pick x64 because even though it says that it is the default it defaults to Program Files (x86) for a install target if you don’t.
Config - it errors, check box the ASIO support, generate - it errors again but will set all of the compile directives.
Close cmake-gui, open a CMD window, cd to the build directory, run cmake . (or cmake \path\to\build) and let it do its thing. conan will download of the requirements etc.
Open cmake-gui and do a generate again which should complete and enable the open Visual Studio button. Click, into Visual Studio, pick the release target, and build.
Hopefully this spares the next person a day of banging head against desk.