Building Blues; can't find wxWidgets3.2 [SOLVED]

I just built wxWidgets 3.2.1 (make + sudo make install + sudo ldconfig, all successful); but trying to build kiCAD it’s telling me it needs wxWidgets >= 3.2.0 :frowning:
I’m on Lubuntu 22.04.1, gcc11, trying to build version … Well, the version number does not appear to be written anywhere in the sources, but it’s the latest tar.bz2 downloadable… Found it: 3.22.1
Treat me like a newbie, plz; I’ve been living in linux for a decade, but I’m too old to learn new tricks.

Here’s the relevant output:

dd@dd-20b7s4e800:~/Downloads/zip/KiCAD/kicad-master/build/release$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../…/
– KiCad install dir: </usr/local>
– Enabling warning -Wsuggest-override
– Enabling warning -Wduplicated-branches
– Enabling warning -Wduplicated-cond
– Enabling error for -Wvla
– Enabling warning -Wimplicit-fallthrough
– Enabling error for -Wreturn-type
– Enabling warning -Wshadow
– Enabling warning -Wsign-compare
– Enabling warning -Wmissing-field-initializers
– Enabling warning -Wempty-body
– Enabling warning -Wreorder
– Enabling warning -Wmismatched-tags
– Disabling warning -Wpsabi
– Check for installed GLEW – found
– Found the following HarfBuzz libraries:
– HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
– Found OpenCASCADE Standard Edition version: 7.5.0
– ++ OpenCASCADE Standard Edition include directory: /usr/local/include/opencascade
– ++ OpenCASCADE Standard Edition shared libraries directory: /usr/local/lib
– Check for installed Python Interpreter – found
– Python module install path: local/lib/python3.10/dist-packages
– pybind11 v2.9.2
CMake Error at CMakeLists.txt:908 (message):
wxWidgets 3.2.0 or greater is required
– Configuring incomplete, errors occurred!
See also “/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeOutput.log”.
See also “/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeError.log”.
dd@dd-20b7s4e800:~/Downloads/zip/KiCAD/kicad-master/build/release$

