Solved: Issues with beloved mint package after update to 21 "Vanessa"

Hello together,
I’m back with some news for KCAD 6.0.7 unter the beloved mint distribution.

The reason for this topic is the upgrade of my system to Mint 21 “Vanessa”. I used the upgrade script, which worked quite well and removed a lot of my own package builds and a lot of garbage. However, running with a freshly upgraded system should be a good starting point.

The bad news was: mint 21 is using KICAD 6.0.2, which is a step back for me.
Since all ppas were removed during the upgrade, I had to re-install the ppa. Thereby I learned from the new issue 6.0.7. I installed the ppa and got the latest version via apt.

At a first glance everything looked fine until I tried to open the PCB-editor. At this stage the program crashes.

An interesting observation: 6.0.7 on linux is using wxWidgets 3.0.5, while for other systems like windows wxWidget 3.1.7 is mentioned in the forum.

wxWidget 3.1 is not available in the linux mint packages, therefore I had to compile it by myself.
I found the cmake-gui of the standard mint package not working (cmake was running without error, version 3.22), so I switched to the most recent version 3.24.0.
I compiled wxWidgets 3.1.7 and build KICAD from source. Module pcbnew was not properly working due to some garbage settings for my wxWidgets. However, in the meantime wxWidgets 3.2 were released and I installed them together with wxPython 4.2.
In this configuration I got a running KICAD system with a working pcbnew module.

The only (but common to all self compiled versions) drawback is the implementation of the python console. The script is failing at the wx/init.py routine saying the no wx.version exists.
Is there a trick or an option I need to set to properly initialze the python scripts?

Update: the python console is working now!

Sometimes the system environment is very tricky, later more on this.

I downloaded the latest version of the wxPython from the Phoenix site as ZIP file. This project is using the wxWidgets as external reference, which must be added into the source code package. So I downloaded the required packages using wxwidgets 3.2.0.1. This packet i used twice: first to build the wxWidgets libraries, second to build the wxPython. Both packages were compiled without errors (after some hard trials) and with the same options. Both packages generated a set of libwx_xx libraries, the one from wxpython are located in /usr/local/lib/python3.19/dist-packages/wx, the libraries from wxwidget are located in /usr/local/lib.

When starting the python console in kicad the first error message is a notification, that a symbol is the _core.cpython-310-x86_64-linux-gnu.so library is missing.
Using the ldd command it is shown, that libwx_gtk3u_core-3.2.so library in the same folder is used, this library contains the requested symbol but kicad is still producing the error.
A closer look and comparison of the two versions in /usr/local/lib and …/wx shows differences in size and finally shows, that the file in /usr/local/lib does not contain the required symbol.
Unfortunately kicad loads the library from this folder; after deleting the “wrong” libraries kicad didn’t start any longer. After a manual copy of the libraries from the …wx folder into the lib folder kicad is starting again and the python console is working.
I belive, that this is not the proper approach but a usable workaround. Finally wxPython shall install the libwx-libraries in the lib folder, but I didn’t find the way to handle it yet.

1 Like