Nightly builds for Debian buster and bullseye

People in #kicad already know this but after reading A friendly heads up for nightly users [Bug testers needed!] I thought it might make sense to write it here as well:

I do semi-automatic builds of the kicad master branch for Debian buster and bullseye. Currently amd64 only, I can add i386 and maybe armhf if there is demand.

The repository is reachable via:

deb https://debian.sur5r.net/kicad-nightly buster main

or

deb https://debian.sur5r.net/kicad-nightly bullseye main

respectively.

The repository is signed by my debian.sur5r.net key, Fingerprint

pub   rsa4096/E3CA1A89941C42E6 2015-01-24 [SC] [expires: 2022-03-08]`
      Key fingerprint = BFD9 0F4D AAEF A72B 67BB  AF48 E3CA 1A89 941C 42E6`
uid                 [  full  ] debian.sur5r.net Archive Automatic Signing Key 2015 (sur5r) <debian@sur5r.net>

which is also available in the package sur5r-keyring from that very repo.

The easiest way to install the keyring beforehand is:

$ /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb sur5r-keyring.deb SHA256:cccfb1dd7d6b1b6a137bb96ea5b5eef18a0a4a6df1d6c0c37832025d2edaa710
# dpkg -i ./sur5r-keyring.deb

The packaging bits are published at https://gitlab.com/sur5r/kicad-nightly-deb. They are heavily based on the Ubuntu PPA packaging.

I hope this helps making testing the development builds easier for users on Debian.

4 Likes

Thanks for your kind help @sur5r.

Although it is unrelated to the topic you’ve mentioned, is it possible to add an aarch64 and amrhf builds to your Debian PPA? This way you can help young minds to create something with KiCad and cheap SBC’s (like RPi 4).

This is not unrelated at all. Given most RPi installations are still 32bit, I will try armhf first. The builds will take a little longer (qemu-user in action) so I might need to update the armhf builds less often. I will report back with what I can do.

Update: The buster/armhf build took 4h11. Adding bullseye and aarch64 for both distros means building all the arm variants need 17h to complete. I will try and find an arm box to do this.

3 Likes

armhf builds for buster and bullseye are built on a regular basis now. aarch64 will have to wait a couple of days until I can set up a an ARM box for this.

Thank you for making these packages available. Also for making the key integration easier. Because apt-key is mostly deprecated now.

The line for Bullseye didn’t work unfortunately.

This did the trick:

deb [arch=amd64] https://debian.sur5r.net/kicad-nightly bullseye main

After downloading and installing, KiCad started up normally.

Most probably you have other architectures enabled (e.g. i386). As I’m not building for i386 this will throw an error.

If someone wants/needs i386 builds: Please speak up.

Actually the thing that puzzled me the most was that I needed to reverse both ‘main’ and ‘bullseye’

Yup! Maybe it’s some symlinks missing.
Here’s what happens here (with some debugging lines in apt.conf):

Found 0 instances of tor+https
Fetching tor+https://debian.sur5r.net/kicad-nightly/dists/main/InRelease
 to /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_InRelease
 Queue is: tor+https:debian.sur5r.net
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_InRelease
Dequeued from tor+https:debian.sur5r.net
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_InRelease
Fetching tor+https://debian.sur5r.net/kicad-nightly/dists/main/Release
 to /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_Release
 Queue is: tor+https:debian.sur5r.net
Ign:1 tor+https://debian.sur5r.net/kicad-nightly main InRelease
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_Release
Dequeued from tor+https:debian.sur5r.net
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_Release
Dequeuing /var/lib/apt/lists/debian.sur5r.net_kicad-nightly_dists_main_InRelease
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_Release
Err:2 tor+https://debian.sur5r.net/kicad-nightly main Release
  404  Not Found [IP: 127.0.0.1 9050]
Dequeuing /var/lib/apt/lists/debian.sur5r.net_kicad-nightly_dists_main_InRelease
Dequeuing /var/lib/apt/lists/partial/debian.sur5r.net_kicad-nightly_dists_main_Release
Reading package lists...
E: The repository 'tor+https://debian.sur5r.net/kicad-nightly main Release' does not have a Release file.

