Building Kicad on W10

For reasons of curiosity I installed Git for windows in a windows user account and directory. Having a version control for pcb and its firmware (arm-gcc) was a wishful thinking for a long time postponed. Git Installation setup went through without errors. At first trial, both bash and GUI report file access problems becouse of missing admin rights. Did not check where git tried to write on but assumed this installation is anyway not correct for the intended way to buildt Kicad.

As far as I understand I have to install the MSYS2 project and I assume this Linux like bash contains all the other requried tools (GIT, Make, GCC) to compile the sources ? Anything more to install before or after (wxWidgets?) Nevertheless msys2 prompt reports same missing admin rights if trying. Do I have to install (and buildt) from W10 admin account only or does this depend from my non standard W10 users setup ? I renamed the W10 defautl admin acount to supervisor what could be incompatible for linux tools?

You could try I haven’t found out (or even tried) how to make changes so that it doesn’t overwrite them, or how to just build the source without creating an installer. But this should take care of all dependencies because it creates the same installer you download when you’re an ordinary end user.

successfully installed cmake and then Github Desktop to clone the Kicad-winbuilder repository. Executing make_all.bat reports same error:
unning cd “” && git clone
/etc/post-install/ line 259: cd: /c/Users/Superuser: Permission denied

Possibly this occours becouse I have same user name (superuser) in use at this machine ?
Or do I simply have to run it while user Superuser is logged in ? The slash / indicates linux path not windows but may be mapped to W10 file system with access rights from there.

Create a directory in some path that your user has full access to and then clone winbuilder there. Run make_all.bat from a command line opened in that directory.

Always same - to be more specific: I am logged in as normal user jv without admin rights. There are other users admin and Administrator what also have no admin rights for fake use. Only Superuser has admin rights and there are no other users beside. As Windows user jv I used Github Desktop without login to clone repository from to c:\data\ki\kicad-winbuilder. There is full rw access for c:\data\ and below where all my working data is. There is no use of c:\users\jv\documents… or its Windows alias for several reasons in this PC. No matter if I invoke make_all.bat from command line or not, it tries to access superusers directiories what fails becouse of missing access rights.
Obviosly c:\user\superuser is translated to /c/Users/Superuser whatever the script tries to do there as a home dir.

[download 99% complete]
– [download 100% complete]
– Running pacman --noconfirm -Sy
mkdir: cannot change permissions of ‘/dev/shm’: Permission denied
mkdir: cannot change permissions of ‘/dev/mqueue’: Permission denied
/etc/post-install/ line 258: cd: /c/Users/Superuser: Permission denied
WARNING: Failed attempt to cd into /c/Users/Superuser!
‘C:\WINDOWS\system32\drivers\etc\hosts’ -> ‘/etc/hosts’
‘C:\WINDOWS\system32\drivers\etc\protocol’ -> ‘/etc/protocols’
‘C:\WINDOWS\system32\drivers\etc\services’ -> ‘/etc/services’
‘C:\WINDOWS\system32\drivers\etc\networks’ -> ‘/etc/networks’
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created

Do I have to run the commandline for build-all with admin rights?
On the other hand, there is no request for password to gain admin rights.
What is /dev/shm and /dev/mqueue and where is that ?

Looks like an issue with msys2. I would report this on their issue tracker (github likely).
Try it with admin rights (launch cmd with admin rights and then run bat file from it).

It’s a linux thingy that msys emulates, irrelevant to this issue.

runs for this moment. Invoking the command line by cntl-shft-enter shows completely diffrent log. Will report if there is success and it seems to take another hour …

went through without complaints but there seems another trouble:

– KICAD_PACKAGE_SOURCE_DIR /MINGW-packages/mingw-w64-kicad-git/
– MSYS2 user name is: $USERNAME=
– Running cd “/MINGW-packages/mingw-w64-kicad-git” && TERM=vt220 makepkg-mingw -s --noconfirm
/usr/bin/bash: Zeile 0: cd: /MINGW-packages/mingw-w64-kicad-git: No such file or directory
CMake Error at KiCad-Winbuilder.cmake:280 (message):
Error running cd “/MINGW-packages/mingw-w64-kicad-git” && TERM=vt220
makepkg-mingw -s --noconfirm

Output in: C:/data/ki/kicad-winbuilder/.logs/last_error
Call Stack (most recent call first):
KiCad-Winbuilder.cmake:338 (execute_msys2_bash)

Seems to be no proper msys2 execution ?
Do I have to start again from mingw command line ?

No, you don’t have to run anything from mingw command line.
Some other user on the forum ran into this issue where msys doesn’t pick up username properly. He deleted HOME environment variable and that worked for him.
Try that in windows system environment properties and then just do clean run of make_all.bat

No luck today, there was:


after deleting the home variable, make_all reports

– KICAD_PACKAGE_SOURCE_DIR /MINGW-packages/mingw-w64-kicad-git/
– MSYS2 user name is: $USERNAME=
– Running cd “/MINGW-packages/mingw-w64-kicad-git” && TERM=vt220 makepkg-mingw -s --noconfirm
Copying skeleton files.
These files are for the users to personalise their msys2 experience.

They will never be overwritten nor automatically updated.

‘./.bashrc’ -> ‘/home/jv/.bashrc’
‘./.bash_logout’ -> ‘/home/jv/.bash_logout’
‘./.bash_profile’ -> ‘/home/jv/.bash_profile’
‘./.inputrc’ -> ‘/home/jv/.inputrc’
‘./.profile’ -> ‘/home/jv/.profile’
‘./.vimrc’ -> ‘/home/jv/.vimrc’
/usr/bin/bash: Zeile 0: cd: /MINGW-packages/mingw-w64-kicad-git: No such file or directory
CMake Error at KiCad-Winbuilder.cmake:280 (message):
Error running cd “/MINGW-packages/mingw-w64-kicad-git” && TERM=vt220
makepkg-mingw -s --noconfirm

seems I have to reinstall the mingw package. Regarding Username it looks better now

– HOME_DIR C:/data/ki/kicad-winbuilder/msys64/home/jv
– KICAD_PACKAGE_SOURCE_DIR C:/data/ki/kicad-winbuilder/msys64/home/jv/MINGW-packages/mingw-w64-kicad-git/
– MSYS2 user name is: $USERNAME=jv
– Running cd “C:/data/ki/kicad-winbuilder/msys64/home/jv” && git clone
Klone nach 'MINGW-packages…

Waiting another hour since mingw comes with all the Linux stuff wether its used or not

whoop - somewhat down the make skript suddenly well known gcc switches appear and hours later:

Processed 1 file, writing output (x86-unicode):
Output: “C:\data\ki\kicad-winbuilder\msys64\home\jv\out\pack-x86_64\kicad-r14321.89e9857f3-x86_64.exe”

Kicad Installation runs without errors but after invoking, kicad.exe stops becouse of missing libzstd.dll for what I have to dig again

Just look for that dll in msys2 folder (pick 64bit version if you have 64bit kicad) and copy it to kicad/bin. This happens because installer script is not updated to pick all dependencies of latest msys2 package.

Hi, I have the same problem. Let’s take a look at my solution.(
At the same time, I will package the compilation environment, you can try my compilation environment(, If the download speed is very slow, you can contact me and I upload it to Google Cloud or VPS.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.