Building KiCAD for Windows - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: August 13, 2011, 10:32:10 am
content: To build the latest snapshot of KiCAD follow these instructionshttp://tech.groups.yahoo.com/group/kicad-users/message/10163You can get CMake from here:http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.exeYou can get Bazaar from here:http://launchpad.net/bzr/2.3/2.3.4/+download/bzr-2.3.4-1-setup.exe> 2/ Same question for GCC.The script I made will download and install a local copy of GCC foryou which will build KiCad. Basic instructions for use are:Install Bazaar and CMake from the links above. Make sure to select"Yes" if asked to add either one to the Windows path so that you canrun both tools from the command line.Start a command prompt (Usually Start -> All Programs -> Accessories-> Command Prompt). Use cd (Change Directory) to navigate to thefolder where you wish to have the kicad-winbuilder directory and useBazaar to get the script:bzr branch lp:kicad-winbuilderAfter the script has been fetched, enter the directory containing the script:cd kicad-winbuilderThen use cmake to run the script:cmake -P KiCadWinbuilder.cmakeanswer the question to whoami with your name and email address.It should build KiCad and you should end up with a sub-directorycalled bin which contains the latest executables.Happy building.David.P.S Here is the Launchpad site for the Kicad-Winbuilder scripthttps://launchpad.net/kicad-winbuilder

author: amspire
author_rank: Super Contributor
timestamp: August 13, 2011, 01:12:44 pm
content: David,This is a really great post. Thank you.I have been giving Kicad a go using the standard release build.You have inspired me to start using the latest snapshots instead.Is there a Kicad changelog or similar anywhere? The News-Changelog link athttp://www.lis.inpg.fr/realise_au_lis/kicad/seems to be permanently busted.Richard

author: djsb
author_rank: Super Contributor
timestamp: August 13, 2011, 01:51:13 pm
content: You can view all the changes on the Launchpad page herehttp://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/changes/3067?start_revid=3067I'm not sure if you have to register on the site first. As a member I have access anyway so I don't know. Give it a try.Post your experiences here. Thanks.David.

author: amspire
author_rank: Super Contributor
timestamp: August 13, 2011, 02:31:19 pm
content: The link works without any login.It is very good.I just noticed that a calculator for track current capacity and electrical spacing has been added - part of the DRC I guess. The changelog even shows the reference PDFs used as the basis of these rules.I am definitely going into the Kicad building business.

author: carloscuev
author_rank: Regular Contributor
timestamp: May 16, 2012, 07:39:46 am
content: Very nice! How about if I need 1 or 2 earlier revisions than latest?

author: amspire
author_rank: Super Contributor
timestamp: May 16, 2012, 12:37:36 pm
content: I had started posting all the daily builds I generate for myself, but there are others probably doing a better job, so I stopped. One site with a number of builds ishttp://kicad.picaxe.cz/A couple of times I have had to backtrack to an earlier build when new bugs appeared in the latest build. It is definitely a risk, but you get advantages like a properly working PAN using the middle button.Richard.

author: carloscuev
author_rank: Regular Contributor
timestamp: May 16, 2012, 04:37:51 pm
content: I found that modifying line #489 of KiCadWinbuilder.cmake to "COMMAND bzr revert -r 3558" instead of "COMMAND bzr up" lets you build the revision you want, in this case revision 3558!The compiled binaries still have in the window title the latest revision number instead of the earlier one you chose, but what you get built in fact is the revision you chose!This is necessary because sometimes latest rev doesnt even build, or has a crappy bug.

author: amspire
author_rank: Super Contributor
timestamp: May 24, 2012, 12:03:26 pm
content: I couldn't build recently.I had to get the build script again withQuoteThe new script built OK.Richard.

author: exodia
author_rank: Contributor
timestamp: June 27, 2012, 05:57:01 pm
content: Cannot build version 3632 of kicad for windows using win builder script. ANyone having similar issues? Is there any repository for daily build on windows?

author: amspire
author_rank: Super Contributor
timestamp: July 01, 2012, 02:54:47 am
content: Quote from: exodia on June 27, 2012, 05:57:01 pmJust tried building version 3634 and it worked fine (Win 7 64 bit).Did you delete your old build script and get a new one?bzr branch lp:kicad-winbuilderYou could just delete all old KiCad build files and start from scratch.Richard.

