# Windows installation from sources failure due to symbolic link

**URL:** <https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117>\
**Category:** Using Rocq\
**Created:** [November 29, 2023, 8:49am UTC](https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117 "2023-11-29T08:49:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anolmar](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@anolmar](https://discourse.rocq-prover.org/u/anolmar)\
**Post date:** [November 29, 2023, 8:49am UTC](https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117/1 "2023-11-29T08:49:33Z")

</div>

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](https://discourse.rocq-prover.org/t/trouble-installing-coq-core-on-windows/2036).

So, following the advice, I tried following the [installation instructions for Windows with source compilation](https://github.com/coq/platform/blob/2023.03.0/doc/README_Windows.md#installation-by-compiling-from-sources-using-opam-on-cygwin).

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:

```auto
============ 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…

---

<div class="post-metadata">

**Author:** ![jp-diegidio](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/jp-diegidio/32/819_2.png) [@jp-diegidio](https://discourse.rocq-prover.org/u/jp-diegidio)\
**Post date:** [November 30, 2023, 1:43pm UTC](https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117/2 "2023-11-30T13:43:59Z")

</div>

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:

```auto
...
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/](https://coq.zulipchat.com/)

---

<div class="post-metadata">

**Author:** ![anolmar](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@anolmar](https://discourse.rocq-prover.org/u/anolmar)\
**Post date:** [December 7, 2023, 9:30am UTC](https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117/3 "2023-12-07T09:30:34Z")

</div>

Thanks. I did manage to get it to run, by commenting out these lines in `shell_scripts/check_system.sh`:

```auto
# 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.

---

<div class="post-metadata">

**Author:** ![anolmar](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@anolmar](https://discourse.rocq-prover.org/u/anolmar)\
**Post date:** [December 7, 2023, 5:54pm UTC](https://discourse.rocq-prover.org/t/windows-installation-from-sources-failure-due-to-symbolic-link/2117/4 "2023-12-07T17:54:02Z")

</div>

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.
