[SOLVED] Linux Mint 19.3 build problem with wxwidgets

I cloned git repo and checked out tag 5.1.6.

Following the KiCad build instructions on https://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html#build_linux
I got stuck with this error:

kicad/build/debug $ cmake ../../
-- KiCad install dir: </usr/local>
-- Check for installed GLEW -- found
-- Boost version: 1.62.0
-- Check for installed Python Interpreter -- found
-- Python module install path: lib/python2.7/dist-packages
-- Found wxPython 3.0.2.0/gtk3 (wxWidgets 3.0.2.0)
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.0.2.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/FindwxWidgets.cmake:944 (find_package_handle_standard_args)
  CMakeLists.txt:795 (find_package)


-- Configuring incomplete, errors occurred!
See also "/opt/kicad/build/debug/CMakeFiles/CMakeOutput.log".

Here my packages:

dpkg -l | grep wx
ii  libwxbase3.0-0v5:amd64                          3.0.4+dfsg-3                                     amd64        wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit
ii  libwxbase3.0-dev                                3.0.4+dfsg-3                                     amd64        wxBase library (development) - non-GUI support classes of wxWidgets toolkit
ii  libwxgtk3.0-0v5:amd64                           3.0.4+dfsg-3                                     amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
ii  libwxgtk3.0-dev                                 3.0.4+dfsg-3                                     amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
ii  libwxgtk3.0-gtk3-0v5:amd64                      3.0.4+dfsg-3                                     amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ 3 runtime)
ii  python-wxgtk3.0                                 3.0.2.0+dfsg-7                                   amd64        Python interface to the wxWidgets Cross-platform C++ GUI toolkit
ii  python-wxtools                                  3.0.2.0+dfsg-7                                   all          Tools from the wxPython distribution
ii  python-wxversion                                3.0.2.0+dfsg-7                                   all          API for selecting the wxPython version to use
ii  python3-wxgtk4.0                                4.0.1+dfsg-2                                     amd64        Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit
ii  wx-common                                       3.0.4+dfsg-3                                     amd64        wxWidgets Cross-platform C++ GUI toolkit (common support files)
ii  wx3.0-headers                                   3.0.4+dfsg-3                                     all          wxWidgets Cross-platform C++ GUI toolkit (header files)

Here is how I solved it, based on:

sudo apt install libwxgtk3.0-gtk3-dev
sudo update-alternatives --config wx-config
Select gtk3-unicode-3.0
2 Likes

These are the final steps I followed in Ubuntu 18.04 / Linux Mint 19.3 in case it is useful for someone else:

sudo apt install cmake g++ bison flex automake libtool libglm-dev liboce-ocaf-dev swig libwxbase3.0-dev libwxgtk3.0-dev libwxgtk3.0-gtk3-dev libboost-test-dev  libboost-system-dev  libboost-filesystem-dev  libboost-test-dev 
sudo update-alternatives --config wx-config
# Select gtk 3.0
cd /opt/
sudo mkdir kicad
sudo chown $USER kicad
git clone https://gitlab.com/kicad/code/kicad.git
cd kicad/
git checkout tags/5.1.6
cd scripting/build_tools/
chmod +x get_libngspice_so.sh 
./get_libngspice_so.sh 
sudo ./get_libngspice_so.sh install
cd ../../
mkdir -p build/release
cd build/release/
cmake ../../
make -j8
build/release/kicad/kicad
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.