author: carloscuev
author_rank: Regular Contributor
timestamp: August 31, 2012, 07:25:19 pm
content: Hello, I got this error:In the logs:mingw32-make: *** No rule to make target '....libgcc_libmswuwx', needed by 'setup_h'. Stop.Any Idea?

author: djsb
author_rank: Super Contributor
timestamp: August 31, 2012, 09:11:16 pm
content: Try deleting the winbuilder script and then re-fetch it using the original instructions. This should work.

author: carloscuev
author_rank: Regular Contributor
timestamp: August 31, 2012, 11:07:32 pm
content: Nope, same error... Looks it's happening since I sent windows to sleep while compiling, then on wake up I interrupted the compiling process thinking it might end up badly compiled, and restarted compilation...

author: amspire
author_rank: Super Contributor
timestamp: September 01, 2012, 07:43:57 am
content: Quote from: carloscuev on August 31, 2012, 11:07:32 pmI am running the script now on my WIndows PC without any problem - I am building Revision 3705.When you got the new script, did you delete all the other folders in the kicad-winbuilder folder, so that the script file can rebuild the development environment from scratch? At one point, I had the script failing to build new revisions, but deleting everything solved the problem.Richard

author: carloscuev
author_rank: Regular Contributor
timestamp: September 03, 2012, 07:20:12 am
content: I'm still unable to compile, have tried deleteing everything and reinstalling cmake, now trying inside a virtual machine, let's see how it goes.

author: djsb
author_rank: Super Contributor
timestamp: September 03, 2012, 07:54:51 am
content: Join this yahoo grouphttp://tech.groups.yahoo.com/group/kicad-users/and explain the problem. A developer should be able to help you.

author: carloscuev
author_rank: Regular Contributor
timestamp: September 03, 2012, 12:19:57 pm
content: I compiled wxWidgets in a virtual machine, copied the compiled files to my standard windows installation and now I'm able to compile new Kicad builds, I don't know why I can't compile wxWidgets in my standard windows

author: hairykiwi
author_rank: Contributor
timestamp: October 21, 2012, 03:52:44 pm
content: David, first off - many thanks for the build script!I've just successfully* built the KiCad binaries for WinXP, but only after experiencing the problems identical to the screenshot previously posted:Quote from: carloscuev on August 31, 2012, 07:25:19 pmThe short answer is, even though I did as instructed:Quotethe mingw\bin folder location was missing from my PATH variable. i.e. I needed to add "D:\my_kicad_dev_build_directory\kicad-winbuilder\mingw\bin" to the PATH variable. It also might have been complicated by PATH also referencing another mingw install I have - WinAVR.After picking through the script to try to understand what it was doing, I found these URL's helpful or interesting:http://wiki.wxwidgets.org/Installing_MinGW_under_Windows- mentions the requirement for mingw/bin to be listed in PATH.http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW- mentions the WinAVR issue, and the example:if not exist gcc_mswu mkdir gcc_mswuprocess_begin: CreateProcess(NULL, -c "if not exist gcc_mswu mkdir gcc_mswu", ...) failed.http://wxwidgets.blogspot.co.uk/2011/06/choosing-gcc-for-building-wxwidgets.html- would this be a better way of building wxWidgets? I have no expertise and don't have enough experience to decide. I tried doing it this way before stumbling on the requirement for mingw/bin to be listed in PATHEDIT:*binaries built, but when run, all report "xxxxxxxx.exe has encountered a problem and needs to close"This is the typical error summary:AppName: eeschema.exe AppVer: 0.0.0.0 ModName: libstdc++-6.dllModVer: 0.0.0.0 Offset: 00041788EDIT 2:exe problem solved - binaries need to be executed from the ..\kicad-winbuilder\bin folder - not moved/copied to any previously unpacked windows KiCad distribution. This is probably obvious to an experienced source builder, but not to a novice like me.- Hamish

author: djsb
author_rank: Super Contributor
timestamp: October 21, 2012, 09:19:14 pm
content: Delete your kicad-winbuilder directory and start afresh. That seems to work for me. If not post a message on the yahoo group mentioned earlier. I did not write the script. The developer who did write it might be able to solve the problem as he sometimes reads the yahoo group posts.Other wise visit the kicad-winbuilder launchpad site.PS. I'm compiling all my Kicad snapshots on Linux Mint now (see my other post on this) as it's a simpler process and more reliable.

