Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build failures and v0.149.0 release status #8645

Closed
mroch opened this issue Apr 18, 2021 · 3 comments
Closed

Windows build failures and v0.149.0 release status #8645

mroch opened this issue Apr 18, 2021 · 3 comments

Comments

@mroch
Copy link
Contributor

mroch commented Apr 18, 2021

The master branch and the v0.149.0 release currently fail to build on Windows, which is holding up the release of [email protected].

We believe this is due to the way OCaml dynlink works under cygwin, which finally decided to bite us in binutils 2.36+ (ocaml/flexdll#50, cc @dra27).

We use dynlink for ppx_deriving plugins, which now fail with errors like this:

Error: Cannot load ppx_deriving.eq: error loading shared library:
       Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"flexdll error:
       cannot relocate RELOC_REL32, target is too far: 00000000db79cc02 
       ffffffffdb79cc02\")")

I'm working to downgrade our CI back to binutils 2.35 temporarily to unblock the release. We'll package all our ppx's into one static binary to avoid dynlink longer term.

@dra27
Copy link

dra27 commented Apr 18, 2021

This is (almost) correct - we'd also spotted it too and the fix is in ocaml/ocaml#10351 (it'll be in 4.12.1/4.13.0).

The part that is not correct is that this has nothing to do with Cygwin, although as it happens Cygwin already behaved the same way. The issue is that binutils 2.36 intentionally starts placing image base addresses at 4GiB+ for x86_64 which is therefore picked up by x86_64-w64-mingw32-ld and it appears to putting DLLs and EXEs more than 2GiB apart (it's not clear if that's intentional - on 64-bit Cygwin, that is intentionally done).

@dra27
Copy link

dra27 commented Apr 18, 2021

There is a dirtier patch needed to flexlink to allow older versions of OCaml to continue working, but I haven't written it yet...

@mroch
Copy link
Contributor Author

mroch commented Apr 18, 2021

Update: #8646 downgrades our Circle builds to binutils 2.35. the Windows artifact attached to the 0.149.0 release and included in [email protected] was generated by CircleCI from that PR.

facebook-github-bot pushed a commit that referenced this issue Apr 20, 2021
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

Pulled By: mroch

fbshipit-source-id: 9f7461af0147daa44be7ca967c12d3a098f93f04
facebook-github-bot pushed a commit that referenced this issue Apr 20, 2021
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
noppa pushed a commit to noppa/flow that referenced this issue May 10, 2021
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 facebook#8645

Pull Request resolved: facebook#8644

Reviewed By: samwgoldman

Differential Revision: D27843998

Pulled By: mroch

fbshipit-source-id: 9f7461af0147daa44be7ca967c12d3a098f93f04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants