Skip to content

Commit 6c7ac19

Browse files
committed
Fix building the agent-windows-vs2019 image
The current version of Python fails to build some dependencies, but pinning the previous version works. ActivePerl is no longer installable via Chocolatey (neither current nor older versions) as ActiveState don't provide the downloads without registration any longer (and even if registered, only provide the latest, continuously updated version for free users, which can't match the package manager checksums), see http://disq.us/p/2ipditb for further discussion. Replace ActivePerl with StrawberryPerl. StrawberryPerl has other drawbacks, as it installs a whole C/C++ toolchain as part of it, and copies of pkg-config tools that can cause package misdetections. Remove these after installing it, see StrawberryPerl/Perl-Dist-Strawberry#11 for discussion on the inconveniences of installing it.
1 parent bd2fd47 commit 6c7ac19

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

containers/agent-windows-vs2019/Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,24 @@ RUN powershell -NoProfile -InputFormat None -Command `
4040

4141
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
4242
# and a few more that were not documented...
43-
RUN choco install -y ninja git python3
44-
RUN choco install -y activeperl --version 5.24.3.2404001
43+
RUN choco install -y ninja git
44+
# Pin an older version of Python; the current Python 3.10 fails when
45+
# doing "pip install" for the other dependencies, as it fails to find libxml
46+
# while compiling some package.
47+
RUN choco install -y python3 --version 3.9.7
48+
49+
# ActivePerl is currently not installable via Chocolatey, see
50+
# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
51+
# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
52+
# toolchain, and a copy of pkg-config which can cause misdetections for other
53+
# built products, see
54+
# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
55+
# details. Remove the redundant and unnecessary parts of the StrawberryPerl
56+
# install.
57+
RUN choco install -y strawberryperl && `
58+
rmdir /q /s c:\strawberry\c && `
59+
del /q c:\strawberry\perl\bin\pkg-config*
60+
4561
# libcxx requires clang(-cl) to be available
4662
RUN choco install -y sccache llvm
4763
RUN pip install psutil

0 commit comments

Comments
 (0)