I’m trying to install Coq on Cygwin, so that I can later compile e.g. CompCert.
First, I tried just installing an opam switch on Cygwin, and then installing the coq package, but I got errors due to it not finding dllzarith.so, as the person in this topic.
I downloaded the 2023.03.0.zip, extracted it, and ran coq_platform_make_windows.bat on a Command Prompt. I chose “1” (install to a new, freshly-created C:\cygwin64_coq directory) and let it run. It installed several Cygwin packages, then kept running, until I got this:
============ Fix certificate database ============
total 2
lrwxrwxrwx 1 user Aucun 49 29 nov. 09:16 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx 1 user Aucun 55 29 nov. 09:16 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
total 848
-r--r--r-- 1 user Aucun 222779 29 nov. 09:18 ca-bundle.crt
-r--r--r-- 1 user Aucun 641160 29 nov. 09:18 ca-bundle.trust.crt
/usr/bin/ln: impossible de créer le lien symbolique '/etc/pki/ca-trust/extracted/pem/directory-hash/ca-certificates.crt': Permission denied
ERROR coq_platform_make_windows.bat failed
Did I do something wrong? I didn’t try using the Windows installer because I’m already used to Cygwin and would later try other opam packages which depend on Coq. And I’m not entirely sure I’d be able to compile CompCert based on this Windows command interpreter anyway…
I have just tried that procedure on a fresh Windows install (mine is a Windows guest in Virtual Box on a Windows host, but I don’t think this makes any difference).
I cannot help you, this is just to say that I have had no issues at all except for the minor “warning” quoted below, which might be a clue to the problem you are having, i.e. I’d guess some pre-existing installation of openssl that is not compatible:
...
running: C:\cygwin64_coq\bin\bash.exe --norc --noprofile "/etc/postinstall/python39-pip.sh"
running: C:\cygwin64_coq\bin\bash.exe --norc --noprofile "/etc/postinstall/python39.sh"
can't run /etc/postinstall/openssl.sh: No such file
running: C:\cygwin64_coq\bin\bash.exe --norc --noprofile "/etc/postinstall/openssh.sh"
running: C:\cygwin64_coq\bin\bash.exe --norc --noprofile "/etc/postinstall/gdk-pixbuf2.0.sh"
...
BTW, you might find it easier/more convenient to get help with this kind of issues on Zulip: https://coq.zulipchat.com/
Thanks. I did manage to get it to run, by commenting out these lines in shell_scripts/check_system.sh:
# On 32 bit cygwin on GitHub somehow the certificate database is broken - fix it
echo "============ Fix certificate database ============"
ls -l /etc/pki/tls/certs/
ls -lL /etc/pki/tls/certs/
update-ca-trust
ls -lL /etc/pki/tls/certs/
echo "============ Fix certificate database done ============"
Given the comment, I believe this is safe (I’m running the 64-bit version of the script). I re-ran the script and it managed to finish this time. Now I have some CompCert-specific issues, but I don’t believe they are related to the Coq platform scripts.
Just in case, I tried it on another Windows (a VM with Windows 10), and I had the same error. It seems to be Cygwin-specific, and unrelated to the Coq platform script.
By the way, I also have the can't run /etc/postinstall/openssl.sh: No such file earlier in the installation, and it doesn’t seem related.
Running a simple update-ca-trust command in my Cygwin results in that error. After several tests (with different Cygwin versions, different versions of the ca-certificates package, etc), I am still unable to understand exactly which conditions cause the command to fail.
I couldn’t even find on Google someone having the same permission issues I had, so it’s likely to be specific to my computers somehow. If I ever have the time and motivation to do further tests in the future, I’ll try to track it down.