kicad-website
kicad-website copied to clipboard
AppImages for Linux
Hi,
I've published my builds of AppImages on Github. This should close issue #257. https://github.com/KarlZeilhofer/kicad-appimage
What are the requirements, that they are mentioned in the download section of the KiCad website?
Kind regards, Karl
On first look it looks good. I like to be able to see the build scripts as you shared. We could move the repo under the kicad org to make it easier to maintain and consider official. We could make it be built by jenkins, such that we can get regular nightlies updated.
in case of gitlab we managed to build a gitlab-ci script to output appimages of kicad nightlies: https://gitlab.com/kicad-mirror/kicad-source-mirror/pipelines
Please feel free to clone the repo or at least the recipes. If everything is in the official repo, I will delete mine.
@pointhi I can't find the source or command used, please share.
- Buildscript: https://gitlab.com/kicad-mirror/kicad-source-mirror/blob/feature/gitlab-ci/.gitlab-ci.yml
- Dockerfile: https://gitlab.com/kicad-mirror/kicad-docker/tree/master/kicad-builder
@nickoe I've tryed to contact you before in order to move the docker image to the official repo. I've created both the docker image and the CI script. Any question feel free to ping me.
Thanks!
@pointhi I get 404 for the kicad-docker repo
@antoniovazquezblanco what is that zsync stuff? I couldn't immediately figure out what it was for attempting to browse the appimage doc.
I've tryed to contact you before in order to move the docker image to the official repo.
@antoniovazquezblanco I am not sure when you did try this. I can't find any references about this. Maybe there was no link to the dockerfile and buldscript and I may have ignored it.
@pointhi I get 404 for the kicad-docker repo
For some reason it is set to be a private repo I do not have permissions to change it. @pointhi will be able to do it.
@antoniovazquezblanco what is that zsync stuff? I couldn't immediately figure out what it was for attempting to browse the appimage doc.
It is a file that allows Appimage updating: https://github.com/AppImage/AppImageSpec/blob/master/draft.md#update-information
@antoniovazquezblanco I am not sure when you did try this. I can't find any references about this. Maybe there was no link to the dockerfile and buldscript and I may have ignored it.
My bad. I will try to be more concise the next time. Sorry about not being as focused as I was expected to.
Thank you!
@antoniovazquezblanco running your container as non-root did not work, because there were some permission bits not set well for linuxdeploy. I had to do the follwoing to make it work:
for i in $(find /usr/lib/linuxdeploy/ -type d -perm 700 -o -perm 711) ; do echo $i; chmod +rwx $i ;done
@nickoe I've pushed a fix. A new image is available for testing if the issue persists. I've also triggered a new Appimage build in the source repo.
@antoniovazquezblanco While we are at it, are you able to respond to me question about this commit? https://gitlab.com/kicad-mirror/kicad-docker/commit/f5218b02fcda458750488c64beafb9e711596138
The one where you change the base from 18.04 to 16.04. Both are LTS releases that are still supported by canonical.
Secondly, I don't get a .zsync file when I build with the linuxdeploy command you are using in your yaml file.
@KarlZeilhofer Not to despice your work, but I think building from source is better than repackaging the PPA packages. Does python work in your builds? I see wxpython is not enabled.
@antoniovazquezblanco In your version of the app images wxpython is enabled, but it looks like the python stuff is not bundled. It get the warning that:
22:01:22: ***** Error importing the wxPython API! *****
22:01:22: pcbnewInitPythonScripting() failed.
Which means that the footprint wizards does not work, nor the python console.
And I also see this in the shell where I started the appimage:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py", line 4, in <module>
import _core_
ImportError: /usr/lib/libatk-bridge-2.0.so.0: undefined symbol: atk_component_scroll_to_point
@nickoe Good point about Python. I'm not sure, if it works, I've never used python scripting within KiCad. The footprint wizard seems to be working.
@antoniovazquezblanco While we are at it, are you able to respond to me question about this commit?
Done
Secondly, I don't get a .zsync file when I build with the linuxdeploy command you are using in your yaml file.
The tool is guessing the info from env variables available at the build machine. If you have a look at the build log (https://gitlab.com/kicad-mirror/kicad-source-mirror/-/jobs/144913393) you can find:
[appimage/stderr] zsyncmake is available and updateinformation is provided, hence generating zsync file
[appimage/stdout] /builds/kicad-mirror/kicad-source-mirror/build/AppDir should be packaged as KiCad-x86_64.AppImage
[appimage/stdout] Guessing update information based on $CI_COMMIT_REF_NAME=feature/gitlab-ci and $CI_JOB_NAME=all
[appimage/stdout] zsync|https://gitlab.com/kicad-mirror/kicad-source-mirror/-/jobs/artifacts/feature/gitlab-ci/raw/KiCad-x86_64.AppImage.zsync?job=all
In your version of the app images wxpython is enabled, but it looks like the python stuff is not bundled.
I don't know what could be causing this. I will need to have a look with a little bit more patience. If you see anything that could point me in the right direction please guide me. In case you didn't know, the latest appimage build log can be found at https://gitlab.com/kicad-mirror/kicad-source-mirror/-/jobs/144913393
Thank you
Maybe the PYTHONPATH is needed to point to the stuff in App something and be passed on for linuxdeploy.
During the weekend I had a look at this. It seems linuxdeploy does not pack python and python package dependencies. There is a conda plugin for linuxdeploy that I have added to the kicad-builder image.
The next steps would be to build KiCad using conda as the python dependency manager and to add conda deps to linuxdeploy and the issue with python support should be solved.
If anyone has compiled KiCad with conda any help would be apreciated as I do not have much spare time at the moment.
Can't you just copy the normal python with linuxdeploy? I don't think it needs to use conda.
From what I've read that should do the trick although I read that the conda way was a little bit more "standard". I need time to have a look at this and unfortunately I do not have much lately.
Related stuff: https://github.com/AppImage/AppImageKit/issues/131
Great effort @KarlZeilhofer and @antoniovazquezblanco :+1: Thank you.
I agree that generally it's better to build for AppImage specifically rather than to re-package deb files. Regarding Python, Conda is not needed but it seems to do the job rather well. You need to ensure that the whole Python and all its needed modules are bundled, as you cannot rely on Python being on the host system.
Please let me know if you need assistance with anything AppImage related.
what is that zsync stuff?
It's described in detail at https://github.com/AppImage/AppImageUpdate.
Unfortunately it's currently broken for GitLab. Works on GitHub and many other file hosts tough. https://github.com/AppImage/AppImageUpdate/issues/94
Can't you just copy the normal python with linuxdeploy? I don't think it needs to use conda.
Regarding bundling Python (without Conda), see what we are using for the Inkscape AppImage:
https://gitlab.com/inkscape/inkscape/blob/master/packaging/appimage/generate.sh
I just uploaded an AppImage for V5.1.2: https://github.com/KarlZeilhofer/kicad-appimage/releases/tag/v5.1.2