Compiling kicad 5.1 to get back the legacy canvas on platforms without official support for it

Has the Legacy toolkit been dropped already?? I don’t seem to be able to get it to work on the latest nightly build (V5.1.0).

It’s dropped on linux distributions where gtk3 is the only option. Legacy toolkit is only supported on gtk2.

I don’t know what version of gtk I’m using (I have both on my laptop) however I can switch to the Legacy toolkit on V5.0.2 but not on V5.1.0.
Does nightly use gtk3 regardless of what is available??

That is generally left up to the packager. It is not explicitly disabled in the code but the packager for your distribution might not have enough volunteers to help support multiple versions. You can always ask!

1 Like

You can tell which version of GTK KiCad is using from the version info. Look for string “wxWidgets 3.x.x (…) GTK+2/3”.
As Seth said v5.1 does not explicitly disable legacy toolkit but legacy toolkit is disabled when KiCad is compiled with gtk3. If you can get maintainer of your package to offer gtk2 build of 5.1 (they probably will have to disable python scripting in that case) you will get legacy toolkit back. Or you can always compile yourself, it’s not hard on linux.

1 Like

I have the following in my sources list:
http://ppa.launchpad.net/js-reynaud/kicad-dev-nightly/ubuntu
This came from the Kicad website so I assumed it was you blokes. What should I be using??
Here is the version info from the programs I have installed:
Version: 5.0.2-bee76a0~70~ubuntu18.04.1, release build
wxWidgets 3.0.4 Unicode and Boost 1.65.1
Platform: Linux4.15.0-45-generic x86_64, 64 bit

Version: 5.1.0-rc2-unknown-140abd3~92~ubuntu18.04.1, release build
wxWidgets 3.0.4 Unicode and Boost 1.65.1
Platform: Linux4.15.0-45-generic x86_64, 64 bit

I try compiling myself.

Yes, that is the “official” repo for ubuntu. 5.1 for ubuntu18 is built on gtk3 (you didn’t copy full version info you would have seen it below) so you can compile yourself but you will give up python scripting if you want gtk2 and legacy toolset.

This is what KiCad website tells:

KiCad is an open source project, download instructions above are provided by the community. If you’d like to provide builds for your operating system or distribution, please submit a pull request.

This means that KiCad software developers aren’t responsible for packaging. Nor are “we blokes” because we aren’t, in general, KiCad developers or packagers. Some of them hang out here but this forum is run and used by ordinary users. Only some are more or less involved with development or packaging and everyone represent themselves here.

2 Likes

[offtopic]

I disagree on that statement. This is an PPA so it can’t be the official Ubuntu packages. I agree on that this PPA is the “official” suggest additional archive to get most recent versions of KiCad for Ubuntu. That’s basically the problem with PPAs, they aren’t an official part of Ubuntu but people thinking they are.

3 Likes

That’s exactly why I put quotes around “official”. It’s official as in endorsed by KiCad devs, not as in Canonical/Ubuntu maintained.

1 Like

Hi. Finally found some time to have a crack at compiling myself however I have a few questions.
I’ve read the doco in the Documentation/development directory of the decompressed directory of the source and it is not obvious to me how to use GTK2 instead of GTK3.
I decided to compare the version outputs of 5.02 and 5.1 (I found the “copy” button on the about page :slight_smile:) and got the following:

Legacy works with this version:

Application: kicad
Version: 5.0.2-bee76a0~70~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON


Legacy does not work with this version:

Application: kicad
Version: 5.1.0-unknown-a7c8df5~94~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

The main difference I see with these is that USE_WX_OVERLAY=OFF with the version I prefer.
This is mentioned in the Documentation/development/compiling.md file but wasn’t sure how to issue this on the command line.
After a bit more looking, I found this is declared in the CMakeLists.txt file, however it says:

option( USE_WX_OVERLAY
“Use wxOverlay: Always ON for MAC and GTK3 (default OFF).” )

This reads to me that it should be disabled by default on my machine.
Am I on the right track here or is there something else I should be looking at??
Grateful for any guidance.