CMakeError.log:

Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE failed with the following output:
Change Dir: /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0b758/fast && /usr/bin/gmake -f CMakeFiles/cmTC_0b758.dir/build.make CMakeFiles/cmTC_0b758.dir/build
gmake[1]: Entering directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_0b758.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE -fPIE -Winconsistent-missing-override -std=c++17 -o CMakeFiles/cmTC_0b758.dir/src.cxx.o -c /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option ‘-Winconsistent-missing-override’
gmake[1]: *** [CMakeFiles/cmTC_0b758.dir/build.make:78: CMakeFiles/cmTC_0b758.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:127: cmTC_0b758/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION failed with the following output:
Change Dir: /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_d91b1/fast && /usr/bin/gmake -f CMakeFiles/cmTC_d91b1.dir/build.make CMakeFiles/cmTC_d91b1.dir/build
gmake[1]: Entering directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_d91b1.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION -fPIE -Wimplicit-int-float-conversion -std=c++17 -o CMakeFiles/cmTC_d91b1.dir/src.cxx.o -c /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option ‘-Wimplicit-int-float-conversion’; did you mean ‘-Wdeprecated-enum-float-conversion’?
gmake[1]: *** [CMakeFiles/cmTC_d91b1.dir/build.make:78: CMakeFiles/cmTC_d91b1.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:127: cmTC_d91b1/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_TRIVIAL_PATTERN_INIT failed with the following output:
Change Dir: /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f3a56/fast && /usr/bin/gmake -f CMakeFiles/cmTC_f3a56.dir/build.make CMakeFiles/cmTC_f3a56.dir/build
gmake[1]: Entering directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_f3a56.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_SUPPORTS_TRIVIAL_PATTERN_INIT -Wno-attributes -fPIE -ftrivial-auto-var-init=pattern -std=c++17 -o CMakeFiles/cmTC_f3a56.dir/src.cxx.o -c /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option ‘-ftrivial-auto-var-init=pattern’
gmake[1]: *** [CMakeFiles/cmTC_f3a56.dir/build.make:78: CMakeFiles/cmTC_f3a56.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:127: cmTC_f3a56/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_TRIVIAL_ZERO_INIT failed with the following output:
Change Dir: /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_9e921/fast && /usr/bin/gmake -f CMakeFiles/cmTC_9e921.dir/build.make CMakeFiles/cmTC_9e921.dir/build
gmake[1]: Entering directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_9e921.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_SUPPORTS_TRIVIAL_ZERO_INIT -Wno-attributes -fPIE -ftrivial-auto-var-init=zero -std=c++17 -o CMakeFiles/cmTC_9e921.dir/src.cxx.o -c /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
gmake[1]: *** [CMakeFiles/cmTC_9e921.dir/build.make:78: CMakeFiles/cmTC_9e921.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:127: cmTC_9e921/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_REQUIRES_ENABLE_TRIVIAL_ZERO_INIT failed with the following output:
Change Dir: /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_291c1/fast && /usr/bin/gmake -f CMakeFiles/cmTC_291c1.dir/build.make CMakeFiles/cmTC_291c1.dir/build
gmake[1]: Entering directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_291c1.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_REQUIRES_ENABLE_TRIVIAL_ZERO_INIT -Wno-attributes -fPIE -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -std=c++17 -o CMakeFiles/cmTC_291c1.dir/src.cxx.o -c /home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
gmake[1]: *** [CMakeFiles/cmTC_291c1.dir/build.make:78: CMakeFiles/cmTC_291c1.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory ‘/home/dd/Downloads/zip/KiCAD/kicad-master/build/release/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:127: cmTC_291c1/fast] Error 2

Source file was:
int main() { return 0; }

My guess is that your wxWidgets build was installed in /usr/local as is common, but the KiCad build didn’t look there and found the standard headers in /usr/include from the Lubuntu packages. You may have to edit the cmake config to look in /usr/local first. But I don’t know if the c++ errors are a concern.

You do know that the official KiCad PPA for *buntu includes updated packages for wxWidgets so unless you have a reason to roll your own…

I’m like a total newb when it comes to libraries and system things, so I’m confused … When I do sudo make install, that installs in /usr/local ? But the installer looks for it in /usr/include ? What exactly do I edit where to fix this?
And about the second paragraph, no, I do not know … I’m not sure what PPA means. I did not want to end up with a super old version of KiCAD, like I did last time when I installed from the packages shown on the Muon package manager; I wanted something sort of bleeding edge, so I downloaded the sources in the tar.bz2 and tried (and obviously failed) to understand the instructions.
Edit: I’d much rather use git, if I knew how. I never find full instructions, anywhere.

Dunno why you spend all this effort.
On 22.04, I cannot imagine that Muon would show you an outdated KiCAD version.
Current version is 7.0.6 and it runs beautifully.
If you want to be “bleeding edge”, then choose the “testing” or “nightly” builds from here:

Dunno, I haven’t worked with cmakefiles, but I’ll cope if it comes to that. I’m more used to autoconf where you specify with arguments to ./configure where certain includes and libraries are found.

The *buntu packages in the official PPA (Personal Package Archive) are up-to-date, as *buntu is a supported distro. So all this effort is unnecessary. You can just follow the instructions at Install on Ubuntu | KiCad EDA And 22.04 is supported, it’s not like you have an old Obongo version.

I just checked it out. The version I installed from Muon is 6.0.
No thanks.
Last time I installed KiCAD from Ubuntu, in my other machine, the moment I had a problem with simulation and posted about it I was told that my version was too old. That’s Ubuntu for you.
No thanks.
Anyways, with Aris Kimi’s help I managed to git clone the sources, and I got ninja installed, and then I got stuck at the same point again; it cannot find wxWidgets.
Relevant output:


– Found ngspice: /usr/include
– Found OCC: /usr/local/include/opencascade (found version “7.5.0”)
– Found OpenCASCADE Standard Edition version: 7.5.0
– ++ OpenCASCADE Standard Edition include directory: /usr/local/include/opencascade
– ++ OpenCASCADE Standard Edition shared libraries directory: /usr/local/lib
– Found SWIG: /usr/bin/swig4.0 (found suitable version “4.0.2”, minimum required is “4.0”)
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.10.12”, minimum required is “3.6”)
– Check for installed Python Interpreter – found
– Python module install path: local/lib/python3.10/dist-packages
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so (found suitable version “3.10.12”, minimum required is “3.6”)
– pybind11 v2.9.2
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so
– Performing Test HAS_FLTO
– Performing Test HAS_FLTO - Success
CMake Error at CMakeLists.txt:908 (message):
wxWidgets 3.2.0 or greater is required

– Configuring incomplete, errors occurred!
See also “/home/dd/Downloads/zip/KiCAD_git/kicad/build/release/CMakeFiles/CMakeOutput.log”.
See also “/home/dd/Downloads/zip/KiCAD_git/kicad/build/release/CMakeFiles/CMakeError.log”.
dd@dd-20b7s4e800:~/Downloads/zip/KiCAD_git/kicad/build/release$

If worse comes to worst, I’ll do that; but I want to give the git clone and build way a chance, first.
If I manage to get it to work, life will be a bed of roses going forward. Just git update and remake, every day. One minute thing, instead of downloading the whole thing every day.
Edit: And who knows, I might contribute some development, too; I used to be God when I worked with shaders; I could make the 3D viewer photo-realistic, if it isn’t yet.

You are making it way harder than it has to be if you just want latest stable kicad. Follow these instructions and thats it Install on Linux | KiCad EDA

Only reason to compile yourself is if you are a developer and want to modify kicad or if there are no pre compiled packages for your os, not your case.

Edit: ok sounds like you want to potentially do development.

In that case you need to specify path to wxwidgets manually. Something like
-DWXWIDGETS_LIBRARY_PATH=/usr/local/include
in cmake parameters, to find actual name of the variable look at the cmakecache.txt in build dir, it generates after first run of cmake.

Actually, here is even better way that will also solve next problem you will run into (missing wxpython). Remove your self compiled wxwidgets completely, add the official kicad ppa (instructions in my post above) and then install wxwidets and wxpython from that ppa. It has headers package too. That will take care of 2 most problematic kicad dependencies.

Then run cmake again.

I tried cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWXWIDGETS_LIBRARY_PATH=/usr/local/include …/…/
but got the same problem. Is that what you meant?

I’ll try the second solution.

Okay, I installed the more stable PPA, as the nightly it said it would not install libraries. I opened kiCAD after installation, just to check it worked, and after creating a “test” project, I clicked on the schematic icon and it popped an error message:

22:02:31: Failed to load shared library ‘/usr/bin/_eeschema.kiface’: /usr/bin/_eeschema.kiface: undefined symbol: _ZNK13wxGLCanvasX1115IsShownOnScreenEv, version WXU_3.2
22:02:31: Failed to load kiface library ‘/usr/bin/_eeschema.kiface’.
22:02:31: Error loading editor.
22:02:31: Application failed to load.

At this point, about 67% of people just uninstall.
But then, 71% of all statistics quoted are made up on the spot.
:slight_smile:
So, how do I “install” wxWidgets and Python from this PPA?

You have clashing shared libraries. Do:

ldd /usr/bin/_eeschema.kiface

to try to spot which one in the long list is dodgy. Maybe even one left over in /usr/local from your previous build.

Hmmm… I’ve no idea what I’m looking at …

dd@dd-20b7s4e800:~/Downloads/zip/KiCAD_git/kicad$ ldd /usr/bin/_eeschema.kiface
linux-vdso.so.1 (0x00007ffd197f1000)
libwx_gtk3u_gl-3.2.so.0 => /usr/local/lib/libwx_gtk3u_gl-3.2.so.0 (0x00007fd36fd12000)
libwx_gtk3u_aui-3.2.so.0 => /usr/local/lib/libwx_gtk3u_aui-3.2.so.0 (0x00007fd36fc68000)
libwx_gtk3u_html-3.2.so.0 => /usr/local/lib/libwx_gtk3u_html-3.2.so.0 (0x00007fd36fb87000)
libwx_gtk3u_core-3.2.so.0 => /usr/local/lib/libwx_gtk3u_core-3.2.so.0 (0x00007fd36f2bd000)
libwx_baseu_net-3.2.so.0 => /usr/local/lib/libwx_baseu_net-3.2.so.0 (0x00007fd36f255000)
libwx_baseu-3.2.so.0 => /usr/local/lib/libwx_baseu-3.2.so.0 (0x00007fd36ef91000)
libwx_gtk3u_propgrid-3.2.so.0 => /usr/local/lib/libwx_gtk3u_propgrid-3.2.so.0 (0x00007fd36ee7c000)
libwx_baseu_xml-3.2.so.0 => /usr/local/lib/libwx_baseu_xml-3.2.so.0 (0x00007fd36ee67000)
libwx_gtk3u_stc-3.2.so.0 => /usr/local/lib/libwx_gtk3u_stc-3.2.so.0 (0x00007fd36ebe3000)
libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fd36e3ba000)
libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fd36e2b3000)
libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fd36e1e2000)
libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fd36e0ba000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fd36e05a000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd36df20000)
libodbc.so.2 => /lib/x86_64-linux-gnu/libodbc.so.2 (0x00007fd36deb1000)
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fd36de0a000)
libpython3.10.so.1.0 => /lib/x86_64-linux-gnu/libpython3.10.so.1.0 (0x00007fd36d831000)
libGLEW.so.2.2 => /lib/x86_64-linux-gnu/libGLEW.so.2.2 (0x00007fd36d773000)
libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fd36d6c8000)
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fd36d641000)
libGLU.so.1 => /lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fd36d5eb000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fd36d523000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fd36d4d7000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd36d2ab000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd36d1c4000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd36d1a4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd36cf7c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd37165f000)
libEGL.so.1 => /lib/x86_64-linux-gnu/libEGL.so.1 (0x00007fd36cf69000)
libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fd36cf62000)
libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fd36cf51000)
libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fd36cf3f000)
libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fd36ced8000)
libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fd36cea8000)
libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fd36cccd000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fd36cb8d000)
libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007fd36cb82000)
libXtst.so.6 => /lib/x86_64-linux-gnu/libXtst.so.6 (0x00007fd36cb7a000)
libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fd36cb5f000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fd36cb24000)
libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fd36caa1000)
libtiff.so.5 => /lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fd36ca1b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd36c9ff000)
libpcre2-32.so.0 => /lib/x86_64-linux-gnu/libpcre2-32.so.0 (0x00007fd36c97a000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fd36c949000)
libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fd36c940000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fd36c92c000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fd36c924000)
libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fd36c918000)
libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fd36c8ee000)
libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fd36c8b6000)
libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fd36c77f000)
libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fd36c763000)
libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fd36c75e000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fd36c751000)
libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fd36c745000)
libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fd36c73e000)
libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fd36c739000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fd36c6f2000)
libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fd36c6e8000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fd36c6d3000)
libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fd36c6ac000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fd36c6a5000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fd36c67b000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fd36c66c000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fd36c65f000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fd36c652000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd36c5dc000)
libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fd36c5cf000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fd36c5a5000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fd36c584000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fd36c565000)
libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007fd36c4f8000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fd36c4e4000)
libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007fd36c43e000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007fd36bffc000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fd36bfa8000)
libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 (0x00007fd36bf49000)
liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 (0x00007fd36bf38000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fd36be69000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fd36be59000)
libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fd36bda1000)
libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fd36bd6d000)
libOpenGL.so.0 => /lib/x86_64-linux-gnu/libOpenGL.so.0 (0x00007fd36bd41000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fd36bd38000)
libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007fd36bd2b000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fd36bce7000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fd36bcbb000)
libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007fd36bc9e000)
libwebp.so.7 => /lib/x86_64-linux-gnu/libwebp.so.7 (0x00007fd36bc32000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fd36bc05000)
libjbig.so.0 => /lib/x86_64-linux-gnu/libjbig.so.0 (0x00007fd36bbf4000)
libdeflate.so.0 => /lib/x86_64-linux-gnu/libdeflate.so.0 (0x00007fd36bbd0000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fd36bb82000)
libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fd36bb48000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fd36bb40000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fd36bb38000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fd36b98e000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fd36b7a3000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007fd36b75b000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007fd36b713000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fd36b691000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fd36b5c6000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fd36b597000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fd36b591000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fd36b581000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fd36b566000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fd36b543000)
libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fd36b53a000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fd36b503000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fd36b46a000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fd36b452000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fd36b38b000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fd36b250000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fd36b238000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fd36b22f000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fd36b21b000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fd36b20e000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fd36b1ee000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fd36b1e3000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fd36b0a3000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fd36b07d000)

