I’m trying to install tsdl
on windows, without success (tests are failing to run).
I’m using : ocaml-variants.4.12.0+mingw64c
switch.
Anybody here having success with this, before I enter in the details of my convoluted attempts?
I’m trying to install tsdl
on windows, without success (tests are failing to run).
I’m using : ocaml-variants.4.12.0+mingw64c
switch.
Anybody here having success with this, before I enter in the details of my convoluted attempts?
cc @dbuenzli
tests are failing to run
that seems a bit weird. Are you using opam install -t
or --with-test
?
I did opam source tsdl
.
And tried (from memory): ocaml pkg/pkg.ml build --tests true
.
But before detailing all the other tries I performed, I’d like to know if anybody has it working?
If people were in the habit in saying what exactly doesn’t work, it would be quite helpful and less time consuming. Has the art of bug reporting been lost ?
OK. Fair enough.
My side question was just to assure that tsdl
is supposed to work with ocaml-variants.4.12.0+mingw64c
, precisely to avoid a long description of what I tried so far, and others to lose there time…
From your comment, I can only suppose that it is supposed to work.
I’ll revert all my attempts and will start again from the beginning, describing what I’m doing, then.
Best regards.
I know nothing about this ming64c
variant, so I can only suppose that it supposed to work :–)
In any case make sure you have the required sdl (i.e. at least 2.0.9), there has been this odd bug report from people who didn’t have the right SDL version.
Hi, did you finally succeed? I don’t have access to a Windows machine, but recently tried to use github action for my projects, see GitHub - ocaml/setup-ocaml: GitHub Action for the OCaml programming language
and I have this error for Windows only:
Processing 7/40: [conf-sdl2: pkg-config sdl2] [dune: ocaml bootstrap.ml]
[ERROR] The compilation of conf-sdl2 failed at "D:\\a\\snoke\\snoke\\_opam\\bin\\pkg-config.exe sdl2".
+ D:\a\snoke\snoke\_opam\bin\pkg-config.exe "sdl2" (CWD=D:/a/snoke/snoke/_opam/.opam-switch/build/conf-sdl2.1)
In other words it already fails at the stage of installing conf-sdl2
, which I suppose is responsible for installing the SDL library. But I don’t know how to have more logs to see what happens.
It won’t install it, it will just check if the SDL library is installed by invoking pkg-config sdl2
(see your error).
So you’ll first need to find a way to 1) install the SDL library and 2) make sure it’s recognized by your pkg-config.
I see, so the issue must be earlier in the CI process. I checked to mac-os logs, and at some point they detect that the SDL library is required, and they install it. (I thought this was the role of the conf-sdl2
package, so from what you are saying I suppose it comes from another tool). For some reason this step doesn’t work on their Windows host.
if fact the conf-sdl2
file does contain information for automatically installing the library, opam-repository/packages/conf-sdl2/conf-sdl2.1/opam at master · ocaml/opam-repository · GitHub
but not for Windows, which I suppose is one ingredient of the problem.
Ah maybe nowadays depexts automatically get installed. It used to be a separate step.
But yes indeed there are no depexts for windows. I’m not sure which package manager is assumed to install stuff on windows you should look into other packages with depexts, if there 's something sensitive. E.g. blas
seems to do it via cygwin
.
ouch, it almost worked indeed with
depexts: [
["SDL2"] {os = "win32" & os-distribution = "cygwinports"}
]
unfortunately the SDL2 version in cygwin is too old (2.0.7)
If you’re not using newer stuff (most new versions of tsdl
just add more bindings) maybe you can try with an older version of tsdl
, for example this version. Ideally, which SDL version is required by each version of tsdl
should be tracked more precisely.
Yes, maybe I will try this, but it requires some modification of my code.
(and apparently it is not compatible with ocaml 5). If I have some success, I will report here. Thanks again!