# conan problems on windows build

**URL:** <https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675>\
**Category:** Compiling Audacity\
**Created:** [December 19, 2021, 5:59pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675 "2021-12-19T17:59:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roadsterUK](https://forum.audacityteam.org/user_avatar/forum.audacityteam.org/roadsteruk/32/37115_2.png) [@roadsterUK](https://forum.audacityteam.org/u/roadsterUK)\
**Post date:** [December 19, 2021, 5:59pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/1 "2021-12-19T17:59:04Z")

</div>

I’ve just hit a few snags using the build instructions related to out of date conan references and SSL certificates. In a nutshell I had to:-

use **pip** to uninstall and then reinstall conan to get the latest version  
use **conan remote** to remove and then add both conancenter and conan-center both of these pointing to  
[https://center.conan.io](https://center.conan.io) rather than previous targets.

After this all was plain sailing ( but slow!)

---

<div class="post-metadata">

**Author:** ![mike1504](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/m/82dd89/32.png) [@mike1504](https://forum.audacityteam.org/u/mike1504)\
**Post date:** [January 8, 2022, 2:58am UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/2 "2022-01-08T02:58:46Z")

</div>

I seem to be having this or a similar problem. Tried to do the suggested solutions, but I’m still getting errors. Perhaps not the same, or perhaps I didn’t know how to solve the problems. Any help would be appreciated. Here is the cmake output:  
  
ERROR: wxwidgets/3.1.3.2-audacity: Error in source() method, line 168  
os.rename(extracted\_dir, self.\_source\_subfolder)  
PermissionError: [WinError 5] Access is denied: ‘wxWidgets-3.1.3.1-audacity’ → ‘source\_subfolder’  
  
  
CMake Error at cmake-proxies/cmake-modules/conan.cmake:638 (message):  
Conan install failed=‘1’  
Call Stack (most recent call first):  
cmake-proxies/cmake-modules/AudacityDependencies.cmake:255 (conan\_cmake\_install)  
cmake-proxies/cmake-modules/AudacityDependencies.cmake:274 (\_conan\_install)  
CMakeLists.txt:554 (resolve\_conan\_dependencies)  
  
Thanks

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [January 8, 2022, 1:53pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/3 "2022-01-08T13:53:17Z")

</div>

> [@](#):
>
> I seem to be having this or a similar problem.

Have you tried uninstalling Conan and then installing the latest version of Conan?

---

<div class="post-metadata">

**Author:** ![werame5913](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/w/dbc845/32.png) [@werame5913](https://forum.audacityteam.org/u/werame5913)\
**Post date:** [January 15, 2022, 11:46am UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/4 "2022-01-15T11:46:39Z")

</div>

FWTW, I have similar conan errors on Windows:

```plaintext
ERROR: expat/2.2.9@audacity/stable: Error in source() method, line 36
        os.rename(extracted_dir, self._source_subfolder)
        PermissionError: [WinError 5] Access is denied: 'expat-2.2.9' -> 'source_subfolder'
CMake Error at cmake-proxies/cmake-modules/conan.cmake:638 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  cmake-proxies/cmake-modules/AudacityDependencies.cmake:255 (conan_cmake_install)
  cmake-proxies/cmake-modules/AudacityDependencies.cmake:274 (_conan_install)
  CMakeLists.txt:554 (resolve_conan_dependencies)

-- Configuring incomplete, errors occurred!
See also "M:/gh/aud-build/CMakeFiles/CMakeOutput.log".
See also "M:/gh/aud-build/CMakeFiles/CMakeError.log".

```

Never used conan before, so I don’t know how to debug them. Also, FWTW, this is what got installed through pip

```plaintext
>conan --version
Conan version 1.44.0

```

Apparently conan suffers from race conditions on Windows that even its devs don’t know how to debug [https://github.com/conan-io/conan/issues/5205](https://github.com/conan-io/conan/issues/5205)

Ok, maybe they did manage to fix it in the end, [https://github.com/conan-io/conan/pull/8915](https://github.com/conan-io/conan/pull/8915)  
but apparently they’ve created a new api for that: tools.rename instead of os.rename.  
Whatever Audacity is using (directly or indirectly) is apparently still using the old,  
race-prone API os.rename. [https://github.com/conan-io/hooks/pull/294](https://github.com/conan-io/hooks/pull/294)

---

<div class="post-metadata">

**Author:** ![jademan](https://forum.audacityteam.org/user_avatar/forum.audacityteam.org/jademan/32/39309_2.png) [@jademan](https://forum.audacityteam.org/u/jademan)\
**Post date:** [January 15, 2022, 12:14pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/5 "2022-01-15T12:14:51Z")

</div>

See this post: [https://forum.audacityteam.org/t/visual-studio-2019-16-8-3-has-a-bug-open-cmake-unknown-error/60836/1](https://forum.audacityteam.org/t/visual-studio-2019-16-8-3-has-a-bug-open-cmake-unknown-error/60836/1)

---

<div class="post-metadata">

**Author:** ![werame5913](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/w/dbc845/32.png) [@werame5913](https://forum.audacityteam.org/u/werame5913)\
**Post date:** [January 15, 2022, 12:43pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/6 "2022-01-15T12:43:31Z")

</div>

Filed here [https://github.com/audacity/audacity/issues/2430](https://github.com/audacity/audacity/issues/2430)

Disabling the anti-virus or adding an exception for C:\Users\<YourUserName\>.conan is a temporary workaround. It’s usually the AV that causes rename races, but not the only source, the Windows search indexer can also cause these etc. There’s a special trick to avoid these races, IIRC, which robocopy is using. (I don’t remember the details, but it’s probably discussed in [https://youtu.be/uhRWMGBjlO8?t=506](https://youtu.be/uhRWMGBjlO8?t=506))

I’m like 75% sure the problem is that some other process (like the AV) opens a file in that tree without FILE\_SHARE\_DELETE. [https://youtu.be/uhRWMGBjlO8?t=818](https://youtu.be/uhRWMGBjlO8?t=818) Since conan downloads large zip packages with binaries in them, the AV will take a while to finish scanning them, and os.rename will fail in the meantime. Worth noting that I’m not building on the C: drive, which makes some tricks like moving files to %TEMP% fail, because they are non-atomic if you build on a different drive.

Although the cmake managed to build a whole lot after that (I turned off the AV), it still failed for me gain with a different kind of error… 😢

```plaintext
wxwidgets/3.1.3.2-audacity: WARN: Build folder C:\Users\WR\.conan\data\wxwidgets\3.1.3.2-audacity\_\_\build\137b263629b603e3e9a720b48b59cebe945627db
ERROR: wxwidgets/3.1.3.2-audacity: Error in build() method, line 260
        cmake.build()
        ConanException: Error 1 while executing cmake --build C:\Users\WR\.conan\data\wxwidgets\3.1.3.2-audacity\_\_\build\137b263629b603e3e9a720b48b59cebe945627db\build_subfolder --config Debug -- /m:4 /verbosity:minimal
        CMake Error at cmake-proxies/cmake-modules/conan.cmake:638 (message):
  Conan install failed='1'

```

This one is different in nature from the os.rename one, looks like some kind of permission problem. I guess I’ll take the invitation to discord for this.

Well, I found the root cause of that myself [https://github.com/audacity/audacity/issues/2431](https://github.com/audacity/audacity/issues/2431) Basically you have to use the x86\_64 cross-compiler for now, using the native x64 compiler will fail to compile libmp3lame, at least, and possibly other parts.

---

<div class="post-metadata">

**Author:** ![mike1504](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/m/82dd89/32.png) [@mike1504](https://forum.audacityteam.org/u/mike1504)\
**Post date:** [January 26, 2022, 3:11pm UTC](https://forum.audacityteam.org/t/conan-problems-on-windows-build/63675/7 "2022-01-26T15:11:05Z")

</div>

> [@](#):
>
> > [@](#):
> >
> > I seem to be having this or a similar problem.
> 
> Have you tried uninstalling Conan and then installing the latest version of Conan?

Several times. along with python and all the build tools. It stops at the same place every time.  
  
  
wxwidgets/3.1.3.1-audacity:  
Configuring sources in C:\Users\Mike.conan\data\wxwidgets\3.1.3.1-audacity\_\_\source  
  
  
  
ERROR: wxwidgets/3.1.3.1-audacity: Error in source() method, line 164  
os.rename(extracted\_dir, self.\_source\_subfolder)  
PermissionError: [WinError 5] Access is denied: ‘wxWidgets-3.1.3.1-audacity’ → ‘source\_subfolder’

CMake Error at cmake-proxies/cmake-modules/conan.cmake:631 (message):  
Conan install failed=‘1’  
Call Stack (most recent call first):  
cmake-proxies/cmake-modules/AudacityDependencies.cmake:255 (conan\_cmake\_install)  
cmake-proxies/cmake-modules/AudacityDependencies.cmake:274 (\_conan\_install)  
CMakeLists.txt:541 (resolve\_conan\_dependencies)
