Author Topic: Building KiCAD for Windows  (Read 31337 times)

0 Members and 1 Guest are viewing this topic.

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: gb
Building KiCAD for Windows
« on: August 13, 2011, 10:32:10 am »
To build the latest snapshot of KiCAD follow these instructions

http://tech.groups.yahoo.com/group/kicad-users/message/10163

You can get CMake from here:
http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.exe

You 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 for
you 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 can
run both tools from the command line.

Start a command prompt (Usually Start -> All Programs -> Accessories
-> Command Prompt). Use cd (Change Directory) to navigate to the
folder where you wish to have the kicad-winbuilder directory and use
Bazaar to get the script:

bzr branch lp:kicad-winbuilder

After the script has been fetched, enter the directory containing the script:

cd kicad-winbuilder

Then use cmake to run the script:
cmake -P KiCadWinbuilder.cmake

answer the question to whoami with your name and email address.

It should build KiCad and you should end up with a sub-directory
called bin which contains the latest executables.

Happy building.

David.

P.S Here is the Launchpad site for the Kicad-Winbuilder script

https://launchpad.net/kicad-winbuilder


« Last Edit: February 04, 2012, 06:52:15 pm by djsb »
David
Hertfordshire,UK
 University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor.  http://debuggingrules.com/ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #1 on: August 13, 2011, 01:12:44 pm »
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 at http://www.lis.inpg.fr/realise_au_lis/kicad/ seems to be permanently busted.

Richard
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: gb
Re: Building KiCAD for Windows
« Reply #2 on: August 13, 2011, 01:51:13 pm »
You can view all the changes on the Launchpad page here

http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/changes/3067?start_revid=3067

I'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.
David
Hertfordshire,UK
 University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor.  http://debuggingrules.com/ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #3 on: August 13, 2011, 02:31:19 pm »
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.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #4 on: May 16, 2012, 07:39:46 am »
Very nice! How about if I need 1 or 2 earlier revisions than latest?
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #5 on: May 16, 2012, 12:37:36 pm »
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 is

http://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.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #6 on: May 16, 2012, 04:37:51 pm »
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.
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #7 on: May 24, 2012, 12:03:26 pm »
I couldn't build recently.

I had to get the build script again with

Quote
bzr branch lp:kicad-winbuilder

The new script built OK.

Richard.
 

Offline exodia

  • Contributor
  • Posts: 40
Re: Building KiCAD for Windows
« Reply #8 on: June 27, 2012, 05:57:01 pm »
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?
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #9 on: July 01, 2012, 02:54:47 am »
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?
Just 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-winbuilder

You could just delete all old KiCad build files and start from scratch.

Richard.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #10 on: August 31, 2012, 07:25:19 pm »
Hello, I got this error:



In the logs:

mingw32-make: *** No rule to make target '....libgcc_libmswuwx', needed by 'setup_h'.  Stop.

Any Idea?
« Last Edit: August 31, 2012, 07:47:17 pm by carloscuev »
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: gb
Re: Building KiCAD for Windows
« Reply #11 on: August 31, 2012, 09:11:16 pm »
Try deleting the winbuilder script and then re-fetch it using the original instructions. This should work.
David
Hertfordshire,UK
 University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor.  http://debuggingrules.com/ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #12 on: August 31, 2012, 11:07:32 pm »
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...
 

Online amspire

  • Super Contributor
  • ***
  • Posts: 3638
  • Country: au
Re: Building KiCAD for Windows
« Reply #13 on: September 01, 2012, 07:43:57 am »
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...
I 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
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #14 on: September 03, 2012, 07:20:12 am »
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.
« Last Edit: September 03, 2012, 07:31:02 am by carloscuev »
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: gb
Re: Building KiCAD for Windows
« Reply #15 on: September 03, 2012, 07:54:51 am »
Join this yahoo group

http://tech.groups.yahoo.com/group/kicad-users/

and explain the problem. A developer should be able to help you.
David
Hertfordshire,UK
 University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor.  http://debuggingrules.com/ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #16 on: September 03, 2012, 12:19:57 pm »
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
 

Offline hairykiwi

  • Contributor
  • Posts: 21
  • Country: gb
Re: Building KiCAD for Windows
« Reply #17 on: October 21, 2012, 03:52:44 pm »
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:
...



...

The short answer is, even though I did as instructed:
Quote
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 can
run both tools from the command line.
the 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:

EDIT:
*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.dll
ModVer: 0.0.0.0    Offset: 00041788


EDIT 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
« Last Edit: October 21, 2012, 09:17:12 pm by hairykiwi »
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: gb
Re: Building KiCAD for Windows
« Reply #18 on: October 21, 2012, 09:19:14 pm »
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.
David
Hertfordshire,UK
 University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor.  http://debuggingrules.com/ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 

Offline hairykiwi

  • Contributor
  • Posts: 21
  • Country: gb
Re: Building KiCAD for Windows
« Reply #19 on: October 21, 2012, 09:32:19 pm »
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

« Last Edit: November 14, 2012, 06:30:58 pm by hairykiwi »
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #20 on: November 14, 2012, 05:32:00 pm »
Is it just me or current rev 3800 doesn't compliles using kicadwinbuilder script?

I've attached error logs.
 

Offline poptones

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: 00
Re: Building KiCAD for Windows
« Reply #21 on: November 14, 2012, 05:45:11 pm »
There isn't an exe file you can just download? I thought you used windows because it was easy :) If you have to compile it anyway, why not run a VM? That's what I do for my windows crap.
 

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Building KiCAD for Windows
« Reply #22 on: November 14, 2012, 06:07:33 pm »
There isn't an exe file you can just download? I thought you used windows because it was easy :) If you have to compile it anyway, why not run a VM? That's what I do for my windows crap.

I 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 :)
 

Offline hairykiwi

  • Contributor
  • Posts: 21
  • Country: gb
Re: Building KiCAD for Windows
« Reply #23 on: November 14, 2012, 06:42:24 pm »
In my initial post, I incorrectly determined the cause of my build problem being due to mingw/bin directory NOT being 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!
 

Offline poptones

  • Frequent Contributor
  • **
  • Posts: 711
  • Country: 00
Re: Building KiCAD for Windows
« Reply #24 on: November 14, 2012, 06:55:16 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf