Compiling 6.0.0 on Ubuntu 18.04

Hello,
I am trying to compile KiCad V6.0.0 on Ubuntu Linux 18.04 and stumble over the following cmake error:


– Found SWIG: /usr/bin/swig3.0 (found suitable version “3.0.12”, minimum required is “3.0”)
– pybind11 v2.7.1
– Found PythonInterp: /usr/bin/python3 (found version “3.6.9”)
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
– Performing Test HAS_FLTO
– Performing Test HAS_FLTO - Success
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.9”, minimum required is “3.6”)
– Check for installed Python Interpreter – found
– Python module install path: lib/python3/dist-packages
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version “3.6.9”, minimum required is “3.6”)
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘wx’
CMake Error at CMakeModules/FindwxPython.cmake:56 (message):
wxPython/Phoenix does not appear to be installed on the system
Call Stack (most recent call first):
CMakeLists.txt:827 (find_package)

There seems to miss the module wx, which seems to belong to wxPython/Phoenix.
Can someone tell me please, how to resolve this. Thanks.

Regards, Bernd.

I’m trying very hard to avoid having to compile myself, and therefore can’t help much.
Maybe this helps (a bit):

Do you have python3-wxgtk4.0 installed?

I installed python3-pip and wxpython to get Phoenix 4.1.1/gtk3. Then I compiled and installed wxWidgets to get the required version 3.1.5. Now I get another CMake Error:


– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
– Performing Test HAS_FLTO
– Performing Test HAS_FLTO - Success
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.9”, minimum required is “3.6”)
– Check for installed Python Interpreter – found
– Python module install path: lib/python3/dist-packages
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version “3.6.9”, minimum required is “3.6”)
– Found Phoenix 4.1.1/gtk3 (wxWidgets 3.1.5)
– Found wxWidgets: -L/usr/local/lib;-pthread;;;-lwx_gtk3u_gl-3.1;-lwx_gtk3u_aui-3.1;-lwx_gtk3u_html-3.1;-lwx_gtk3u_core-3.1;-lwx_baseu_net-3.1;-lwx_baseu-3.1;-lwx_gtk3u_propgrid-3.1;-lwx_baseu_xml-3.1;-lwx_gtk3u_stc-3.1;-lwx_gtk3u_richtext-3.1 (found suitable version “3.1.5”, minimum required is “3.1.5”)
– Found Doxygen: /usr/bin/doxygen (found version “1.8.13”) found components: doxygen dot
– Found UnixCommands: /bin/bash
– Checking for module ‘gtk±3.0’
– Found gtk±3.0, version 3.22.30
– S3DSG version: 2.0.0
CMake Error at utils/kicad2step/CMakeLists.txt:34 (target_link_libraries):
Object library target “kicad2step_lib” may not link to anything.

But I cannot find the specified file CMakeLists.txt.

Regards, Bernd.

Hmm. I had your original error but adding the correct wxWidgets got me through. I downloaded the tarball and built from that. What are you using as source? I’m on Debian.

Hello,

I downloaded wxWidgets-3.1.5.tar.bz2 built and installed it with no problems.

I found the specified utils/kicad2step/CMakeLists.txt and this is the contents around line 34:

target_link_libraries( kicad2step_lib <---------------------- line 34
sexpr
${wxWidgets_LIBRARIES}
${OCC_LIBRARIES}
${ZLIB_LIBRARIES}
kimath
)

${wxWidgets_LIBRARIES} could be empty, because wxWidgets might not have been found.

Regards, Bernd.

I used Synaptic because I really had no flipping idea what supplied Phoenix when I got this error. :wink: I had seen this thread but didn’t actually reference it while compiling. Should have because

is the package I found and installed and it ‘just worked’ after that. I know little to nothing about pip. When I asked for ‘source’ I meant Kicad source. I just used the bzip2 tarball form gitlab.

As source I downloaded kicad-source-mirror-6.0.0.zip from https://github.com/KiCad/kicad-source-mirror/tree/6.0.0.

I now found python3-wxgtk4.0 in Synaptic and installed it. But it did not change anything. Same cmake error message.