You can see apt-get searches for inexistent InRelease and Release files. Tor isn’t an obstacle here.

Oh you are completely right. I swapped distribution and component in my original post. Sorry. I’ve edited it and it’s correct now.

Funny how there’s always room for human error in the most basic things, even after using Debian for 20 years.

And another small thing. Both the symbol and part libraries still point to the 5.1 versions. I had to manually migrate to import the new symbols and footprints.

Not exactly. kicad-nightly installs a shell snippet into /etc/profile.d which sets KICAD6_* environment variables which are in turn used by the sym-lib-table and fp-lib-table shipped in /usr/lib/kicad-nightly/share/kicad/template which are used when you let KiCad nightly set up the default libraries.

I just deleted my nightly config to make sure this works as expected.

Thanks for sharing it! Compiling from sources is annoying and the newest package from the PPA is for Ubuntu 21.04.1, which is too “old” compared to bullseye.

Did you report the changes needed to the PPA maintainer?

Creating the package for bullseye I found 4 details:

  1. Swig 3.0 forced: now we have 4.0, forcing 3.0 makes it fail.
  2. Python 2 is obsolete: no “python” command anymore, scripts must migrate to “python3”
  3. Very old debian compatibility level. The PPA uses 9, which is obsolete. I didn’t fix it.
  4. CMakeModules/FindOpenCASCADE.cmake seems to be wrongly named. I think it should be FindOCC.cmake

Also got the following compilation warnings:

recipe/kicad/common/build_version.cpp:57:68: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
   57 |     wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
      |                                                                    ^
recipe/kicad/common/build_version.cpp:57:85: warning: macro "__TIME__" might prevent reproducible builds [-Wdate-time]
   57 |     wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
      |                                                                                     ^
recipe/kicad/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp: In constructor â╸PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)â╝:
recipe/kicad/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp:17:1: note: variable tracking size limit exceeded with â╸-fvar-tracking-assignmentsâ╝, retrying without
   17 | PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
recipe/kicad/include/common.h:166: Warning 317: Specialization of non-template 'hash'.
recipe/kicad/include/common.h:174: Warning 317: Specialization of non-template 'less'.
recipe/kicad/include/layers_id_colors_and_visibility.h:268: Warning 401: Nothing known about base class 'GAL_BASE_SET'. Ignored.
recipe/kicad/include/board_design_settings.h:218: Warning 401: Nothing known about base class 'NESTED_SETTINGS'. Ignored.
recipe/kicad/include/richio.h:128: Warning 503: Can not wrap 'operator char*' unless renamed to a valid identifier.
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:130: Warning 509: Overloaded method SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< wxPoint,std::allocator< wxPoint > > const &) effectively ignored,
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:119: Warning 509: as it is shadowed by SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< int,std::allocator< int > > const &).
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:119: Warning 509: Overloaded method SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< int,std::allocator< int > > const &) effectively ignored,
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:130: Warning 509: as it is shadowed by SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< wxPoint,std::allocator< wxPoint > > const &).
footprint.h:115: Warning 509: Overloaded method FOOTPRINT::FOOTPRINT(FOOTPRINT &&) effectively ignored,
footprint.h:112: Warning 509: as it is shadowed by FOOTPRINT::FOOTPRINT(FOOTPRINT const &).

Did you check https://gitlab.com/sur5r/kicad-nightly-deb (mentioned in the first post)?

Did you report the changes needed to the PPA maintainer?

No as I have no idea how to do this. Even after years of looking at launchpad I don’t understand its structure. Also I could not find a git repository of the PPA packaging bits.

Creating the package for bullseye I found 4 details:

  1. Swig 3.0 forced: now we have 4.0, forcing 3.0 makes it fail.
  1. Python 2 is obsolete: no “python” command anymore, scripts must migrate to “python3”

Agreed. I did not go over the contained scripts yet. That should also be reported upstream first.

  1. Very old debian compatibility level. The PPA uses 9, which is obsolete. I didn’t fix it.

