KiCad AppImage for Linux


#21

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


#22

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.


#23

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.


#24

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.


#25

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.


#26

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) ]

#27

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


#28

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


#29

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


#30

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


#31

Which distribution and version is this?
Thanks.


#32

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?


#33

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


#34

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


#35

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


#36

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


#37

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


#38

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


#39

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.


#40

Yeah right :blush: I forgot.