I am starting to dislike this whole python stuff ;-(

This has nothing to do with python. Ubuntu 18.04 is over 3.5 years old. If you want or need to stick to it, you have to accept some baggage which comes with the age. However, 6.0 seems to be packaged for 18.04 here: https://launchpad.net/~kicad/+archive/ubuntu/kicad-6.0-releases. You should be able to follow the instructions here: https://gitlab.com/eelik-kicad/kicad/-/wikis/How-to-build-KiCad-on-Ubuntu-(the-easy-way), replacing the suggested ppa with the needed one, and then just compile. I haven’t tested with 18.04, so I don’t know which compile flags this ppa package uses and if all the wanted dependencies are satisfied in your case.

Just now I did:

paul@cezanne:~$ sudo apt update
paul@cezanne:~$ sudo apt upgrade

and from the few minutes working with it I seem to have a properly working KiCad V6 now.

Before that (just 7 hours earlier) there was some trouble with either launchpad or with the PPA for KiCad V6 on Launchpad, and I could not update. Because of those launchpad problems I did give a compilation of KiCad V6 a try, but I quickly gave up myself when I it a missing dependency for OpenGL. I did not see a list of dependencies, and I was not in the mood of tracking down and fixing them one by one.

==============
Found some instructions on:
https://dev-docs.kicad.org/en/build/linux/
What I did yesterday was:

paul@cezanne:~/projects/linux$ git clone https://gitlab.com/kicad/code/kicad.git
paul@cezanne:~/projects/linux$ cd kicad
paul@cezanne:~/projects/linux/kicad$ mkdir -p build/release
paul@cezanne:~/projects/linux/kicad$ cd build/release
paul@cezanne:~/projects/linux/kicad/build/release$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo         ../../

Because the normal install works for me now, I have no interest in getting this compile stuff for KiCad working.

thank you eelik (and the others) for trying to help. But I give up for now. Since I am completely satisfied with KiCad V5.x, I will not try again until I have a newer Ubuntu installed.
Regards, Bernd.

There was an issue for cmake step on bionic.
Next version (6.0.1) will fix that.

See: Ubuntu PPA Package repository- 6.0.0.0rc1 gets installed instead of release (#10279) · Issues · KiCad / KiCad Source Code / kicad · GitLab

2 Likes

Bionic builds for amd64 are available again.

1 Like

cmake now runs without errors. When compiling KiCad I now get the following error:

[ 22%] Building CXX object common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o
In file included from /home/bernd/kicad/kicad-source-mirror-6.0.0/include/gal/opengl/shader.h:32,
from /home/bernd/kicad/kicad-source-mirror-6.0.0/include/gal/opengl/opengl_gal.h:35,
from /home/bernd/kicad/kicad-source-mirror-6.0.0/common/draw_panel_gal.cpp:42:
/home/bernd/kicad/kicad-source-mirror-6.0.0/include/gal/opengl/kiglew.h:53:14:
error: #error “KICAD_USE_EGL must be defined since wxWidgets has been compiled with the EGL canvas”

This looks to me as if I didn’t compile wxWidgets with the correct canvas options.

Is defining KICAD_USE_EGL in the KiCad build options the right way, or must wxWidgets be compiled with other options? Thanks.

Regards, Bernd.

Compiling with KICAD_USE_EGL is fine. Just add -DKICAD_USE_EGL=1 or something like that to the cmake command line.

1 Like

With “-DKICAD_USE_EGL=1” I got it compiled. Thanks.

Application: KiCad

Version: 6.0.0, release build

Libraries:
wxWidgets 3.1.5
libcurl/7.58.0 OpenSSL/1.1.1 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 5.3.0-46-generic x86_64, 64 bit, Little endian, wxGTK, mate, x11

Build Info:
Date: Jan 8 2022 13:40:35
wxWidgets: 3.1.5 (wchar_t,wx containers) GTK+ 3.22
Boost: 1.65.1
OCC: 7.5.2
Curl: 7.58.0
ngspice: 31
Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
KICAD_USE_OCC=ON
KICAD_USE_EGL=ON
KICAD_SPICE=ON

Regards, Bernd

2 Likes