KiCad AppImage for Linux

Hi
I am using Kicad within an Appimage. I have made a schematic but when i tried to load Pcbnew I got these errors

libcrypto.so.1.0.0: cannot open shared object file: No such file or directory.

Failed to load Kiface library '/tmp/.mount_KVjD13 /usr/bin_pcnew.kiface.

These errors also appear when I try to start PCB footprint editor.

If I understand correctly, the appimage is suppose to be all contained in an iso and run from there. How can
I be getting errors like No such file or directory.

Sorry if this is in the wrong place, but I got onto Appimage from my last post.

Your help is much appreciated
Thank you

1 Like

Hi @Promel, thanks for reporting this. Which distribution and version are you using? Can you install libcrypto.so.1.0.0 from your distribution? Most distributions actually come with it out-of-the-box.

If I understand correctly, the appimage is suppose to be all contained in an iso and run from there. How can
I be getting errors like No such file or directory.

This is because in order to save space and redundancy, the AppImage doesnā€™t contain each and every library (starting from glibc itself), but only contains these libraries that cannot reasonably be expected to be part of the base system (which is loosely defined as ā€œnot outdated desktop distributionsā€). For the dependencies that are not bundled inside the AppImage, the version present at runtime must not be older than the version that was present at compile time.

What about distros like debian unstable or fedora which are sometimes years ahead of debian stable/ ubuntu? (Or even worse fedora rawhide)
Some libraries are not downward compatible (see wxpython, wxgtk, ā€¦)
Either put all libs into the iso or none.

2 Likes

Libraries are expected to be downward compatible within a major version number, e.g. applications compiled against libfoo 2.3.5 should also run in newer distributions that require libfoo 2.4.3. This tends to be true especially for core operating system libraries such as glibc and the like, and if it isnā€™t, then it should be considered as a bug in the library.

Libraries that cannot be expected to be available in a recent enough version on each target system (e.g., Qt, wxWidgets, etc). are bundled along with the application in the AppImage, and should be used instead of the version that may or may not be part of the target system (Linux distribution). This usually works, but there seems to be something about wxWidgets and/or wxPython that makes the distribution files ā€œwin overā€ the ones bundled in the AppImage. I donā€™t know the reason for this yet.

As a workaround, uninstall wxWidgets from the distribution (this ensures that the version from the AppImage is used). Clearly, this should be fixed properly.

By the way, this is how it has been done on macOS and Windows since ages.

I can confirm the issue:

wget -c "https://bintray.com/probono/AppImages/download_file?file_path=KiCad-201701231435%2B7516.glibc2.15-x86_64.AppImage" -O KiCad.AppImage

sudo strace -f ./KiCad.AppImage 2>log.good
# pcbnew works well, NO crash

sudo apt-get update
sudo apt-get install kicad

# The following additional packages will be installed:
#  kicad-common libboost-context1.58.0 libboost-thread1.58.0 libwxbase3.0-0v5
#  libwxgtk3.0-0v5 python-wxgtk3.0 python-wxversion

sudo strace -f ./KiCad.AppImage 2>log.bad

# pcbnew leads to crash
# Fatal Error: Mismatch between the program and library build versions detected.

The AppImage runs without crashes if wxWidgets is not installed on the distribution, but crashes when it is installed.

When I edit usr/lib/python2.7/sitecustomize.py to contain

import sys,os
print(sys.path)

then I see when running KiCad from the AppImage:

['/home/me/Downloads/ai/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2']
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8).
Aborted

We need to change the paths there, so that it does not try to load stuff from /usr but only from inside the AppImage.

We can do that by modifying usr/lib/python2.7/sitecustomize.py like this:

import sys,os
prefix = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(sys.path[0]))))
sys.path = [ prefix+s for s in sys.path if not s.startswith(prefix) ]

Uploaded new versions that contain the fix described above, please retry.

1 Like

Hi probono
I am using Centos7 and Kicad-4.0.5+e0.glibcā€¦15_x86_64.AppImage
libcrypto.so.1.0.0 is not in my dristribution

I think it is part of the openssl package.
But you will get a newer version. Something like libcrypto.so.1.0.xy where x is a number and y is a letter.
(You can use yum/dnf to find which package provides a library. Use ā€œyum provides libcrypto.so*ā€ to find the package for your system.)

Tested it under Linux Mint 17 (wxgtk3.0 installed), and it worked.

Which distribution and version is this?
Thanks.

First time trying appimage, not sure If Iā€™ve done it right, but I downloaded Kicad appimage, single binary file, approximately 200MB in size. I changed it to exacutable and now Iā€™m trying to run it in terminal under Linux Mint 18.1, with all latest updates.
This is what i get

$ ./KiCad-201702061417+7592.glibc2.15-x86_64.AppImage
./bin/kicad: /tmp/.mount_sLBBe7/lib/x86_64-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.2ā€™ not found (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)

Then I tried to determine openssl version by
$ openssl version -v
OpenSSL 1.0.2g 1 Mar 2016

And it seems like I have recent openssl. Could you give me hint what is wrong with my setup?

@jaromir sorry for the inconvenience, it looks like I need to fix this in the AppImage.

1 Like

Thank you for prompt reply. Please. let me know once you have any news about it.


EDIT: I downloaded the newest version, it runs, but fonts doesnā€™t look right
Click to see screenshot

@jaromir please retry. Should be fixed, I tested it on linuxmint-18-cinnamon-64bit.iso.

Iā€™m sorry to bother you again, I really appreciate your work you put into this, but I still have problems.
When I run KiCad, it seems totally OK. I can run every subprogram but PCB editor or footprint editor. EEschema and everything other works just fine, but as soon as I try to start PCBnew or footprint editor, whole Kicad package just crashes with message in terminal
$ ./KiCad-201702101417+7629.glibc2.15_-x86_64.AppImage Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8).
Aborted

1 Like

I see what the error was, a broken symlink. Building new builds at the moment @jaromir

@probono I think you should test your builds on a clean ubuntu image. Itā€™s the most popular linux distribution (especially with derivatives). You donā€™t even have to install it, just run the ISO on a virtual machine.

Thatā€™s in fact what I am doing @hyOzd. The error above only came into play when wxPython is already installed in the system, which it is not on a Live ISO.

1 Like

Yeah right :blush: I forgot.

1 Like