Has anybody had success building Kicad on Windows 10 recently


#21

I can’t get past following error:

reinstalling patchutils...
reinstalling pkg-config...
reinstalling quilt...
-- Success 0: pacman --noconfirm -S base-devel
-- lock file exists
-- Running pacman --noconfirm -S git
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck
CMake Error at KiCad-Winbuilder.cmake:285 (message):
  Error running pacman --noconfirm -S git

   Output in: C:/kb/.logs/last_error
Call Stack (most recent call first):
  KiCad-Winbuilder.cmake:333 (execute_msys2_bash)

Path length does not seem to be the issue, I hacked KiCad-Winbuilder.cmake to just install git at line 319, and that fails too. It appears that line 318 runs ok but leaves a lock file… weird.

It appears that the build script is reinstalling quilt package which actually fails with no error message, and leaves lock file and quilt package corrupted.

resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/quilt-0.65-2/desc: No such file or directory
warning: could not fully load metadata for package quilt-0.65-2
error: failed to prepare transaction (invalid or corrupted package)
CMake Error at KiCad-Winbuilder.cmake:285 (message):
  Error running pacman --noconfirm -S base-devel

I’m out of ideas, will have to give up.


#22

I tried running in msys2 console. pacman bombs out part way through installing quilt.

(43/59) reinstalling pactoys-git                                            [#########################################] 100%
(44/59) reinstalling patch                                                  [#########################################] 100%
(45/59) reinstalling patchutils                                             [#########################################] 100%
(46/59) reinstalling pkg-config                                             [#########################################] 100%
(47/59) installing quilt                                                    [##---------------------------------------]   5%
bob@ZARQUON MSYS ~
$

Googling for “pacman quilt” finds a lot of unrelated stuff :slight_smile:

So, reboot and start from scratch…maybe I’ll try again tomorrow.


#23

After 20 hours of work I got stuck here:

– Found ngspice: C:/msys64/mingw64/include
CMake Error at CMakeLists.txt:583 (find_package):
By not providing “FindOCE.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “OCE”, but
CMake did not find one.

Could not find a package configuration file provided by “OCE” (requested
version 0.16) with any of the following names:

OCEConfig.cmake
oce-config.cmake

Add the installation prefix of “OCE” to CMAKE_PREFIX_PATH or set “OCE_DIR”
to a directory containing one of the above files. If “OCE” provides a
separate development package or SDK, be sure it has been installed.

– Configuring incomplete, errors occurred!
See also “C:/msys64/home/palcobia/kicad-build/src/MINGW-packages/mingw-w64-kicad-git/src/build-x86_64-w64-mingw32/CMakeFiles/CMakeOutput.log”.
See also “C:/msys64/home/palcobia/kicad-build/src/MINGW-packages/mingw-w64-kicad-git/src/build-x86_64-w64-mingw32/CMakeFiles/CMakeError.log”.
==> ERROR: A failure occurred in build().
Aborting…

Is there a Known Good development image with everything set, that we can use strait out of the box? I could put my efforts in coding instead of spending so much time doing boring and unproductive stuff like setting up the environment. It would be much appreciated. I just wanted to add a few features to Eeschema, test them and share it with the community but I’m finding it hard to start. feels like “Aborting…”

Please help
Paulo


#24

Hi Paulo,

A quick workaround would be to try building with -DKICAD_USE_OCE=OFF in your cmake command line.
Also I recommend joining the developer’s mailing list if you haven’t already, it’s a better place to discuss issues about development and get feedback on your new features.

I recently built KiCad from scratch on Windows and took some notes about what I had to do over on this launchpad issue.

Best,
Jon


#25

Thanks Jon,
I’ll give it a try and subscribe to the developer’s mailing list.

Best,
Paulo


#26

I didn’t get as far as failing at OCE :frowning:

What puzzles me is how we manage to get a Windows version at all, the guy that does the builds must be a genius :slight_smile:


#27

Hi Jon,
thanks for the help. But I couldn’t figure out where to put the switch ( -DKICAD_USE_OCE=OFF) since I’m following the instructions in “http://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html#build_windows
can you help?

Best regards,
Paulo


#28

That is where I’m stuck too. It would be so easy if we had a build environment image that works, we could just unpack it and start coding…


#29

+1 … and some chars


#30

You put the -D options in the cmake command line, in “MSYS2 the Hard Way”
I am pretty sure the “easy way” doesn’t work at the moment, but I was able to get it built using the “hard way”
I added some notes a few weeks ago under “Known MSYS2 Build Issues” below – you need to either disable OCE with the cmake flag, or build it from source.


#31

I just tested the instructions on my Windows 10 VM and confirmed that they do work on a fresh msys2 installation.

I pushed some updates to the documentation to remove the “easy way” because it is currently broken.
The hard way is not too hard, just a few more steps to follow

http://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html#build_windows

Please let me know if anyone has trouble building following those instructions. Keep in mind you do need to update your msys2 packages using the pacman command in the first paragraph before you try building KiCad.


#32

Thanks to @craftyjon, I finally got a Windows build! :thumbsup: I had to abandon the kicad-winbuilder script and go off piste, it helps to have experience with Unix and cmake etc.


#33

Woohoo, please share your work with the community I’m eager to get started.

i couldn’t build it because mingw-w64-x86_64-ngspice is missing from the repo and i don’t know where to get it, it is not in the instructions.

Paulo


#34

I followed Jon’s guide in https://bugs.launchpad.net/kicad/+bug/1752150/comments/6 which I summarise as follows:

  1. Open msys2 console

  2. cd /c/kicad-build <— or wherever your build is

  3. pacman -S base-devel git mingw-w64-x86_64-cmake mingw-w64-x86_64-doxygen
    mingw-w64-x86_64-gcc mingw-w64-x86_64-python2 mingw-w64-x86_64-pkg-config
    mingw-w64-x86_64-swig mingw-w64-x86_64-boost mingw-w64-x86_64-cairo
    mingw-w64-x86_64-glew mingw-w64-x86_64-curl mingw-w64-x86_64-wxPython
    mingw-w64-x86_64-wxWidgets mingw-w64-x86_64-toolchain mingw-w64-x86_64-glm

  4. git clone https://github.com/Alexpux/MINGW-packages mwp

  5. cd mwp/mingw-w64-ngspice

  6. makepkg-mingw -is


#35

After I wrote that guide I also updated the official build docs. I found that on a fresh Windows 10 / mingw64 install after updating all the mingw packages, I didn’t need to build ngspice from source.


#36

I also got confused with mingw-w64-ngspice-git, which is a dependency for KiCad in PKGBUILD, not mingw-w64-ngspice.
Also confused by Kicad-winbuilder which seems to overwrite the latest PKGBUILD with its own, older version.

Later I will try doing a fresh build with latest instructions, and see how it goes. Maybe this time I will remember to write down exactly what I did :slight_smile:


#37

thanks a lot, It works.


#38

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