CMake build issue using MSYS2


I’m looking to utilize CMake in setting up OpenCV and am trying to follow their instructions which calls for an install of CMake.

In the README file under “Windows” OS it suggest the following "Bootstrap with MinGW under MSYS2.

  • Download and install MSYS2_. Then install the required build tools::*

  • $ pacman -S --needed git base-devel mingw-w64-x86_64-gcc*
  • and bootstrap as above."*

Following that I get up to the “make” selection and then get a series of errors:

$ pacman -S --needed git base-devel mingw-w64-x86_64-gcc
warning: file-5.40-2 is up to date – skipping
warning: gawk-5.1.0-1 is up to date – skipping
warning: gettext- is up to date – skipping
warning: grep-3.6-1 is up to date – skipping
warning: pacman-6.0.0-5 is up to date – skipping
warning: perl-5.32.1-1 is up to date – skipping
warning: sed-4.8-1 is up to date – skipping
warning: wget-1.21.1-2 is up to date – skipping
:: There are 47 members in group base-devel:
:: Repository msys

  1. asciidoc 2) autoconf 3) autoconf2.13 4) autogen 5) automake-wrapper
  2. automake1.10 7) automake1.11 8) automake1.12 9) automake1.13
  3. automake1.14 11) automake1.15 12) automake1.16 13) automake1.6
  4. automake1.7 15) automake1.8 16) automake1.9 17) bison 18) btyacc
  5. diffstat 20) diffutils 21) dos2unix 22) flex 23) gdb
  6. gettext-devel 25) gperf 26) groff 27) help2man 28) intltool
  7. libtool 30) libunrar 31) libunrar-devel 32) m4 33) make 34) man-db
  8. patch 36) patchutils 37) pkgconf 38) pkgfile 39) quilt 40) reflex
  9. scons 42) swig 43) texinfo 44) texinfo-tex 45) ttyrec 46) unrar
  10. xmlto

Enter a selection (default=all): 33
resolving dependencies…
looking for conflicting packages…

Packages (49) expat-2.3.0-1 heimdal-7.7.0-2
mingw-w64-x86_64-gcc-libs-10.3.0-5 mingw-w64-x86_64-gmp-6.2.1-2
mingw-w64-x86_64-isl-0.24-1 mingw-w64-x86_64-libiconv-1.16-2
mingw-w64-x86_64-mpc-1.2.1-1 mingw-w64-x86_64-mpfr-4.1.0-3
mingw-w64-x86_64-zlib-1.2.11-9 mingw-w64-x86_64-zstd-1.5.0-1
openssh-8.5p1-1 perl-Authen-SASL-2.16-2 perl-Clone-0.45-2
perl-Convert-BinHex-1.125-1 perl-Encode-Locale-1.05-1
perl-Error-0.17029-1 perl-File-Listing-6.14-1
perl-HTML-Parser-3.76-1 perl-HTML-Tagset-3.20-2
perl-HTTP-Cookies-6.10-1 perl-HTTP-Daemon-6.12-1
perl-HTTP-Date-6.05-1 perl-HTTP-Message-6.32-1
perl-HTTP-Negotiate-6.01-2 perl-IO-HTML-1.004-1
perl-IO-Socket-SSL-2.071-1 perl-IO-Stringy-2.113-1
perl-LWP-MediaTypes-6.04-1 perl-MIME-tools-5.509-1
perl-MailTools-2.21-1 perl-Net-HTTP-6.21-1
perl-Net-SMTP-SSL-1.04-1 perl-Net-SSLeay-1.90-1
perl-TermReadKey-2.38-2 perl-TimeDate-2.33-1
perl-Try-Tiny-0.30-1 perl-URI-5.09-1 perl-WWW-RobotRules-6.02-2
perl-libwww-6.55-1 vim-8.2.2859-2 git-2.32.0-1 make-4.3-1

Total Download Size: 71.39 MiB
Total Installed Size: 552.58 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages…
expat-2.3.0-1-x86_64.pkg.tar.zst failed to download
vim-8.2.2859-2-x86_64.pkg.tar.zst failed to download
heimdal-7.7.0-2-x86_64.pkg.tar.zst failed to download
openssh-8.5p1-1-x86_64.pkg.tar.zst failed to download
perl-Error-0.17029-1-any.pkg.tar.xz failed to download
Total ( 5/49) 71.4 MiB 1930 KiB/s 00:38 [#####################] 100%
error: failed retrieving file ‘openssh-8.5p1-1-x86_64.pkg.tar.zst’ from : SSL certificate problem: unable to get local issuer certificate

Similar errors continue until at the end there is:

warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

Has anyone seen this issue before or has an idea on how to overcome it?

Many thanks.

This looks like an MSYS2 problem, nothing to do with CMake. I would recommend finding MSYS2 support at this stage.