← Back to team overview

kicad-developers team mailing list archive

Re: Build 4955 - Failed to load shared library

 

Thanks for the feedback.

Regarding Python, the PYTHONHOME and PYTHONPATH variables I believe are set
in setenv.bat

SET PATH_ENV_BASE=%CD%\env
SET PATH_PY=%PATH_ENV_BASE%\python
SET PYTHONHOME=%PATH_PY%
SET PYTHONPATH=%PYTHONHOME%

When I look in ./env/python, I see python.exe and its associated dll.
Python works when I execute from within the home path, so I believe that
should be ok.

The options set by the makefile (shown during build process) are:

KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
PYTHON_ROOT_DIR=Y:/Kicad_Buid/kicad- ... (I have a screenshot of the
compile & rest is cut off, but assume this is OK)
BUILD_GITHUB_PLUGIN=ON

One item to note: the help/documentation portion of the compile failed -
something I was not concerned about.   Is the help necessary for proper a
proper load of the binary?

====

My previous email did not display all files in the bin directory as I was
focused on the "_*.kiface" files.  The full listing (which shows python and
other dlls landed fine) is as follows:


 Directory of Y:\Kicad_Build\kicad-winbuilder-3.4\kicad\bin
06/26/2014  05:20 PM    <DIR>          .
06/26/2014  05:20 PM    <DIR>          ..
06/26/2014  05:19 PM           803,328 bitmap2component.exe
06/26/2014  05:19 PM           434,176 cvpcb.exe
06/26/2014  05:20 PM    <DIR>          dll
06/26/2014  05:19 PM           854,016 dxf2idf.exe
06/26/2014  05:19 PM           485,888 eeschema.exe
06/26/2014  05:19 PM           485,376 gerbview.exe
06/26/2014  05:19 PM           436,736 idf2vrml.exe
06/26/2014  05:19 PM            57,344 idfcyl.exe
06/26/2014  05:19 PM            46,080 idfrect.exe
06/26/2014  09:42 AM    <DIR>          include
06/26/2014  05:19 PM           938,496 kicad.exe
06/26/2014  09:42 AM    <DIR>          lib
06/26/2014  02:24 AM           114,710 libbz2.dll
04/13/2013  05:06 PM         1,863,207 libpython2.7.dll
06/26/2014  05:19 PM           485,888 pcbnew.exe
06/26/2014  05:19 PM           485,376 pcb_calculator.exe
06/26/2014  05:19 PM           434,688 pl_editor.exe
06/26/2014  05:20 PM    <DIR>          pylib
04/13/2013  05:06 PM            97,183 python.exe
06/26/2014  09:42 AM    <DIR>          scripting
06/26/2014  05:20 PM         3,789,000 wxbase300u_gcc_cm.dll
06/26/2014  05:20 PM           501,053 wxbase300u_net_gcc_cm.dll
06/26/2014  05:20 PM           285,311 wxbase300u_xml_gcc_cm.dll
06/26/2014  05:20 PM         3,168,534 wxmsw300u_adv_gcc_cm.dll
06/26/2014  05:20 PM         1,044,179 wxmsw300u_aui_gcc_cm.dll
06/26/2014  05:20 PM        10,494,221 wxmsw300u_core_gcc_cm.dll
06/26/2014  05:20 PM           270,107 wxmsw300u_gl_gcc_cm.dll
06/26/2014  05:20 PM         1,537,596 wxmsw300u_html_gcc_cm.dll
06/26/2014  05:20 PM           320,341 wxmsw300u_media_gcc_cm.dll
06/26/2014  05:20 PM         1,621,339 wxmsw300u_propgrid_gcc_cm.dll
06/26/2014  05:20 PM           874,639 wxmsw300u_ribbon_gcc_cm.dll
06/26/2014  05:20 PM         2,662,331 wxmsw300u_richtext_gcc_cm.dll
06/26/2014  05:20 PM         3,153,480 wxmsw300u_stc_gcc_cm.dll
06/26/2014  05:20 PM           476,055 wxmsw300u_webview_gcc_cm.dll
06/26/2014  05:20 PM         2,379,160 wxmsw300u_xrc_gcc_cm.dll
06/26/2014  05:19 PM         6,596,731 _cvpcb.kiface
06/26/2014  05:19 PM         6,728,036 _eeschema.kiface
06/26/2014  05:19 PM         2,771,868 _gerbview.kiface
06/26/2014  05:19 PM        17,465,298 _pcbnew.kiface
06/26/2014  05:20 PM        17,442,611 _pcbnew.pyd
06/26/2014  05:19 PM         2,219,655 _pcb_calculator.kiface
06/26/2014  05:19 PM         2,463,434 _pl_editor.kiface

    Since the initial report, I rolled over to build 4956 - still see the
same error.

    I can try KICAD_SCRIPTING_WXPYTHON=OFF as a debug step.

Regards,
Jason



On Fri, Jun 27, 2014 at 9:31 AM, jp charras <jp.charras@xxxxxxxxxx> wrote:

