Build fails to find _pcbnew.pyd

Asked by Michael Wilt

C:\kicad-winbuilder-3.4>make
-- KiCad-Winbuilder V3.4
-- Build type: Release
-- Checking for environment problems
-- Checking for installed Bazaar
-- Checking for wxPython
-- Found wxPython
-- Downloading Latest Library Archive...
-- Checking for KiCad Documentation latest source
-- KiCad Documentation is up-to-date.
-- Checking for BZIP2
-- Checking for GLEW
-- Found GLEW
-- Checking for Cairo
-- Found Cairo
-- Checking for KiCad latest source code
-- Updating KiCad source code from bazaar head
-- Cleaning PCBNEW Python files to ensure good build...
-- Using KiCad Options:
-- -DKICAD_SCRIPTING=ON
-- -DKICAD_SCRIPTING_MODULES=ON
-- -DKICAD_SCRIPTING_WXPYTHON=ON
-- -DPYTHON_ROOT_DIR=C:/kicad-winbuilder-3.4/env/python
-- -DBUILD_GITHUB_PLUGIN=ON
--
 Configuring KiCad ( Release )
-- Building Release version of KiCad revision: 5215

-- 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".

Press any key to continue . . .

make_Release_stderr.log has this:
C:\kicad-winbuilder-3.4\logs>more make_Release_stderr.log
mingw32-make: *** No targets specified and no makefile found. Stop.

cmake_Release_stdout.log has this:
-- Check for installed OpenGL -- found
-- Found Glew: C:/kicad-winbuilder-3.4/src/glew-cmake/lib/libglew32.dll.a
-- Check for installed GLEW -- found
-- Check for installed Cairo -- found
-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.6")
-- Bazaar version control system version found.
-- Kicad Bazaar build version: (2014-10-22 BZR 5215)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created
-- Configuring incomplete, errors occurred!
See also "C:/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeOutput.log".
See also "C:/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeError.log".

I was thrilled to find this project because I have all sorts of conflicting stuff on this computer. I was hoping it would be totally self-contained but it seems to be fighting with something else. Any idea where to start troubleshooting this?

Mike

Question information

Language:
English Edit question
Status:
Solved
For:
kicad-winbuilder Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Wilt
Solved:
Last query:
Last reply:
Revision history for this message
wzy006 (wzy006) said :
#1

Same here

C:\kicad-winbuilder-3.4>make
-- KiCad-Winbuilder V3.4
-- Build type: Release
-- Checking for environment problems
-- Checking for installed Bazaar
-- Checking for wxPython
-- Downloading wxPython
-- Decompressing wxPython
-- Downloading Latest Library Archive...
-- Checking out KiCad Documentation source (BZR head)
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Checking for BZIP2Build phase:Apply phase:adding file 0/9323
-- Downloading BZIP2 Source
-- Building BZIP2 Library
-- Checking for GLEW
-- Downloading
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Building GLEW/s \ Build phase:Apply phase:adding file 10/17
-- GLEW build finished
-- Checking for Cairo
-- Downloading cairo-dev_1.10.2-2_win32.zip
-- Decompressing Cairo
-- Checking out KiCad source code (BZR head)
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Cleaning PCBNEW Python files to ensure good build...e 50/604
-- Using KiCad Options:
-- -DKICAD_SCRIPTING=ON
-- -DKICAD_SCRIPTING_MODULES=ON
-- -DKICAD_SCRIPTING_WXPYTHON=ON
-- -DPYTHON_ROOT_DIR=C:/kicad-winbuilder-3.4/env/python
-- -DBUILD_GITHUB_PLUGIN=ON
--
 Configuring KiCad ( Release )
-- Building Release version of KiCad revision: 5216

-- 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".

Press any key to continue . . .

