I would like to install KICAD on a portable USB drive. I have an other portable install, but it is old and does not use the new PCB format.
I can extract the files from the version 4 installer with 7zip and run all of the exe’s except for pcbnew and the footprint editor. eeschema works fine as well as gerbview and kicad.exe,
I think pcbnew is not finding some python libraries or the wx libraries. Here is the error:
11:59:43: Failed to load shared library ‘I:\PA\PortableApps\kicad\bin_pcbnew.kiface’ (error 0: the operation completed successfully.)
11:59:45: IO_ERROR: Fatal Installation Bug. File:
‘I:\PA\PortableApps\kicad\bin_pcbnew.kiface’
could not be loaded
Perhaps a shared library (.dll or .so) file is missing.
From command line: argv[0]:
‘I:\PA\PortableApps\kicad\bin\kicad.exe’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.2/common/kiway.cpp : KiFACE() : line 225
_pcbnew.kiface is in the location the error describes so the message does not help me much.
It is likely something something simple, like a path or env variable. Any ideas?
I am not sure how copy/paste failed, but I did it again and the path separator between “bin” and “_pcbnew” is there. I do have a 2011 version of KICAD that is portable and works great, but is now outdated because of the new formats. Like I said, I can run all of the exe’s except for pcbnew and the footprint editor. eeschema works fine as well as gerbview and kicad.exe.
What is pcbnew and footprint using that the others are not? If I could figure that out, I might be able to get it to work. The error message is too vague to figure out.
Thanks for the help.
14:47:49: Failed to load shared library ‘I:\PA\PortableApps\kicad\bin_pcbnew.kiface’ (error 0: the operation completed successfully.)
14:47:49: IO_ERROR: Fatal Installation Bug. File:
‘I:\PA\PortableApps\kicad\bin_pcbnew.kiface’
could not be loaded
Perhaps a shared library (.dll or .so) file is missing.
From command line: argv[0]:
‘I:\PA\PortableApps\kicad\bin\pcbnew.exe’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.2/common/kiway.cpp : KiFACE() : line 225
If you launch everything from the KiCad GUI I don’t understand what’s going wrong. The message complains “error 0: the operation completed successfully”. The only thing I can imagine is a bug in the Windows dynamic loader. I have seen this problem before when software must be run from the primary drive to work. I never understood what the issue was because software would run OK and then one time it just stops working and refuses to run unless it’s copied to somewhere on c:\
If you have an event log viewer you may find a little more information in the Windows Event Log (if anything at all was recorded there).
Other possibilities are bad dependencies; you may need to copy a number of other Windows run-time files to the directory with kicad.exe to ensure the correct versions are found. A “Dependency Walker” tool might help you work out which files you need. As long as the problem isn’t due to a difference in a core system module like kernel.dll you may be able to fix it.
The dependency walker was a great idea. I kicad.exe loaded beautifully. However the profiler red-lined the following loading PCBNEW:
LoadLibraryW(“i:\pa\portableapps\kicad\bin_pcbnew.kiface”) returned NULL. Error: %1 is not a valid Win32 application (193).
So it found _pcbnew.kiface but says it is not valid. Perhaps it is corrupted? This the MD5 sum of my version from kicad-product-4.0.2-x86_64.exe: a14532571e466939fe6c33f627e0c667 *_pcbnew.kiface
Interestingly, I profiled eeschema and it loaded _eeschema.kiface perfectly.
Could you check the md5sum of _pcbnew.kiface with what I show? I have extracted the files many times so it is not a one-time error.
These settings are stored in %USERPROFILE%/AppData/Roaming/kicad path. You can try to override this variable to removable drive. But I heard this method could be problematic with wxWidgets 3.x.
PCBNEW is finding everything except the profiler reports that _pcbnew.kiface “is not a valid Win32 application”.
EESCHEMA loads its version of _eeschema.kiface just fine.
I did look at the files in %USERPROFILE%/AppData/Roaming/kicad. The files for KICAD and EESCHEMA looked normal with plenty of information. However the file for pcbnew contained only this:
REM ----------------------------------------------------------------------------
REM Set up the path to point to all the binaries required for the environment
REM We must add in the KiCad binary directory to make the _stc.pyd import work!
SET KICAD_PATH_ROOT=%CD%
SET KICAD_PATH=%KICAD_PATH_ROOT%\bin
REM ----------------------------------------------------------------------------
REM
REM Generate the bin search path
REM Concatenate the path (Careful of the order of the path entries!)
SET PATH=%KICAD_PATH%;%KICAD_PATH_ROOT%;%PATH%
REM Tell PCBNEW where to look on github when using the github footprint
REM libraries:
SET KIGITHUB=https://github.com/KiCad
REM Tell PCBNEW where to look on footprints when using Legacy/Pretty libraries:
SET KISYSMOD=%KICAD_PATH_ROOT%\share\kicad\modules
REM Tell PCBNEW where to look on footprints 3D shapes:
SET KISYS3DMOD=%KICAD_PATH_ROOT%\share\kicad\modules\packages3d
REM KiCad stores some files in the user profile. Separate this from our real
REM system so that we don’t contaminate a system-wide install with the
REM KiCad-Winbuilder install
SET USERPROFILE=%CD%\portableprofile
SET APPDATA=%USERPROFILE%\AppData\Roaming
SET CSIDL_APPDATA=%APPDATA%
REM Run KiCad
CD %KICAD_PATH%
START .\kicad.exe
CD …/…
This batch file should be located in created folder.
Thanks for the batch file! I saved and ran it with echo on to make sure it was working right. It set the paths right and kicad started just fine. And everything works except PCBNEW and FOOTPRINT EDITOR as before with the same error that _pcbnew.kiface could not be loaded.
I do not think it is a path or settings problem or I would think the other binaries would be effected.
The Dependency Walker said that loading _pcbnew.kiface was the only error.
pcbnew (13.7 KB)
I don’t know if it helps, but that’s the pcbnew file in the folder for my install, cleaned up the paths.
I run BZR6608 on Win7 64bit with 2 monitors, but pcbnew is on the primary I think.
If not you have to adjust some of the FramePos values…
What is the operating system where You try to start portable KiCad?
win7 64
Which exactly release of KiCad do You try to make portable?
kicad-product-4.0.2-x86_64.exe
Where You download it?
kicad download page
Is it work after normal installation on desktop/notebook/tablet?
I do not have the luxury of admin priv for normal install. I have extracted the files from the install exe. It would be much better to have an installation that could be unzipped and ran.
Do you use any additional software for creating/running portable applications, as Cameyo, PortableApps?
I do use portable apps, but this is not a portable apps situation.
Everything is working except, PCBNEW and the MODULE EDITOR, the error in both cases being unable to load _pcbnew.kicad.
I just tried. I downloaded the files from nightlies compilation, copied to a USB memory stick and ran the program on another computer (Windows 7 Pro x64) with a standard user account. Pcbnew is working.
Thank you for the link. I would like to try that build. Unfortunately the path for the zip file has asterisks (http://ci.kicad.org/job/windows-kicad-msys2-nightlies/ws/pack-x86_64/zip/pack-x86_64.zip) and I think the firewall is filtering those out. Is there another path without the asterisks?
I think the kicad build/web server might have some problems.
I tried to download http://ci.kicad.org/job/windows-kicad-msys2-nightlies/ws/pack-x86_64/zip/pack-x86_64.zip at another location and it still fails. I can download small individual files, but not the big zip. The web server is timing out 504. If I try to download say the zip file from the bin directory, it takes about 1 min or two to start the transfer, then it kills prematurely after a few seconds. Perhaps the webserver is too slow to handle the data?