Your error sounds like you still have your old system wxwidgets or self compiled wxwidgets. You need to get rid of both if you are using kicad from ppa.

You don’t “install” the ppa. Ppa is just a repository, you add it to you system’s list of repositories, that’s what add-apt-repository command does.
If you installed kicad after adding the ppa then you already have wxwidgets and wxpython (not python) from the ppa because they are pulled as dependencies.
Now you just need to install the dev package of wxwidgets which has headers so that cmake can find them. To do that you need to install package that has a name like libwxgtk3.0-dev I don’t have ubuntu and can’t check exact name for you. But that package is in the ppa and that is the one you should install, not system one, if there is similar named one.

Are these from your roll your own attempt? Get rid of them. Run the uninstall target in the source tree.

OOPS! I forgot to remove the wxWidgets I compiled. But, come to think, I don’t even know how to remove it. I’m an eternal newbie with linux things. And, yes, there were some files already installed related to wxWidgets before I even compiled my own, that I saw in the Muon package manager.

Okay, in Muon I see three packages:
libwxbase3.0-0v5
libwxgtk3.0-gtk3-0v5
python3-wxgtk4.0

Do I just remove them?

Now, in the source tree for wxwidgets, I don’t see anything resembling an “uninstall target”, but then again I would not recognize one if it hit me in the face.