---------------------------------------------------
cmake release stdout.log

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: C:/kicad-winbuilder-3.4/env/mingw-w64/mingw32/bin/gcc.exe
-- Check for working C compiler: C:/kicad-winbuilder-3.4/env/mingw-w64/mingw32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/kicad-winbuilder-3.4/env/mingw-w64/mingw32/bin/g++.exe
-- Check for working CXX compiler: C:/kicad-winbuilder-3.4/env/mingw-w64/mingw32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found wxWidgets: C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxmsw30u_gl.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxmsw30u_aui.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxmsw30u_adv.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxmsw30u_html.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxmsw30u_core.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxbase30u_net.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxbase30u.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxbase30u_xml.dll.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxpng.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxtiff.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxjpeg.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxzlib.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxregexu.a;C:/kicad-winbuilder-3.4/build/wxPython-cmake-mswu-gcc_dll_cm-3.0.0-win32/lib/gcc_dll/libwxexpat.a;opengl32;glu32;winmm;comctl32;rpcrt4;wsock32 (found suitable version "3.0.0", minimum required is "3.0.0")
-- Check for installed OpenGL -- found
-- Found Glew: C:/kicad-winbuilder-3.4/src/glew-cmake/lib/libglew32.dll.a
-- Check for installed GLEW -- found
-- Found CAIRO: C:/kicad-winbuilder-3.4/src/cairo/cairo-1.10.2-2/lib/libcairo.dll.a
-- Check for installed Cairo -- found
-- Found BZip2: C:/kicad-winbuilder-3.4/env/python/lib/libbz2.dll.a (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in C:/kicad-winbuilder-3.4/env/python/lib/libbz2.dll.a
-- Looking for BZ2_bzCompressInit in C:/kicad-winbuilder-3.4/env/python/lib/libbz2.dll.a - found
-- Performing Test GXX_HAS_VISIBILITY_FLAG
-- Performing Test GXX_HAS_VISIBILITY_FLAG - Success
-- Performing Test GXX_HAS_VISIBILITY_INLINES_FLAG
-- Performing Test GXX_HAS_VISIBILITY_INLINES_FLAG - Success
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for iso646.h
-- Looking for iso646.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for strtok_r
-- Looking for strtok_r - not found
-- Looking for malloc
-- Looking for malloc - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Looking for asinh
-- Looking for asinh - found
-- Looking for acosh
-- Looking for acosh - found
-- Looking for atanh
-- Looking for atanh - found
-- Performing Test HAVE_CMATH_ISINF
-- Performing Test HAVE_CMATH_ISINF - Success
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getc_unlocked
-- Looking for getc_unlocked - not found
-- Found PythonInterp: C:/kicad-winbuilder-3.4/env/python/python.exe (found suitable version "2.7.4", minimum required is "2.6")
-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.6")
-- Bazaar version control system version found.
-- Kicad Bazaar build version: (2014-10-22 BZR 5216)
-- Found SWIG: C:/kicad-winbuilder-3.4/env/swig/swigwin-2.0.10/swig.exe (found version "2.0.10")
-- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.8.4")
-- Configuring incomplete, errors occurred!
See also "C:/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeOutput.log".
See also "C:/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeError.log".

------------------------------------------------------------------------------------------------------------------------

cmake release std err.log
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_INCLUDE_DIR (ADVANCED)
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/bitmaps_png
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/common
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/3d-viewer
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/cvpcb
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/cvpcb
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/eeschema
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/eeschema
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/eeschema
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/eeschema
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/eeschema
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/gerbview
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/gerbview
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew/router
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew/pcad2kicadpcb_plugin
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew/github
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew/github
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew/github
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/polygon
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pagelayout_editor
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pagelayout_editor
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/potrace
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/bitmap2component
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcb_calculator
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcb_calculator
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/pcb_calculator
   used as include directory in directory C:/kicad-winbuilder-3.4/src/kicad/kicad
PYTHON_LIBRARY (ADVANCED)
    linked by target "_pcbnew" in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew
    linked by target "pcbnew_kiface" in directory C:/kicad-winbuilder-3.4/src/kicad/pcbnew

Revision history for this message
Brian Sidebotham (brian-sidebotham) said :
#2

The KiCad sources broke KiCad-Winbuilder a few commits ago. Hopefully I should have a fix for it soon. Perhaps tonight. Unfortunately it means that python cannot be found. It may be possible to edit KiCad-Winbuilder.cmake and turn the python scripting OFF and see if it works, but that's currently untested.

The real solution is to fix the KiCad sources so they once again work with a known Python-a-mingw-us installation path.

Best Regards,

Brian.

Revision history for this message
Michael Wilt (z-mike-l) said :
#3

Getting python scripting into the Windows version is my primary reason for building this. Please let me know if you are able to get this working or if you know of another idea I should try.

Mike

Revision history for this message
wzy006 (wzy006) said :
#4

I dig it a little more.

When I type in console:
1. C:\kicad-winbuilder-3.4 > setenv.bat
2. C:\kicad-winbuilder-3.4> cd env\python
3. C:\kicad-winbuilder-3.4\env\python> python

It enter python and then exit automatically:
---------------------------------------------------------------------------------------------------
C:\kicad-winbuilder-3.4\env\python>python
Python 2.7.4 (default, Mar 18 2013, 12:04:44) [gcc] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

C:\kicad-winbuilder-3.4\env\python>
---------------------------------------------------------------------------------------------------
4. if I add -v -U
C:\kicad-winbuilder-3.4\env\python>python -v -U

It gave more information as blew
------------------------------------------------------------------------------------------------------

C:\kicad-winbuilder-3.4\env\python>python -v -U
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:\kicad-winbuilder-3.4\env\python\pylib\site.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\site.py
import site # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\site.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\os.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\os.py
import os # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\os.pyc
import errno # builtin
import nt # builtin
# C:\kicad-winbuilder-3.4\env\python\pylib\ntpath.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\ntpath.py
import ntpath # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\ntpath.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\stat.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\stat.py
import stat # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\stat.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\genericpath.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\genericpath.py
import genericpath # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\genericpath.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\warnings.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\warnings.py
import warnings # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\warnings.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\linecache.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\linecache.py
import linecache # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\linecache.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\types.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\types.py
import types # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\types.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\UserDict.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\UserDict.py
import UserDict # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\UserDict.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\_abcoll.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\_abcoll.py
import _abcoll # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\_abcoll.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\abc.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\abc.py
import abc # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\abc.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\_weakrefset.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\_weakrefset.py
import _weakrefset # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\_weakrefset.pyc
import _weakref # builtin
# C:\kicad-winbuilder-3.4\env\python\pylib\copy_reg.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\copy_reg.py
import copy_reg # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\copy_reg.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\traceback.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\traceback.py
import traceback # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\traceback.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\sysconfig.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\sysconfig.py
import sysconfig # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\sysconfig.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\re.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\re.py
import re # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\re.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\sre_compile.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\sre_compile.py
import sre_compile # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\sre_compile.pyc
import _sre # builtin
# C:\kicad-winbuilder-3.4\env\python\pylib\sre_parse.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\sre_parse.py
import sre_parse # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\sre_parse.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\sre_constants.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\sre_constants.py
import sre_constants # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\sre_constants.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\locale.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\locale.py
import locale # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\locale.pyc
import encodings # directory C:\kicad-winbuilder-3.4\env\python\pylib\encodings
# C:\kicad-winbuilder-3.4\env\python\pylib\encodings\__init__.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\encodings\__init__.py
import encodings # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\encodings\__init__.pyc
# C:\kicad-winbuilder-3.4\env\python\pylib\codecs.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\codecs.py
import codecs # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\codecs.pyc
import _codecs # builtin
# C:\kicad-winbuilder-3.4\env\python\pylib\encodings\aliases.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\encodings\aliases.py
import encodings.aliases # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\encodings\aliases.pyc
import operator # dynamically loaded from C:\kicad-winbuilder-3.4\env\python\dll\operator.pyd
# C:\kicad-winbuilder-3.4\env\python\pylib\functools.pyc matches C:\kicad-winbuilder-3.4\env\python\pylib\functools.py
import functools # precompiled from C:\kicad-winbuilder-3.4\env\python\pylib\functools.pyc
import _functools # dynamically loaded from C:\kicad-winbuilder-3.4\env\python\dll\_functools.pyd
import _locale # dynamically loaded from C:\kicad-winbuilder-3.4\env\python\dll\_locale.pyd
Traceback (most recent call last):
  File "C:\kicad-winbuilder-3.4\env\python\pylib\site.py", line 563, in <module>
    main()
  File "C:\kicad-winbuilder-3.4\env\python\pylib\site.py", line 552, in main
    aliasmbcs()
  File "C:\kicad-winbuilder-3.4\env\python\pylib\site.py", line 477, in aliasmbcs
    import locale, codecs
  File "C:\kicad-winbuilder-3.4\env\python\pylib\locale.py", line 344, in <module>
    for x in range(256)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] functools