KiCad is built with gtk2 by default, you have to add -DwxWidgets_CONFIG_OPTIONS="–toolkit=gtk3" to cmake to force gtk3 build. Also I believe it will be automatically turned on if you specify KICAD_SCRIPTING_PYTHON3 option. So unless you specify any of those on your cmake config step you will default to gtk2.
USE_WX_OVERLAY is unrelated.

Just follow default compilation instructions and if you encounter cmake error post error message here (or start separate thread to not derail this completely). I or someone else will be able to help.

2 Likes

OK Thanks. I’ve got through all the cmake dependency issues and I’m now "make"ing. Looks like it might take a while so will report back later.

Don’t forget to pass -jN to make command where N is number of available cpu cores +1 or 2. That will parallelize good chunk of the build process. On linux it should take < 10 minutes for reasonably recent machine.

No, that’s not true!

Wasn’t the reason for switching to gtk3 because there where platforms where wxpython is no longer available for gtk2? I would assume a platform where the “official” package builds against gtk3 is one of the platforms affected by this making it less likely to get full python support when switching back to gtk2.

Why else would the packager package against gtk3 if not to get back full python support. The trade-off simply is not worth it if python would work without switching. (in other words: If the packager builds against gtk3 without good reason then it might be considered a bug to do so.)

eelik is technically correct, best kind of correct. You can still have pcbnew python bindings without gtk3 as long as you give up wxpython: pcbnew scripting console and (some?) action plugins. Standalone scripts will still work.

1 Like

IIRC before I switched to gtk3 and python 3 with my compilations I had gtk2 and python 2 with full wxPython support on Ubuntu. No need to give up anything. But this depends on the platform.

Depends on Ubuntu version. 18.04 doesn’t provide wxpython that works with gtk2 so you must have had an earlier version. Or compiled one yourself.

It’s been quite a long time ago that I (probably accidentally?) bumped into the “modern” canvas (which was called OpenGL back then in KiCad V4), and I didn’t like it much. Everything looked weird, colors were wrong, and probably a bunch of other small things.

Then I decided to put up with it because the Interactive Router only works with the modern canvases, and I thought the Interactive Router was a nice feature, and worth exploring a bit. It did not take much time however to get completely addicted to it. With it you can do in a few minutes, what would have taken an hour before. It makes it almost trivial to squeeze in the last few tracks on a densely populated PCB. And after using it for some time It even starts influencing component placement. Now I put components closer together than I would have dared before.
Take for example this (not so big) THT board. I put in some extra effort here, because it had to fit in the space alotted. The top side is almost solid components.

The Interactive router is such a game changing feature that I can not imagine switching back to a PCB design package without it.

My guess is that you probably only want the obsolete canvas because you’re used to it, but holding on to those old features stops you from learning to appreciate the rapid improvements made in the development in KiCad. It is my understanding that you’re frustated about KiCad for some reason. I would probably also get frustrated If I wanted to hold on to the ways KiCad used to work, and had to go through the pain of setting up compiling environments and compiling KiCad myself just to be able to hold on to some old features.

It is a nasty trade of human psychology. Us, human beings, have a tendency to stick with what we’re used to and resist change, even if it is for the better. A classic (but totally unrelated) example of this is wives sticking to (and defending) their husbands even in abusive relationships.

2 years ago I could have understood sticking to the old canvas. There were still some features missing in the new canvas, and therefore I tended to switch back and forth between old and new, but now I’ve mostly forgotten what the old canvas even looks like.

In your (only) other thread “Not impressed with V5”, you wrote you were going back to KiCad V4 after just an hour because you “wasted too much time relearning basic tasks”, but how much time are you “wasting” now, in setting up and compiling for the old canvas?

I do not know you very well, but I’m guessing that when you invest some time in getting used to the new canvas (Give it a month, design 3 or 4 PCB’s in it, use the Interactive router) you would not want to switch back anymore, and you may even want to change your user name.

Resistance is probably futile anyway. The old canvas is going to be dropped completely somewhere in the future. Probably in V6, maybe later. I don’t really know, nor care, because I don’t use it anymore.

2 Likes