NAlec
November 9, 2024, 8:58pm
1
Hi,
I am trying to install various web packages, all relying more or less on ssl, whose compilation fails on windows :
#=== ERROR while compiling ssl.0.7.0 ==========================================#
# context 2.2.1 | win32/x86_64 | ocaml.5.2.0 | https://opam.ocaml.org#8582dee8ae9e16724d00de6220a5f0d2080647aa
# path ~\AppData\Local\opam\default\.opam-switch\build\ssl.0.7.0
# command ~\AppData\Local\opam\default\bin\dune.exe build -p ssl -j 3 @install
# exit-code 1
# env-file ~\AppData\Local\opam\log\ssl-33452-756d51.env
# output-file ~\AppData\Local\opam\log\ssl-33452-756d51.out
### output ###
# ssl_stubs.c:1321:3: warning: implicit declaration of function âASN1_TIME_to_tmâ; did you mean âASN1_TIME_setâ? [-Wimplicit-function-declaration]
# [...]
# | ^~~~~~~~~~~~~~~
# | ASN1_TIME_set
# ssl_stubs.c:1321:19: warning: implicit declaration of function âX509_get0_notBeforeâ; did you mean âX509_get_notBeforeâ? [-Wimplicit-function-declaration]
# 1321 | ASN1_TIME_to_tm(X509_get0_notBefore(cert), &t);
# | ^~~~~~~~~~~~~~~~~~~
# | X509_get_notBefore
# ssl_stubs.c: In function âocaml_ssl_get_expiration_dateâ:
# ssl_stubs.c:1333:19: warning: implicit declaration of function âX509_get0_notAfterâ; did you mean âX509_get_notAfterâ? [-Wimplicit-function-declaration]
# 1333 | ASN1_TIME_to_tm(X509_get0_notAfter(cert), &t);
# | ^~~~~~~~~~~~~~~~~~
# | X509_get_notAfter
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> đ«
ââ The following actions failed
â λ build ssl 0.7.0
ââ
It looks like this issue has already be reported here , and there . Latest investigation being here .
Is there a workaround meanwhile ?
You could try to install the tls
package, which some packages like Cohttp support as alternate backend and given it is written in OCaml does not need OpenSSL.
NAlec
November 15, 2024, 8:49pm
3
Thank you for the hint. I tried but it failed with the same error.
dra27
November 17, 2024, 8:23pm
4
Are you trying to do this in CI or locally? The trick is to install the test package for version 1.1.1w manually in the Cygwin installation being used by your opam root. I donât recommend doing this routinely, but one can manually install packages by running Cygwin setup and pointing the root at %APPDATA%\Local\opam.cygwin\root
If itâs in CI, setup-ocaml has been updated with a mitigation for this issue.
NAlec
November 18, 2024, 7:48pm
5
I use it locally, on a windows box with the latest install. Although I have seen cygwin flying by during the install, I have no idea where the setup is sitting in your âkind a sandboxâ setupâŠI donât even know if it is call setup.exe or cygwin.exe. Help appreciated.
dra27
November 21, 2024, 9:47pm
6
If you look in %LOCALAPPDATA%\opam\.cygwin
there should be a setup-x86_64.exe
program. You can run that and when it asks for the âRoot Directoryâ, but the full path to %LOCALAPPDATA%\opam\.cygwin\root
(%LOCALAPPDATA%
will be something like C:\Users\you\AppData\Local
). From the âSelect Packagesâ dialog, you should be able to see the installed version of mingw64-x86_64-openssl (which is probably 1.0.2u+za-1) and you can then select 1.1.1w-0.1 manually.
1 Like
jaycle
November 27, 2024, 11:44pm
8
I canât seem to progress past this, though Iâm happy to have found a recent thread on it.
I did âInstall from internetâ
Use root directory as explained above
Next until I arrive at select package list. I checked source and updated the dropdown to âReinstallâ
I still get the same build failure at ssl 0.7.0
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> đ«
⏠retrieved dream.1.0.0~alpha7 (cached)
⏠retrieved dream-httpaf.1.0.0~alpha3 (cached)
⏠retrieved lwt_ssl.1.2.0 (cached)
⏠retrieved ssl.0.7.0 (cached)
[ERROR] The compilation of ssl.0.7.0 failed at "dune build -p ssl -j 27 @install".
#=== ERROR while compiling ssl.0.7.0 ==========================================#
# context 2.3.0 | win32/x86_64 | ocaml.5.2.1 | https://opam.ocaml.org#727427c1e71db673d70869c8df4d678bf322632b
# path ~\AppData\Local\opam\default\.opam-switch\build\ssl.0.7.0
# command ~\AppData\Local\opam\default\bin\dune.exe build -p ssl -j 27 @install
# exit-code 1
# env-file ~\AppData\Local\opam\log\ssl-170016-8ac70e.env
# output-file ~\AppData\Local\opam\log\ssl-170016-8ac70e.out
### output ###
# ssl_stubs.c:1321:3: warning: implicit declaration of function 'ASN1_TIME_to_tm'; did you mean 'ASN1_TIME_set'? [-Wimplicit-function-declaration]
# [...]
# | ^~~~~~~~~~~~~~~
# | ASN1_TIME_set
# ssl_stubs.c:1321:19: warning: implicit declaration of function 'X509_get0_notBefore'; did you mean 'X509_get_notBefore'? [-Wimplicit-function-declaration]
# 1321 | ASN1_TIME_to_tm(X509_get0_notBefore(cert), &t);
# | ^~~~~~~~~~~~~~~~~~~
# | X509_get_notBefore
# ssl_stubs.c: In function 'ocaml_ssl_get_expiration_date':
# ssl_stubs.c:1333:19: warning: implicit declaration of function 'X509_get0_notAfter'; did you mean 'X509_get_notAfter'? [-Wimplicit-function-declaration]
# 1333 | ASN1_TIME_to_tm(X509_get0_notAfter(cert), &t);
# | ^~~~~~~~~~~~~~~~~~
# | X509_get_notAfter
Thanks in advance for any help and guidance.
EDIT: I was picking the wrong ssl. The selection needed was for x64 (obvious in hindsight).
The dropdown showed 1.1.1w-0.1 before.
This is resolved for me now. Many thanks!