Why does ppx_base 0.17 not support windows installation while 0.16 does?

I was toying around with the new opam’s windows support and tried to use to it to install core. Core depends on ppx_base. But opam kept wanting to install 0.16.x and would then fail at compiling it. (I think it fails because of changes to the GC API between 4.x and 5.x.)

When I tried to force it to use the latest version 0.17.1, it told me:

 Missing dependency:
    - ppx_base >= v0.17
    unmet availability conditions: 'arch != "arm32" & arch != "x86_32" & os != "win32"'

Does anyone know why 0.17 doesn’t support windows when 0.16 did (or at least claimed to)? Is this something that will eventually be fixed now that opam has official windows support?

More generally, given that opam 2.2.0 has only been out for a day, is there any benefit to reporting installation failures? E.g. out of the box ocaml-top doesn’t install b/c of something related to pkg-config that I didn’t bother looking into.

My assumption is that this type of thing doesn’t need to be reported because it would show up in automated tests. Am I right? Or is there someone out there who actually benefits if I keep track of this information while experimenting?

Can I suggest that (possibly) you can find out by fetching the source archive and trying to build/install it by hand?

1 Like

I’ve just opened Fix available for ppx_base by hhugo · Pull Request #26186 · ocaml/opam-repository · GitHub to restore the support.

1 Like

I very much should have checked the github before posting here. That was my mistake. “This is a bug” would have been a better starting assumption than “there’s probably a good reason for this, I wonder what it could be?”

Your suggestion to try building it to see what fails is good in principle. But I think you overestimate my general knowledge of and ability with Windows.

I have not seriously programmed for a Windows environment since the 90s. I have not used Cygwin since about 2005. I have never used PowerShell beyond copy-pasting some trusted scripts.

As a result, unlike with a Linux or BSD system, I don’t have a good mental model for anything that is actually going on beyond some loose, grossly incorrect, analogy to how it would work on a unix system.

I took it for granted that the build would fail somehow, but I doubted I’d understand why. And, after reading the github, I’m confident that I wouldn’t have figured it out without going way deeper into the weeds than my casual exploration was intended to go.

There was a symbol conflict that only causes problems on Windows because of a lack of support for weak linking. Apparently, differences in how linking and loading work on Windows mean that weak linking would be contrary to the design of the operating system, hence it isn’t supported.

Obviously, if I want to do serious work with OCaml on Windows, I’ll have to actually learn about Windows itself.

But for right now, I’m just trying to see how well things work out of the box and get a sense of how much of a knowledge shortfall I actually have when it comes to supporting or using Windows.

1 Like