# cleanup[1] encodings
# cleanup[1] sysconfig
# cleanup[1] operator
# cleanup[1] abc
# cleanup[1] _weakrefset
# cleanup[1] sre_constants
# cleanup[1] re
# cleanup[1] _codecs
# cleanup[1] nt
# cleanup[1] _warnings
# cleanup[1] zipimport
# cleanup[1] codecs
# cleanup[1] _functools
# cleanup[1] _locale
# cleanup[1] signal
# cleanup[1] traceback
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[1] _weakref
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[1] sre_parse
# cleanup[2] copy_reg
# cleanup[2] types
# cleanup[2] errno
# cleanup[2] _abcoll
# cleanup[2] ntpath
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] warnings
# cleanup[2] UserDict
# cleanup[2] linecache
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 19 unfreed ints
# cleanup floats

C:\kicad-winbuilder-3.4\env\python>
---------------------------------------------------------------------------------------------------------------------

I am very confused that why python did not enter interactive environment. Is that expected?

or UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128) make it exit?

later I tested in another computer, it raised UnicodeDecodeError exception, but it did not exit and stayed in interactive mode with normal pyton prompt.

Revision history for this message
wzy006 (wzy006) said :
#5

Also I found in cmake release stdout.log

-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.6")
-- Bazaar version control system version found.