True. But as this package is not meant for inclusion into Debian I did not spend time here, either. Also there were other issues needing attention first.

  1. CMakeModules/FindOpenCASCADE.cmake seems to be wrongly named. I think it should be FindOCC.cmake

Should be reported upstream. There’s no point in changing this in the packaging.

Also got the following compilation warnings:

recipe/kicad/common/build_version.cpp:57:68: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
  57 |     wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
     |                                                                    ^
recipe/kicad/common/build_version.cpp:57:85: warning: macro "__TIME__" might prevent reproducible builds [-Wdate-time]
  57 |     wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
     |                                                                                     ^
recipe/kicad/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp: In constructor â╸PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)â╝:
recipe/kicad/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp:17:1: note: variable tracking size limit exceeded with â╸-fvar-tracking-assignmentsâ╝, retrying without
  17 | PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
     | ^~~~~~~~~~~~~~~~~~~~~~~~~
recipe/kicad/include/common.h:166: Warning 317: Specialization of non-template 'hash'.
recipe/kicad/include/common.h:174: Warning 317: Specialization of non-template 'less'.
recipe/kicad/include/layers_id_colors_and_visibility.h:268: Warning 401: Nothing known about base class 'GAL_BASE_SET'. Ignored.
recipe/kicad/include/board_design_settings.h:218: Warning 401: Nothing known about base class 'NESTED_SETTINGS'. Ignored.
recipe/kicad/include/richio.h:128: Warning 503: Can not wrap 'operator char*' unless renamed to a valid identifier.
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:130: Warning 509: Overloaded method SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< wxPoint,std::allocator< wxPoint > > const &) effectively ignored,
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:119: Warning 509: as it is shadowed by SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< int,std::allocator< int > > const &).
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:119: Warning 509: Overloaded method SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< int,std::allocator< int > > const &) effectively ignored,
recipe/kicad/libs/kimath/include/geometry/shape_line_chain.h:130: Warning 509: as it is shadowed by SHAPE_LINE_CHAIN::SHAPE_LINE_CHAIN(std::vector< wxPoint,std::allocator< wxPoint > > const &).
footprint.h:115: Warning 509: Overloaded method FOOTPRINT::FOOTPRINT(FOOTPRINT &&) effectively ignored,
footprint.h:112: Warning 509: as it is shadowed by FOOTPRINT::FOOTPRINT(FOOTPRINT const &).

Same. Best is to work out a fix and report it upstream.

Those are old warnings. The last few in particular are due to SWIG which is not fixable

Though that pcb_calculator one is a new one.

There is of course a reason why compat levels less than 9 are obsolete, this can have and will have some effect on specific things while package built. Debhelper will behave differently if the compatibility level is set to 9 or less.

Nope.

He is in the forum:

Given I can find no hints of armhf users of my builds I will disable those.
This will also increase the build frequency so you can expected an updated build roughly 1 hour after a commit to the kicad git repo.

I see that I still have the snippet in /etc/profile.d But it points to the /usr/lib/kicad-nightly/share/kicad directories Which are mostly empty with the latest updates. Instead everything now points to the /usr/share/kicad-nightly directory.

Do I need to modify it or remove this file?
Edit: It was quite easy to migrate by moving the fp-lib-table file from /usr/share/kicad-nightly/templates to ~/.config/kicad/5.99/
P.S. You can also remove the ~/.config/kicadnightly directory to reduce the confusion of where stuff is located.

You are right, I forgot to remove that file from my packaging. You can
delete it yourself, I will remove it from the package later today.

2 Likes

I was trying to compile 5.99 on Buster with python3 and wxPhoenix enabled, with no success. This will be important because the KiCad cmake system will soon (at least before v6) move totally to python3, it will be a hard requirement. (Source: https://gitlab.com/kicad/code/kicad/-/merge_requests/796 .)

I haven’t tried these nightly build packages yet, I just found this thread, so I don’t know what has happened meanwhile, but I thought I could ask if the python thing has gone forward with these packages.

If I get it working some day I can add build instructions here.

By the way, the place to report about Ubuntu packaging is in the official KiCad repo nowadays: https://gitlab.com/kicad/packaging/kicad-ubuntu-builder