kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #13779
Re: Build 4955 - Failed to load shared library
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
Follow ups
References