This line
-- Python module install path: Lib/site-packages

I believe it should be
-- Python module install path: C:/kicad-winbuilder-3.4/env/python/Lib/site-packages

but somehow cmake did not put full path to it.

Any idea?

Revision history for this message
kinichiro inoguchi (kinichiro) said :
#6

Hi,

I encountered this problem, too.
And I could find a workaround.

It seems that cmake fails at KiCadWinbuilder.cmake line 892 (at execute_process()),
caused by lacking of PYTHON_INCLUDE_DIR definition.

I added PYTHON_INCLUDE_DIR to KOPT, like this (after line 867);

    set( KOPT ${KOPT} -DPYTHON_INCLUDE_DIR=${CMAKE_SOURCE_DIR}/env/python/include )

then, make.bat doesn't stop and keep on running.

I would like to know that if this is a right resolution or not.

Thanks.

Revision history for this message
jbeale (beale) said :
#7

I added PYTHON_INCLUDE_DIR to KOPT, like this (after line 867);
    set( KOPT ${KOPT} -DPYTHON_INCLUDE_DIR=${CMAKE_SOURCE_DIR}/env/python/include )

I don't know if it's right, but I had the same problem, and after adding that line, at least the compile process is still working away an hour later...

Revision history for this message
Michael Wilt (z-mike-l) said :
#8

That worked for me. Thank you!

Revision history for this message
jbeale (beale) said :
#9

It worked, after about 2.5 hours compiling I now seem to have a working version of KiCad "Build: (2014-10-24 BZR 5221)-product" on 32 bit WinXP. At least I could open an old KiCad .brd file dating from 2011 and play with the new CERN router features. Thank you!

Revision history for this message
wzy006 (wzy006) said :
#10

That looks working for me too. It is compiling now. Thanks.

Revision history for this message
wzy006 (wzy006) said :
#11

Compile and install kicad with no problem! The first run, it complained that "The procedure entry point__gxx_personality_sj0 could not be located in the dynamic link library libstdc++-6.dll. Copying this file from C:\kicad-winbuilder-3.4\env\mingw-w64\mingw32\i686-w64-mingw32\lib to kicad\bin solved the issue. Thanks everyone helped. It works now.

Zhenyi

Revision history for this message
Brian Sidebotham (brian-sidebotham) said :
#12

This is now fixed in the KiCad code, so there's no need to change anything in KiCad-Winbuilder.cmake

Brian.

Revision history for this message
Paolo (prox) said :
#13

I have the same problem building latest revision 5253. It says:
CMakeFiles\Makefile2:780: recipe for target 'cvpcb/CMakeFiles/cvpcb_kiface.dir/all' failed
I also tried the fix suggested by kinichiro but it did not work.

Paolo.

-- Building Release version of KiCad revision: 5253

