Winbuilder error "can't find _pcbnew.pyd" [SOLVED]

Hi,
It’s been a great idea to start this KiCad site - thank you, Chris!

I tried to install the latest KiCad version on a Windows 7 Pro (64 Bit) system by using kicad-winbuilder-3.4.2.7z - unfortunately with no luck:

  • extracted to C:\
  • started C:\kicad-winbuilder-3.4\make
  • script went for quite some time and then stopped with the following message:

    Configuring KiCad ( Release )
    – Building Release version of KiCad revision: 5217
    – Installing KiCad locally. Use RunKiCad.bat to run this version
    CMake Error at KiCadWinbuilder.cmake:1040 (file):
    file COPY cannot find
    “C:/kicad-winbuilder-3.4/kicad/bin/pylib/_pcbnew.pyd”.

Well, that’s true. In fact there is no _pcbnew.pyd in the whole C:\kicad-winbuilder-3.4 directory tree.
I tried this several times - as restricted user as well as admin - always getting the same error. Any ideas of what I might doing wrong?

KiCad-Winbuilder is currently broken, due to upstream changes. The maintainer knows about the bug, but hasn’t had a chance to fix it yet.

https://lists.launchpad.net/kicad-developers/msg15399.html

1 Like

Thanks for the info! That explains why it worked a few weeks ago when I tried the same on my notebook.

Yeah, it’s the biggest “problem” with KiCad-Winbuilder. It works great, but if you don’t understand what it’s doing, you kind of take it for granted, and don’t understand the errors it generates. If you plan on using it, I recommend checking the developer’s mailing list often.

I do know that plans for a “Stable” release are being made, so in the future you won’t need to build from scratch, but I don’t know when that might happen.

I was aware of this risk, but gave it a try as the current stable release seemed a bit outdated. I’ll wait until the problem is solved and do the first steps into KiCad on the notebook. Thanks for directing me to the developer’s mailing list. It makes sense to follow the discussion there, too.

You can probably copy the whole directory from the notebook over, or possibly just share the directory and run over the network, but it’ll be slow to open the executables. Once it’s running it’d be fine, since everything would be in RAM by that point.

If you’re feeling adventurous you can also try to modify KiCad-Winbuilder to build a specific revision, and try to find the one that broke, but that might be more work than is worthwhile since I suspect it’ll be fixed in a couple of days anyways.

1 Like

Hmm, 109916 elements in the directory tree. Might be more of “insane” than “adventurous” for a total KiCad newbie like me trying to fix this. :wink:
But your hint to copy the beast did the trick! :sunny: Thank you very much!

No worries, glad it helped.

There’s a lot of stuff in the KiCad tree, but most of it can be ignored for a “newbie” just trying to get it to compile. This is actually a great reason to learn cmake, if only to read the KiCad-Winbuilder script, and understand what it’s doing. It’s long, but that’s more because cmake is a fairly verbose language, not necessarily because it’s doing a lot of crazy complex stuff.

Good to know. But for now I’m glad it’s running on my two monitor system and I’m going to learn the basics of KiCad from Chris tutorial…

Just tried it again with same version of KiCad-Winbuilder and the current KiCad build 2014-11-02 BZR 5250 and it worked. :slight_smile:

It seems to be an intermittend failure. Worked for several versions in the last few weeks but failed today. Just wait and try again later!

In case you have a working KiCAD version installed and just do an update you might be left with working but mixed versions of the programs within the suite.

See also


and

i had build kicad successfully in december…
(2014-12-26 BZR 5338)
and now i had the idea to upgrade…
no luck - the script / source is not building at the moment…
same error as mentioned by Frank.

so i will have to wait… :smile:
(don’t have time to learn cmake at the moment)

sunny greetings
stefan

Hi Stefan,

Yes, the building process still breaks from time to time. As a workaround I installed kicad on two machines. One is my main kicad workstation and the other is a notebook which isn’t used for kicad very often.

When I want to update kicad I always try it on the notebook first. Only if this is successful I update the main workstation, too. Well, that’s definitely not the smartest solution, but hey …

I had a version running fine, then got that error. There was advice from a thread on Winbuilder to delete the directory tree and start fresh which I did, and it built fine.

It is thousands of files, and the delete took ages (let alone the downloading again) but the result was worth it.

Hope you find same,
Geoff

Yes, actually this isn’t related to kicad code but to misbehaving launchpad bzr versioning system, and it is a very well known annoyance…

Hmm, that’s interesting. I just deleted the whole winbuilder directory and started from scratch again as I did several times when I faced this problem for the first time. And it still leads to the same problem. What am I missing here?

My last few attempts were failing as well, but the message is misleading.The last build I tried was rev 5455, and it turns out that something happened that wxpython was not installed/found properly in the build environment and the configuration step was failing (not the compilation). Disabling the wx python scripting allowed the build to succeed. Try disabling the option in the WinBuilder cmake file.

For reference my version string is

Application: kicad
Version: (2015-02-27 BZR 5455)-product Release build
wxWidgets: Version 3.0.0 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.2,wx containers,compatible with 2.8)
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON
         KICAD_USE_WEBKIT=OFF

I’ve been having this problem for several weeks. I thought I’d reply with a solution that was given by Brian Sidebotham back on Feb 16th (which I just found):

...edit setenv.bat and change line 57 to read:

SET PYTHONPATH=%PYTHONHOME%;%CD%\build\wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32\wxpython

I did this and was able to build the latest version of kicad.

2 Likes

Yes, this worked great! I built bzr 5466 last night. Thank you!

That did the trick! Thank you for sharing this info. :smile:

Edit: Worked perfect on my notebook, but failed on my desktop. There seems to be another condition that has to be met.

Edit 2: Additionally I had to delete the complete …\src directory before starting make. After that it worked great!