You need to compile wxGTK with gtk3 instead of gtk2 (which is the default
in slackbuilds) I use wxGTK3-3.0.5, I don't use the python stuff.
Tom Crane <TPCkicad@xxxxxxxxxxxxxxxxxxx> wrote:
I am having no success despite having been able to do this in the past.
Previously I was able to build for gtk2+ with Python2. Now trying this fails at runtime with eg. "(eeschema:6730): Gtk-ERROR **: 15:29:43.689: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported". According to https://forum.kicad.info/t/gtk-2-to-3-issues/24856/2 GTK2 isn't able to be used any more.
Instead (my preference anyway) I am now trying to build against gtk3+ and
Python3.
I get this error,
# cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_PYTHON3=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON -DKICAD_SCRIPTING_ACTION_MENU=ON -DBUILD_GITHUB_PLUGIN=ON -DKICAD_SPICE=ON ../
-- 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
-- Check for installed GLEW -- found
-- Check for installed ZLIB -- found
-- Check for installed Python Interpreter -- found
-- Python module install path: lib64/python3.8/site-packages
-- Found Phoenix 4.1.1a1/gtk3 (wxWidgets 3.1.5)
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find wxWidgets: Found unsuitable version "3.1.4", but required is at least "3.1.5" (found
-L/usr/lib64/gtk3;-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)
Call Stack (most recent call first):
/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:456
(_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindwxWidgets.cmake:1014
(find_package_handle_standard_args)
CMakeLists.txt:808 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/SBo/kicad-git/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/SBo/kicad-git/build/CMakeFiles/CMakeError.log".
CMakeError.log shows the test compilations failing with these three errors,
c++: error: unrecognized command line option '-Winconsistent-missing-override'
c++: error: unrecognized command line option '-Wmismatched-tags'
c++: error: unrecognized command line option '-Wimplicit-int-float-conversion'
BTW I am using GCC 9.3.0.
I built wxWidgets-3.1.4 using a slightly modified third party SlackBuilds
script for the wxGTK3 package, which includes the following configure,
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX}/gtk3 \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--localstatedir=/var \
--sysconfdir=/etc \
--disable-precomp-headers \
--disable-stl \
--enable-graphics_ctx \
--enable-mediactrl \
--enable-plugins \
--enable-unicode \
--with-gtk=3 \
--with-opengl \
--program-prefix= \
--program-suffix= \
--build=$TARGET
It includes the '--with-opengl' option as required by Kicad at
https://docs.kicad-pcb.org/doxygen/md_Documentation_development_compiling.html.
Initially I built the SlackBuilds wxPython4 package which uses wxPython /
Phoenix version 4.0.7.post2 and tried building Kicad with that.
Then I tried the wxWidgets/Phoenix git source (reports as Merge branch
'sip-4.19.24'). The Kicad build log above was built against that.
I am confused as to whether my Kicad build log failed due to compiler flag
or package dependency problems...
I also tried building the kicad-5.1.7 stable/release (with gtk2+,
Python2). That was successful but my current project's new format files
(eg. .kicad_sch rather than .sch) means I cannot use kicad-5.1.7.
My last successful build of kicad-git (i.e. from
https://github.com/KiCad/kicad-source-mirror.git), used gtk2+ & Python2,
has nasty bugs -- eg. segfaults when trying to switch between sheets in
eeschema and is barely usable which is why I need to rebuild.
I am stuck. Please help!
Thanks
Tom Crane.
--
Tom Crane, Digital Electronics Engineer, Dept. Physics, Royal Holloway, University of London, Egham Hill,
Egham, Surrey, TW20 0EX, England.
Email: T.Crane@xxxxxxxxxx
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp