Page 1 of 1

Issues with setting up development environment : mingw32/msys

Posted: Fri Dec 13, 2019 10:56 pm
by c.Hicham
Hello everyone,

I'm trying to reinstall esp32 development environment for my work computer in windows 10 using this link :
https://docs.espressif.com/projects/esp ... setup.html

Few months ago I was able to make it work, make projects, flash them to esp32 board... happy life :). until I run of some issues and decided to remove msys folder to restart the setup from scratch.

After extracting the esp32 toolchain and getting the msys folder, I follow the steps to download the esp-idf repository and update it, checkout branch v3.3 and synchronize the submodules...etc.
When I run tools/windows/windows_install_prerequisites.sh
I get the following output :

Code: Select all

$ tools/windows/windows_install_prerequisites.sh
:: Synchronizing package databases...
 mingw32                                              506.4 KiB   945K/s 00:01 [###########################################] 100%
 mingw32.sig                                          119.0   B  0.00B/s 00:00 [###########################################] 100%
 mingw64                                              508.8 KiB   964K/s 00:01 [###########################################] 100%
 mingw64.sig                                          119.0   B  0.00B/s 00:00 [###########################################] 100%
 msys                                                 192.4 KiB   737K/s 00:00 [###########################################] 100%
 msys.sig                                             119.0   B  0.00B/s 00:00 [###########################################] 100%
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...
:: msys2-runtime and catgets are in conflict. Remove catgets? [y/N]
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: msys2-runtime and catgets are in conflict
1-The first thing that I find weird is the conflict with catgets I. I tried the setup in my personal computer and didn't get this conflict.
from my understanding all the packages, dependencies are checked inside the msys folder, that's the hole idea behind having this kind of environment, right ? Please, correct me if I'm wrong.
Can anyone care to explain why I have this conflict in certain computer and not in another even if i'm running in both windows 10 ?

The problem is coming from pacman upgrade command : pacman -Syu.
I delete catgets and use the command pacman -Syu . Below are the logs :

Code: Select all

Pacman -Suy
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...
:: msys2-runtime and catgets are in conflict. Remove catgets? [y/N] y
:: msys2-runtime and libcatgets are in conflict. Remove libcatgets? [y/N] y

Packages (9) bash-4.4.023-1  catgets-1.1-2 [removal]  filesystem-2018.12-1  libcatgets-1.1-2 [removal]  mintty-1~3.0.6-1
             msys2-runtime-3.0.7-6  msys2-runtime-devel-3.0.7-6  pacman-5.2.1-4  pacman-mirrors-20180604-2

Total Download Size:   23.21 MiB
Total Installed Size:  93.96 MiB
Net Upgrade Size:      12.57 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 msys2-runtime-3.0.7-6-i686                             2.4 MiB  1250K/s 00:02 [###########################################] 100%
 bash-4.4.023-1-i686                                 1931.4 KiB  1572K/s 00:01 [###########################################] 100%
 filesystem-2018.12-1-i686                             37.8 KiB   289K/s 00:00 [###########################################] 100%
 mintty-1~3.0.6-1-i686                                650.5 KiB  2.44M/s 00:00 [###########################################] 100%
 msys2-runtime-devel-3.0.7-6-i686                       5.1 MiB  2033K/s 00:03 [###########################################] 100%
 pacman-mirrors-20180604-2-any                         10.7 KiB  0.00B/s 00:00 [###########################################] 100%
 pacman-5.2.1-4-i686                                   13.1 MiB  1992K/s 00:07 [###########################################] 100%
(7/7) checking keys in keyring                                                 [###########################################] 100%
(7/7) checking package integrity                                               [###########################################] 100%
(7/7) loading package files                                                    [###########################################] 100%
(7/7) checking for file conflicts                                              [###########################################] 100%
(9/9) checking available disk space                                            [###########################################] 100%
:: Processing package changes...
(1/2) removing catgets                                                         [###########################################] 100%
(2/2) removing libcatgets                                                      [###########################################] 100%
(1/7) upgrading msys2-runtime                                                  [###########################################] 100%
(2/7) upgrading bash                                                           [###########################################] 100%
(3/7) upgrading filesystem                                                     [###########################################] 100%
(4/7) upgrading mintty                                                         [###########################################] 100%
(5/7) upgrading msys2-runtime-devel                                            [###########################################] 100%
(6/7) upgrading pacman-mirrors                                                 [###########################################] 100%
(7/7) upgrading pacman                                                         [###########################################] 100%
warning: terminate MSYS2 without returning to shell and check for updates again
warning: for example close your terminal window instead of calling exit
I follow the suggestion on the last 2 warning messages of the installer and close the msys window but the program doesn't response anymore and the only solution is to close it from the Task Manager.
I open mingw32.exe again and run pacmac -Syu but I get the locked database error :

Code: Select all

pacman -Suy
:: Synchronizing package databases...
error: failed to update mingw32 (unable to lock database)
error: failed to update mingw64 (unable to lock database)
error: failed to update msys (unable to lock database)
error: failed to synchronize all databases
As suggested in many discussions I delete the /var/lib/pacman/db.lck file which is a 0 kb file and run again pacman -Suy but the same error appear again and again.
I restart my computer and try again but yet the same error.

-I tried the same installation in another work computer that has the same configuration, antivirus and firewall...etc and got the same results, no luck !
-I tried it in my personal computer and everything worked just fine.
-I tried to just upgrade the msys with pacman -Syu without getting esp-idf repository yet got the same error

Now when I run pacman -Syu it crashes in the following :

Code: Select all

:: Synchronizing package databases...
With pacman -Syuu it gets further

Code: Select all

pacman -Syuyuu
:: Synchronizing package databases...
error: failed to update mingw32 (unable to lock database)
error: failed to update mingw64 (unable to lock database)
error: failed to update msys (unable to lock database)
error: failed to synchronize all databases
I would appreciate it if anyone can give me some suggestions or explanation of this issue so I can fix it!

Thank you guys.