author: hairykiwi
author_rank: Contributor
timestamp: October 21, 2012, 09:32:19 pm
content: Thanks for clarifying David,Before putting the mingw/bin directory in the PATH, (which did do the trick for me-UPDATE: see reply from Brian in my latest post, below) I tried deleting and rebuilding as you suggested earlier, but just as someone else also experienced, that resulted in an identical error being thrown.I will post as you suggested.Thanks for the hint about Linux Mint too - I'll have a play.Cheers,Hamish

author: carloscuev
author_rank: Regular Contributor
timestamp: November 14, 2012, 05:32:00 pm
content: Is it just me or current rev 3800 doesn't compliles using kicadwinbuilder script?I've attached error logs.

author: poptones
author_rank: Frequent Contributor
timestamp: November 14, 2012, 05:45:11 pm
content: There isn't an exe file you can just download? I thought you used windows because it was easyIf you have to compile it anyway, why not run a VM? That's what I do for my windows crap.

author: carloscuev
author_rank: Regular Contributor
timestamp: November 14, 2012, 06:07:33 pm
content: Quote from: poptones on November 14, 2012, 05:45:11 pmI use windows for other reasons.I always like using the top unstable revision of kicad, compile the newest every time I'll use it (yeah, some might think is dumb as a unstable rev might screw up my files) but I'll always have the option to use the old stable ones for easy-peasy download as you say. I just like working at the edge