> Le 27/06/2014 15:46, Dick Hollenbeck a écrit :
> > On 06/26/2014 04:14 PM, Jason Whiteman wrote:
> >> Team,
> >>
> >>      I am new to the dev group and have compiled my first windows
> binaries today based on
> >> what was pulled using kicad-winbuilder-3.4 (Kicad BZR build 4955).
> >>
> >>      The binaries were created fine - and I was able to load kicad.exe
> using RunKicad.bat
> >>
> >>      My issue is the error:
> >>
> >>      Failed to load shared library
> >>      'Y:\Kicad_Build\kicad-winbuilder-3.4\kicad\bin\_pcbnew.kiface'
> (error 0: the
> >> operation completed successfully.)
> >>
> >>       I have searched for this error and see it is not uncommon.
>  However, in all threads
> >> I have read - the problem was with the makefile failing to copy the
> _*.kiface files to the
> >> kicad/bin directory.  This is not the case here.  I see the files have
> landed there:
> >>
> >>  Directory of Y:\Kicad_Build\kicad-winbuilder-3.4\kicad\bin
> >> 06/26/2014  01:59 PM         6,596,731 _cvpcb.kiface
> >> 06/26/2014  01:59 PM         6,728,781 _eeschema.kiface
> >> 06/26/2014  01:59 PM         2,771,868 _gerbview.kiface
> >> 06/26/2014  01:59 PM        17,465,298 _pcbnew.kiface
> >> 06/26/2014  01:59 PM         2,219,655 _pcb_calculator.kiface
> >> 06/26/2014  01:59 PM         2,463,434 _pl_editor.kiface
> >>
> >>        EEschema can load, pcb_calculator loads, bitmap2component loads,
>  gerbview loads.
> >> However both PCBNew and CvPCB fail with the "shared library" error.
> >>
> >>        No directory contains a space.  I have checked the permissions
> of _pcbnew.kiface
> >> (which is complained as not found) and _eeschema.kiface (which has no
> complaints when
> >> loading eeschema.exe) and see no differences in permissions.  I am
> attempting to load as
> >> administrator.
> >>
> >>        Given the software is reporting a missing file that exists, what
> is the issue?
> >>
> >>        Not that it necessarily makes any difference, but I am using the
> >> bzr-win-zip-2.6b1-1 binaries to pull (checkout) the source.  This is
> not the cause of any
> >> issue since building was not a problem.
> >>
> >> Regards,
> >> Jason
> >
> >
> > What should work is described below.  I do not know why it is not
> working for you, you
> > will have to determine that.
> >
> > The program is a process.  The process consists on Windows of an *.exe
> and one or more
> > DLLs.  For all but kicad.exe, there may be one kicad DLL which has the
> *.kiface file
> > extension.  So pcbnew.exe will have its DLL named _pcbnew.kiface.
>  eeschema.exe will have
> > _eeschema.kiface.
> >
> > kicad.exe may also use _pcbnew.kiface, but can also use _eeschema.kiface
> concurrently or
> > alone as well, plus others.
> >
> > The *.kiface files are found by examining the full path of the *.exe
> from within the *.exe
> > code.  That path is used to find the *.kiface file(s).
> >
> >
> > This means that if you want to run kicad.exe, then all the *.kiface
> files that you will be
> > loading must also be in that same directory.
> >
> > On linux if I do this from /usr/local/bin:
> >
> >   $ dir kicad pcbnew eeschema *.kiface
> >
> > _cvpcb.kiface  eeschema  _eeschema.kiface  _gerbview.kiface  kicad
>  _pcb_calculator.kiface
> >  pcbnew  _pcbnew.kiface  _pl_editor.kiface
> >
> >
> > they all show in the same directory on linux, where kicad.exe is named
> kicad.
> >
> > Take care that you are then actually launching the copy of kicad.exe
> that you think you
> > are.  Maybe do it from the command line with full path as a test without
> the batch file,
> > then examine what the batch file is doing in comparison.
> >
> > If you verify all the pieces are in place and it still fails with that
> same curious error
> > message, we'll have to look at the wxWidgets code in more detail.
> >
> > That error message is a bit curious, as it essentially says that it
> succeeded.  At that
> > point we'd need to roll up our sleeves on Windows.
> >
> >
> > Dick
>
> Jason ,
>
> Winbuilder build Kicad with option KICAD_SCRIPTING_WXPYTHON=ON.
> Therefore Cvpcb and mainly Pcbnew need wxPython and Python libs.
>
> If only Pcbnew (and Cvpcb) does not run ( _pcbnew.kiface exists but
> fails) I am pretty sure you have an issue with python (_pcbnew.kiface
> runs OK, but fails when trying to load python libraries or wxPython libs).
>
> kicad/bin *should contain* python and wxPython files (at least
> python.exe, libpython2.7.dll ./dll, ./lib, ./pylib) which are installed
> by winbuilder.
> FYI on my PC, wxPython libs are in <winbuilder>\kicad\bin\pylib\wx
>
> Moreever PYTHONHOME and PYTHONPATH should be set.
> This is mainly the purpose of lines:
> SET PYTHONHOME=%CD%
> SET PYTHONPATH=%CD%
> in RunKicad.bat.
>
> If you edit KicadWinBuilder.cmake and set
> KICAD_SCRIPTING_WXPYTHON=OFF
> and rebuild Kicad, Pcbnew and Cvpcb binaries do not use python at load
> time and should run.
>
> However, if there is an issue in python installation, footprint wizards
> and other python scripts will not run.
>
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References