[ 1%] Built target boost
[ 30%] Built target bitmaps
[ 30%] Built target page_layout_lexer_source_files
[ 30%] Built target lib-dependencies
[ 30%] Built target netlist_lexer_source_files
[ 37%] Built target common
[ 37%] Built target fp_lib_table_lexer_source_files
[ 37%] Generating headers containing GLSL source code
[ 37%] Built target shader_headers
[ 39%] Built target gal
[ 39%] Built target pcb_lexer_source_files
[ 39%] Built target pcb_plot_lexer_source_files
[ 39%] Built target specctra_lexer_source_files
[ 43%] Built target pcbcommon
[ 44%] Built target 3d-viewer
[ 44%] Built target polygon
[ 45%] Built target pcad2kicadpcb
[ 46%] Built target openssl
[ 47%] Built target avhttp
[ 47%] Built target github_plugin
CMakeFiles\Makefile2:780: recipe for target 'cvpcb/CMakeFiles/cvpcb_kiface.dir/a
ll' failed
Makefile:115: recipe for target 'all' failed
-- 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".

Revision history for this message
Stefan Krueger (z-mail-i) said :
#14

Hi :-)

i tried to update my KiCad with the Winuilder and also got this error:
________________________________________________________________________________________________________________
C:\_KICAD\kicad-winbuilder-3.4> ./make.bat
-- KiCad-Winbuilder V3.4
-- Build type: Release
-- Checking for environment problems
-- Checking for installed Bazaar
-- Checking for wxPython
-- Downloading wxPython
-- Decompressing wxPython
-- Downloading Latest Library Archive...
-- Checking out KiCad Documentation source (BZR head)
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Checking for BZIP2Build phase:Apply phase:adding file 0/9338
-- Downloading BZIP2 Source
-- Building BZIP2 Library
-- Checking for GLEW
-- Downloading
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Building GLEW/s \ Build phase:Apply phase:adding file 10/17
-- GLEW build finished
-- Checking for Cairo
-- Downloading cairo-dev_1.10.2-2_win32.zip
-- Decompressing Cairo
-- Checking out KiCad source code (BZR head)
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
-- Cleaning PCBNEW Python files to ensure good build...e 60/622
-- Using KiCad Options:
-- -DKICAD_SCRIPTING=ON
-- -DKICAD_SCRIPTING_MODULES=ON
-- -DKICAD_SCRIPTING_WXPYTHON=ON
-- -DPYTHON_ROOT_DIR=C:/_KICAD/kicad-winbuilder-3.4/env/python
-- -DBUILD_GITHUB_PLUGIN=ON
--
 Configuring KiCad ( Release )
-- Building Release version of KiCad revision: 5447

-- Installing KiCad locally. Use RunKiCad.bat to run this version
CMake Error at KiCadWinbuilder.cmake:1040 (file):
  file COPY cannot find
  "C:/_KICAD/kicad-winbuilder-3.4/kicad/bin/pylib/_pcbnew.pyd".

Drücken Sie eine beliebige Taste . . .
C:\_KICAD\kicad-winbuilder-3.4>
________________________________________________________________________________________________________________
cmake_Release_stdout.log
...
-- Looking for getc_unlocked
-- Looking for getc_unlocked - not found
-- Found PythonInterp: C:/_KICAD/kicad-winbuilder-3.4/env/python/python.exe (found suitable version "2.7.4", minimum required is "2.6")
-- Check for installed Python Interpreter -- found
-- Python module install path: Lib/site-packages
-- Found PythonLibs: C:/_KICAD/kicad-winbuilder-3.4/env/python/libpython2.7.dll (found suitable version "2.7.4", minimum required is "2.6")
-- Configuring incomplete, errors occurred!
See also "C:/_KICAD/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeOutput.log".
See also "C:/_KICAD/kicad-winbuilder-3.4/build/Release/CMakeFiles/CMakeError.log".
________________________________________________________________________________________________________________

i will try the mentioned fix -
is there some other way to test what the course of this is?

sunny greetings stefan

Revision history for this message
Stefan Krueger (z-mail-i) said :
#15

hey - i tried the fix - but it did not work.
same error again.

Revision history for this message
Andy Peters (devel-latke) said :
#16

I get that "cannot find _pcbnew.pyd" error, too. I tried the fix noted above but no love.
Running Winbuilder 3.4-2.

Revision history for this message
Rolf Madsen (rolfrm) said :
#17

I have the same issue, "cannot find _pcbnew.pyd", but it still cannot compile kicad when scripting is disabled.

Revision history for this message
Andy Peters (devel-latke) said :
#18
Revision history for this message
Rolf Madsen (rolfrm) said :
#19

Thanks, it seems to work! :)