Skip to content

Commit

Permalink
[CircleCI] use binutils 2.35 on Windows
Browse files Browse the repository at this point in the history
Summary:
binutils 2.36 pokes a limitation in ocaml for windows that breaks dynlinking, which we use for our ppx plugins.

cygwin added 2.36 on 4/10, which is why this suddenly broke in 0.149 when the version bump busted our caches. this diff hackily downgrades back to binutils 2.35.

cygwin's CLI doesn't provide a way to install old packages, so I manually download the binaries and extract them on top of the cygwin directory. this would be a bad idea to do to a normal cygwin install, but since we're doing it in a CircleCI image, it doesn't matter that cygwin doesn't know the state of its packages.

ref #8645

Pull Request resolved: #8644

Reviewed By: samwgoldman

Differential Revision: D27843998 (740fc5d)

Pulled By: mroch

fbshipit-source-id: db3d3172a42305ace88f83dfa5f876ea23af5753
  • Loading branch information
mroch authored and facebook-github-bot committed Apr 20, 2021
1 parent 4f40f40 commit 7bf117b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ orbs:
- run:
name: Install dependencies
command: |
choco install --no-progress cygwin
choco install --no-progress cygwin cyg-get 7zip
setx /M PATH $($Env:PATH + ';C:\Program Files\7-Zip')
if (-not $?) { throw "Failed to install cygwin" }
choco install --no-progress rsync patch diffutils curl make zip unzip git m4 perl mingw64-x86_64-gcc-core mingw64-x86_64-gcc-g++ mingw-w64-x86_64-gcc-libs --source=cygwin
cyg-get rsync patch diffutils curl make zip unzip git m4 perl mingw64-x86_64-gcc-core mingw64-x86_64-gcc-g++ mingw-w64-x86_64-gcc-libs
if (-not $?) { throw "Failed to install deps from cygwin" }
$local_packages = "$Env:TEMP\flow\cygwin"
New-Item -ItemType Directory $local_packages
(New-Object System.Net.WebClient).DownloadFile("https://mirrors.kernel.org/sourceware/cygwin/x86_64/release/mingw64-x86_64-binutils/mingw64-x86_64-binutils-2.35.2-1.tar.xz", "$local_packages\mingw64-x86_64-binutils-2.35.2-1.tar.xz")
if (-not $?) { throw "Failed to download mingw64-x86_64-binutils-2.35.2-1" }
7z.exe x "$local_packages\mingw64-x86_64-binutils-2.35.2-1.tar.xz" -o"$local_packages" -y
7z.exe x "$local_packages\mingw64-x86_64-binutils-2.35.2-1.tar" -o"C:\tools\cygwin" -y
- run:
name: Install opam
command: |
Expand Down

0 comments on commit 7bf117b

Please sign in to comment.