author: hairykiwi
author_rank: Contributor
timestamp: November 14, 2012, 06:42:24 pm
content: In my initial post, Iincorrectlydetermined the cause of my build problem being due to mingw/bin directoryNOTbeing in the PATH variable.The script's author, Brian Sidebotham kindly corrected me via KiCad yahoo groupmail, so I've copied it below in the hope it helps someone else.Brian wrote:Hi Hamish,It did not build because you had WinAVR in your path. This is a known bug with the script. It is best for me to create my own PATH export. The only reason I don't is because I cannot easily locate your Bazaar install and I can't download and extract a local Bazaar install easily (They haven't rolled a ZIP of the binaries for a long time, only MSI installers are made available for Windows)Adding MinGW to your path is not needed as the script will download the latest MinGW installer and install MinGW locally to build KiCad anyway.Thanks for using the script, and for your feedback. I might add a test for WinAVR and present a configuration error message so that people know it is a conflict.Or I might do a download that already includes MinGW, cmake and Bazaar locally so the dependencies to build KiCad essentially become zero!

author: poptones
author_rank: Frequent Contributor
timestamp: November 14, 2012, 06:55:16 pm
content: I really don't get kicad. This is sort of off topic. I'm just wondering how on earth you even learn to use that program. I find it's nuts. I learned on PADS back on windows 98 and kicad made that look easy.Honestly the easiest layout software I've found is one of those "free" packages you get from a PC board maker. "PCB artist" they call it. Even the autorouter is easy (although I wouldn't use it for much since it works like an autorouter and runs traces all over the place). I normally try to use open source software whenever possible, but I just can't seem to get kicad.

author: hairykiwi
author_rank: Contributor
timestamp: November 14, 2012, 07:08:17 pm
content: Which tutorials did you try? The Teho labs one got me going well enough. The yahoo groupmail is also very active and full of helpful people - including the developers sometimes. I can't compare KiCad with much as I didn't want to get bogged down with proprietary formats - so I persevered with learning KiCad. It is quirky, but seems quite powerful. The FreeRouter it links with can autoroute - but also good for dragging components around while maintaining netclass rules.

author: ElektroQuark
author_rank: Unknown
timestamp: November 14, 2012, 08:20:30 pm
content: Quote from: carloscuev on November 14, 2012, 05:32:00 pmSolved on rev 3801

author: carloscuev
author_rank: Regular Contributor
timestamp: March 11, 2013, 08:07:59 pm
content: I've been posting daily builds here:http://escalalibre.com/edwt/as well as Walter's libraries (http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm) in a single 7zip file and some random tools I've made for myself, but feel free to use them. Any comments please send me PM. Hope they're useful for you guys.

author: carloscuev
author_rank: Regular Contributor
timestamp: June 05, 2013, 07:47:37 am
content: The Kicad-WinBuilder script has been updated, since some months it comes in a handy zip file with a bat file, just double click and everything starts. I guess the only other thing needed is cmake, but I'm not sure. Now, building you own testing versions is easier than everhttps://launchpad.net/kicad-winbuilder

author: ElektroQuark
author_rank: Unknown
timestamp: June 05, 2013, 08:29:52 am
content: Quote from: carloscuev on March 11, 2013, 08:07:59 pmHi Carlos:Do you update them regularly?Thank you.

author: carloscuev
author_rank: Regular Contributor
timestamp: June 05, 2013, 08:37:21 am
content: Yes I do, In less than 2 days there's a new release, or Walter posts new libraries I upload a new package

author: carloscuev
author_rank: Regular Contributor
timestamp: November 09, 2013, 08:32:04 am
content: Latest testing build Rev.4448 with scripting, footprint library table and CERN's contributions is available athttp://escalalibre.com/edwt/kicad_testingBinaries/not sure if scripting works correctly as I don't know how to use it and/or test it.

author: carloscuev
author_rank: Regular Contributor
timestamp: November 09, 2013, 11:50:37 am
content: Quote from: Mechatrommer on November 09, 2013, 11:47:02 amWhy you say so?I must admit sometimes it takes me more days to update thembut as he made them available via github, my packages are nearly useless

author: Icchan
author_rank: Regular Contributor
timestamp: February 21, 2014, 01:19:38 am
content: I wonder why it's even a requirement to build it for windows yourself? One big wrinkle in otherwise ok package... hopefully it's not there because people are lazy to make it more accessible?

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 01, 2014, 05:03:00 am
content: QuoteI dont think it's because they are lazy, it's probably the Linux/Geda origin of the project.I must admit I can't get Bazaar to work properly with my Subversion so I don't build either.But if you look up the thread a bit.Quote from: carloscuev on November 09, 2013, 08:32:04 amThat link has all the windows binaries and I think you can just drop them in and run them. Well it works for me anyway.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 02, 2014, 01:27:42 am
content: ^ I will take that backPCBNew doesn't work with the library table. I can't figure out why.From what I can gather the library table is held in the users home directory. Except I haven't got this file, if I create it, it isn't used anyway.I will go back to the last stable build for while.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 02, 2014, 04:26:25 am
content: Did you filled the lib table correctly? Here an example:To be able to use those environment variables you may set them up on a bat file, which will be the new (temporary) way you run kicad:

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 02, 2014, 05:44:44 am
content: Thanks for the help.I can get the PCB library Tables as demonstrated but I cannot find the file(s). I would like to directly edit them. They are supposed to be in my "home" directory which in windows should be under \Users\, but I cannot find them.Anyway they must be somewhere as the information remains after restarting Kicad.I am using Windows 8.1 but for some reason I have no %HOME% Environment Variable, maybe this is a problem.Anyway I will try loading the new pretties from github and see what happens.Anyway different versions of Kicad seem to be playing happily together.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 02, 2014, 06:04:31 am
content: The file is here: C:\Users\<name>\AppData\Roaming\kicad\fp-lib-table and it's filled like this:

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 02, 2014, 06:15:45 am
content: Excellent, it is there. Roaming, why wouldn't put it there???. Surprised that the indexed search didn't find it.So anyway I downloaded a .pretty file and placed it on a PCB all good.I am not sure whether to work live with Libraries or to manually update local copies of them.I saw some scripts written to do this, when I get the chance I will try it out.Thanks for the input.

author: jancumps
author_rank: Unknown
timestamp: April 02, 2014, 07:09:57 am
content: i'll check if the same steps will solve my broken KICad on Linux. As soon as I switched to source builds the library thingy stopped working

author: Rigby
author_rank: Super Contributor
timestamp: April 04, 2014, 02:28:25 pm
content: I tried building with kicad-winbuilder last night and it failed.I've attached the stderr.log; can anyone make heads or tails of this?edit: nevermind. answered in this thread:https://www.eevblog.com/forum/open-source-kicad-geda/problem-building-kicad-for-windows/

author: firewalker
author_rank: Super Contributor
timestamp: April 10, 2014, 11:05:17 am
content: Today (10-04-2014) I successfully built KiCad r4793 using Winbuilder on Windows 7.Alexander.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 10, 2014, 03:42:40 pm
content: To anyone building Kicad rev 4793 you will get this error when running cvpcb, eeschema, pcbnew, gerbview, pcbcalculator or pl_editor:You need to manually copy:"kicad-winbuilder-3.3\build\Release\cvpcb\_cvpcb.kiface""kicad-winbuilder-3.3\build\Release\eeschema\_eeschema.kiface""kicad-winbuilder-3.3\build\Release\gerbview\_gerbview.kiface""kicad-winbuilder-3.3\build\Release\pcb_calculator\_pcb_calculator.kiface""kicad-winbuilder-3.3\build\Release\pcbnew\_pcbnew.kiface""kicad-winbuilder-3.3\build\Release\pagelayout_editor\_pl_editor.kiface"to your "kicad-winbuilder-3.3\kicad\bin\" folderEDIT: cvpcb and pcbnew still fail to run

author: firewalker
author_rank: Super Contributor
timestamp: April 10, 2014, 05:13:44 pm
content: Can you check if _pcbnew.pyd exists?Alexander.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 10, 2014, 05:17:04 pm
content: Yes, it's there.

author: firewalker
author_rank: Super Contributor
timestamp: April 10, 2014, 05:29:45 pm
content: The process completed successfully? No errors at all?Alexander.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 10, 2014, 05:46:39 pm
content: No errors, I'll try to rebuild from scratch.

author: firewalker
author_rank: Super Contributor
timestamp: April 10, 2014, 06:53:55 pm
content: After manually copying *.kiface files everything seems fine for me.Alexander.

author: carloscuev
author_rank: Regular Contributor
timestamp: April 10, 2014, 10:31:10 pm
content: Nope, built from scratch and the problem persists

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 10, 2014, 10:42:22 pm
content: When I build this it feels like I am bitcoin mining.Will I find one?

author: carloscuev
author_rank: Regular Contributor
timestamp: April 10, 2014, 10:44:13 pm
content: Quote from: HackedFridgeMagnet on April 10, 2014, 10:42:22 pm

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 11, 2014, 12:41:43 am
content: Built ok, but where do I get these Kiface files?Any info on what they are do?I can see something in the commit log. But it doesn't make much sense to me.http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/4757Quote

author: carloscuev
author_rank: Regular Contributor
timestamp: April 11, 2014, 01:09:36 am
content: You can find them here:"kicad-winbuilder-3.3\build\Release\cvpcb\_cvpcb.kiface""kicad-winbuilder-3.3\build\Release\eeschema\_eeschema.kiface""kicad-winbuilder-3.3\build\Release\gerbview\_gerbview.kiface""kicad-winbuilder-3.3\build\Release\pcb_calculator\_pcb_calculator.kiface""kicad-winbuilder-3.3\build\Release\pcbnew\_pcbnew.kiface""kicad-winbuilder-3.3\build\Release\pagelayout_editor\_pl_editor.kiface"Reading that revision description you posted I'll enable USE_KIWAY_DLLS option and rebuild, wish me luck!No concrete idea about what they are for

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: April 11, 2014, 01:48:15 am
content: After I manually copied the .kiface files eeschema and pcbnew both ran, I could place components. So looking good.Although Kicad.exe crashed so still bugs on this build.from About:Application: kicadVersion: (2014-04-10 BZR 4796)-product Release buildwxWidgets: Version 3.0.0 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.1,wx containers,compatible with 2.Platform: Windows NT 6.2 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSWBoost version: 1.54.0USE_WX_GRAPHICS_CONTEXT=OFFUSE_WX_OVERLAY=OFFKICAD_SCRIPTING=ONKICAD_SCRIPTING_MODULES=ONKICAD_SCRIPTING_WXPYTHON=ONUSE_FP_LIB_TABLE=HARD_CODED_ONBUILD_GITHUB_PLUGIN=ON

author: firewalker
author_rank: Super Contributor
timestamp: April 11, 2014, 06:28:14 am
content: Carlos, how do you packet you binary? E.g. in bin.4740 I don't see any bat files for settings paths etc.Alexander.

author: firewalker
author_rank: Super Contributor
timestamp: April 11, 2014, 06:31:29 am
content: I also will try a statically linked binary (scripting disabled).Alexander.

author: firewalker
author_rank: Super Contributor
timestamp: April 11, 2014, 11:16:33 am
content: Quote from: carloscuev on April 10, 2014, 10:31:10 pmYou should copy all the dlls found on "mingw32\bin" folder to you bin directory. I tried you build and had the same error. After copying the dlls, everything seems fine.Alexander.