Edit: Ahh! sudo make uninstall worked! I’m not THAT useless, I guess.

Edit 2: Hmmm … I’ve still got a lot of libwx entries in ldd /usr/bin/_eeschema.kiface:

    libwx_gtk3u_gl-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_gl-3.2.so.0 (0x00007fbe4c26b000)
    libwx_gtk3u_aui-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_aui-3.2.so.0 (0x00007fbe4c1c6000)
    libwx_gtk3u_html-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_html-3.2.so.0 (0x00007fbe4c0f7000)
    libwx_gtk3u_core-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.2.so.0 (0x00007fbe4b8b5000)
    libwx_baseu_net-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_baseu_net-3.2.so.0 (0x00007fbe4b874000)
    libwx_baseu-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_baseu-3.2.so.0 (0x00007fbe4b62b000)
    libwx_gtk3u_propgrid-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_propgrid-3.2.so.0 (0x00007fbe4b51f000)
    libwx_baseu_xml-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_baseu_xml-3.2.so.0 (0x00007fbe4b50b000)
    libwx_gtk3u_stc-3.2.so.0 => /lib/x86_64-linux-gnu/libwx_gtk3u_stc-3.2.so.0 (0x00007fbe4b31a000)

Does it mean my uninstall failed?
Or were these added by my ppa install?
Going to bed for tonight. Too tired. I’ll be back tomorrow afternoon.

No

Most likely, yes.

Note that the path changed and they now point to locations in /lib/x86_64-linux-gnu/ which is correct path for system libs in ubuntu.

Thanks! I’m still awake. So I tried again to build KiCAD, and now I get a slightly different error. Now it says it wants wxWidgets 3.2.1, whereas before it would be happy with 3.2.0. But now, the one I had built from source was, in fact, 3.2.1. I’ve no idea what came with the PPA thing, of course.
Now, I did execute a cmake -G Ninja -DWXWIDGETS_LIBRARY_PATH=/usr/local/include
some time, not sure if that could be causing a problem now.

dd@dd-20b7s4e800:~/Downloads/zip/KiCAD_git/kicad/build/release$ cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo …/…/
– KiCad install dir: </usr/local>
– Enabling warning -Wsuggest-override
– Enabling warning -Wduplicated-branches
– Enabling warning -Wduplicated-cond
– Enabling error for -Wvla
– Enabling warning -Wimplicit-fallthrough
– Enabling error for -Wreturn-type
– Enabling warning -Wshadow
– Enabling warning -Wsign-compare
– Enabling warning -Wmissing-field-initializers
– Enabling warning -Wempty-body
– Enabling warning -Wreorder
– Enabling warning -Wmismatched-tags
– Disabling warning -Wpsabi
– Check for installed GLEW – found
– Found the following HarfBuzz libraries:
– HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
– Found OpenCASCADE Standard Edition version: 7.5.0
– ++ OpenCASCADE Standard Edition include directory: /usr/local/include/opencascade
– ++ OpenCASCADE Standard Edition shared libraries directory: /usr/local/lib
– Check for installed Python Interpreter – found
– Python module install path: local/lib/python3.10/dist-packages
– pybind11 v2.9.2
– Found wxPython Phoenix 4.2.0/gtk3 (wxWidgets 3.2.1)
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at
least version “3.2.1”)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/FindwxWidgets.cmake:964 (find_package_handle_standard_args)
CMakeLists.txt:958 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/dd/Downloads/zip/KiCAD_git/kicad/CMakeFiles/CMakeOutput.log”.
See also “/home/dd/Downloads/zip/KiCAD_git/kicad/CMakeFiles/CMakeError.log”.
dd@dd-20b7s4e800:~/Downloads/zip/KiCAD_git/kicad/build/release$

Sounds like you skipped this step. Or maybe you just need to clean the cmake cache (delete the build dir) and run cmake from clean state.

Edit: I think package name is libwxgtk3.2-dev

If you follow this carefully it should be easy.