Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873124 - sci-electronics/kicad-6.*: Add wxGTK wxWidgets 3.2 compatibility
Summary: sci-electronics/kicad-6.*: Add wxGTK wxWidgets 3.2 compatibility
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 577030 766914
Blocks:
  Show dependency tree
 
Reported: 2022-09-27 05:34 UTC by jospezial
Modified: 2023-04-22 11:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2022-09-27 05:34:21 UTC
kicad ebuild needs the same WX_GTK_VER= setting and wxGTK dependency in its ebuild as dev-python/wxpython.

Otherwise it fails in configure phase:

>>> Emerging (3 of 4) dev-python/wxpython-4.2.0::stefantalpalaru
>>> Installing (3 of 4) dev-python/wxpython-4.2.0::stefantalpalaru
>>> Emerging (4 of 4) sci-electronics/kicad-6.0.7::gentoo
>>> Failed to emerge sci-electronics/kicad-6.0.7, Log file:
>>>  '/var/tmp/portage/sci-electronics/kicad-6.0.7/temp/build.log'
>>> Jobs: 3 of 4 complete, 1 failed                 Load avg: 1.41, 2.45, 2.92
 * Package:    sci-electronics/kicad-6.0.7:0
 * Repository: gentoo
 * Maintainer: zoltan@sinustrom.info proxy-maint@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux nls occ openmp pcm python_single_target_python3_10 userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
 * Using python3.10 to build
 * 
 * Requested wxWidgets:        3.0-gtk3
 * Using wxWidgets:            gtk3-unicode-3.0-gtk3
 * 
 * Checking for at least 900 MiB disk space at "/var/tmp/portage/sci-electronics/kicad-6.0.7/temp" ...
 [ ok ]
>>> Unpacking source...
>>> Unpacking kicad-6.0.7.tar.gz to /var/tmp/portage/sci-electronics/kicad-6.0.7/work
>>> Source unpacked in /var/tmp/portage/sci-electronics/kicad-6.0.7/work
>>> Preparing source in /var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build"
 * Applying kicad-scripts-install-fix.patch ...
 [ ok ]
 * Applying kicad-6.0.6-unitialized-variable-fix.patch ...
 [ ok ]
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *      set( CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Set to either \"R
 *      set( CMAKE_BUILD_TYPE Release CACHE STRING "Set to either \"Release\" or 
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build"
cmake -C /var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DKICAD_DOCS=/usr/share/doc/kicad-doc-6.0.7 -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_BUILD_I18N=yes -DKICAD_I18N_UNIX_STRICT_PATH=yes -DPYTHON_DEST=/usr/lib/python3.10/site-packages -DPYTHON_EXECUTABLE=/usr/bin/python3.10 -DPYTHON_INCLUDE_DIR=/usr/include/python3.10 -DPYTHON_LIBRARY=/usr/lib64/libpython3.10.so -DKICAD_SPICE=no -DKICAD_PCM=yes -DKICAD_USE_OCC=yes -DKICAD_INSTALL_DEMOS=no -DCMAKE_SKIP_RPATH=ON -DOCC_INCLUDE_DIR=/usr/include/opencascade -DOCC_LIBRARY_DIR=/usr/lib64/opencascade -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build/gentoo_toolchain.cmake /var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7
loading initial cache file /var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- KiCad install dir: </usr>
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for iso646.h
-- Looking for iso646.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for malloc
-- Looking for malloc - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Looking for asinh
-- Looking for asinh - found
-- Looking for acosh
-- Looking for acosh - found
-- Looking for atanh
-- Looking for atanh - found
-- Performing Test HAVE_CMATH_ISINF
-- Performing Test HAVE_CMATH_ISINF - Success
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getc_unlocked
-- Looking for getc_unlocked - found
-- Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE
-- Performing Test COMPILER_SUPPORTS_WSUGGEST_OVERRIDE - Success
-- Enabling warning -Wsuggest-override
-- Performing Test COMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE
-- Performing Test COMPILER_SUPPORTS_WINCONSISTENT_MISSING_OVERRIDE - Failed
-- Performing Test COMPILER_SUPPORTS_WDUPLICATED_BRANCHES
-- Performing Test COMPILER_SUPPORTS_WDUPLICATED_BRANCHES - Success
-- Enabling warning -Wduplicated-branches
-- Performing Test COMPILER_SUPPORTS_WDUPLICATED_COND
-- Performing Test COMPILER_SUPPORTS_WDUPLICATED_COND - Success
-- Enabling warning -Wduplicated-cond
-- Performing Test COMPILER_SUPPORTS_WVLA
-- Performing Test COMPILER_SUPPORTS_WVLA - Success
-- Enabling error for -Wvla
-- Performing Test COMPILER_SUPPORTS_WIMPLICIT_FALLTHROUGH
-- Performing Test COMPILER_SUPPORTS_WIMPLICIT_FALLTHROUGH - Success
-- Enabling warning -Wimplicit-fallthrough
-- Performing Test COMPILER_SUPPORTS_WRETURN_TYPE
-- Performing Test COMPILER_SUPPORTS_WRETURN_TYPE - Success
-- Enabling error for -Wreturn-type
-- Performing Test COMPILER_SUPPORTS_WSHADOW
-- Performing Test COMPILER_SUPPORTS_WSHADOW - Success
-- Enabling warning -Wshadow
-- Performing Test COMPILER_SUPPORTS_WSIGN
-- Performing Test COMPILER_SUPPORTS_WSIGN - Success
-- Enabling warning -Wsign-compare
-- Performing Test COMPILER_SUPPORTS_WMISSING_INIT
-- Performing Test COMPILER_SUPPORTS_WMISSING_INIT - Success
-- Enabling warning -Wmissing-field-initializers
-- Performing Test COMPILER_SUPPORTS_WEMPTY_BODY
-- Performing Test COMPILER_SUPPORTS_WEMPTY_BODY - Success
-- Enabling warning -Wempty-body
-- Performing Test COMPILER_SUPPORTS_WREORDER
-- Performing Test COMPILER_SUPPORTS_WREORDER - Success
-- Enabling warning -Wreorder
-- Performing Test COMPILER_SUPPORTS_WMISMATCHED_TAGS
-- Performing Test COMPILER_SUPPORTS_WMISMATCHED_TAGS - Success
-- Enabling warning -Wmismatched-tags
-- Performing Test COMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION
-- Performing Test COMPILER_SUPPORTS_WIMPLICIT_FLOAT_CONVERSION - Failed
-- Performing Test COMPILER_SUPPORTS_WPSABI
-- Performing Test COMPILER_SUPPORTS_WPSABI - Success
-- Disabling warning -Wpsabi
-- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found GLEW: /usr/include  
-- Check for installed GLEW -- found
-- Found GLM: /usr/include (found suitable version "0.9.9.8", minimum required is "0.9.8") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.12") 
-- Check for installed ZLIB -- found
-- Found CURL: /usr/lib64/libcurl.so (found version "7.85.0")  
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "1.8.0") 
-- Checking for module 'cairo'
--   Found cairo, version 1.17.7
-- Found Cairo: /usr/lib64/libcairo.so (found suitable version "1.17.7", minimum required is "1.12") 
-- Checking for module 'pixman-1'
--   Found pixman-1, version 0.40.0
-- Found Pixman: /usr/lib64/libpixman-1.so (found suitable version "0.40.0", minimum required is "0.30") 
-- Found Boost: /usr/lib64/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.59.0")  
-- Found OCC: /usr/include/opencascade (found version "7.6.3") 
-- Found OpenCASCADE Standard Edition version: 7.6.3
--  ++ OpenCASCADE Standard Edition include directory: /usr/include/opencascade
--  ++ OpenCASCADE Standard Edition shared libraries directory: /usr/lib64/opencascade
-- Found SWIG: /usr/bin/swig (found suitable version "4.0.2", minimum required is "3.0") 
-- Found PythonInterp: /usr/bin/python3.10 (found suitable version "3.10.7", minimum required is "3.6") 
-- Check for installed Python Interpreter -- found
-- Python module install path: /usr/lib/python3.10/site-packages
-- Found PythonLibs: /usr/lib64/libpython3.10.so (found suitable version "3.10.7", minimum required is "3.6") 
-- pybind11 v2.9.2 
-- Found PythonLibs: /usr/lib64/libpython3.10.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found wxPython Phoenix 4.2.0/gtk3 (wxWidgets 3.2.1)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets: Found unsuitable version "3.0.5", but required is
  at least "3.2.1" (found
  -L/usr/lib64;-pthread;;;-lwx_gtk3u_gl-3.0-gtk3;-lwx_gtk3u_aui-3.0-gtk3;-lwx_gtk3u_adv-3.0-gtk3;-lwx_gtk3u_html-3.0-gtk3;-lwx_gtk3u_core-3.0-gtk3;-lwx_baseu_net-3.0-gtk3;-lwx_baseu-3.0-gtk3;-lwx_gtk3u_propgrid-3.0-gtk3;-lwx_baseu_xml-3.0-gtk3;-lwx_gtk3u_stc-3.0-gtk3;-lwx_gtk3u_richtext-3.0-gtk3)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/FindwxWidgets.cmake:951 (find_package_handle_standard_args)
  CMakeLists.txt:888 (find_package)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build/CMakeFiles/CMakeError.log".
 * ERROR: sci-electronics/kicad-6.0.7::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  122:  Called src_configure
 *   environment, line 3532:  Called cmake_src_configure
 *   environment, line 1867:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=sci-electronics/kicad-6.0.7::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-electronics/kicad-6.0.7::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-electronics/kicad-6.0.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-electronics/kicad-6.0.7/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7_build'
 * S: '/var/tmp/portage/sci-electronics/kicad-6.0.7/work/kicad-6.0.7'

Do we need a second ebuild or can we solve the problem in one ebuild?
Or should we respect the setting by eselect?
Comment 1 jospezial 2022-09-27 11:20:26 UTC
error "KICAD_USE_EGL must be defined since wxWidgets has been compiled with the EGL canvas"

If x11-libs/wxGTK-3.2.1-r300 is compiled with "egl" USE flag enabled then sci-electronics/kicad ebuild needs to set
-DKICAD_USE_EGL
Comment 2 jospezial 2022-09-27 11:29:30 UTC
-DKICAD_USE_EGL="$(usex egl)"
or
-DKICAD_USE_EGL=ON
Comment 3 Zoltan Puskas 2022-10-08 04:31:53 UTC
Next time please include `emerge --info` output with your bug report.

Nonetheless I was able to figure out the issue here. You are using out of tree wxGTK and wxpython packages from the stefantalpalaru overlay.

In general out of tree packages are not supported. Current Portage versions of wxGTK don't have an `egl` USE flag, so I cannot update the KiCad ebuild to have one that forces it on wxGTK too, as it would break the main tree.

I recommend you create a patch locally and place it into /etc/patches that changes -DKICAD_USE_EGL to default to ON in the CMake file or alternatively you can also maintain a local version of the KiCad ebuild.
Comment 4 Joonas Niilola gentoo-dev 2022-10-13 07:04:09 UTC
(In reply to Zoltan Puskas from comment #3)
> 
> I recommend you create a patch locally and place it into /etc/patches that
> changes -DKICAD_USE_EGL to default to ON in the CMake file or alternatively
> you can also maintain a local version of the KiCad ebuild.

You should be able to do this via package.env too, with "MYCMAKEARGS".
Comment 5 jospezial 2022-10-16 14:46:19 UTC
kicad-6.0.7 and kicad-9999 fail to build with USE=ngspice and x11-libs/wxGTK-3.2.1-r300 / wxpython-4.2.0

I have reported it there:
https://gitlab.com/kicad/code/kicad/-/issues/12665

We can reopen this bug here when wxGTK 3.2 reaches the tree.
Comment 6 jospezial 2022-11-23 03:13:57 UTC
I now found the reason why kicad fails to build with USE=ngspice and wxGTK 3.2.1:
All wxGTK ebuilds that are flying around for Gentoo have

--enable-compat28

That defines
WXWIN_COMPATIBILITY_2_8

and under
#if WXWIN_COMPATIBILITY_2_8
in /usr/include/wx-3.2-gtk3/wx/tbarbase.h
are the deprecated methods that let the compiler fail for kicad.

These old lines are now removed in wxWidgets master git branch
https://github.com/wxWidgets/wxWidgets/commit/5e2da5a1066332c86f6c31223e9733337b438163

If I emerge x11-libs/wxGTK-3.2.1-r300 with 
--disable-compat28
and reemerge wxpython then I have success.

The compat setting is now discussed at
https://github.com/gentoo/gentoo/pull/28360#discussion_r1029837714
Comment 7 Larry the Git Cow gentoo-dev 2023-01-20 22:18:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5fa6a7f4de2426217956f0a893c480b9fe873c2

commit b5fa6a7f4de2426217956f0a893c480b9fe873c2
Author:     brahmajit das <listout@protonmail.com>
AuthorDate: 2022-11-21 08:47:43 +0000
Commit:     Arsen Arsenović <arsen@gentoo.org>
CommitDate: 2023-01-20 22:15:47 +0000

    x11-libs/wxGTK: Version bump to 3.2.1
    
    Closes: https://bugs.gentoo.org/577030
    Closes: https://bugs.gentoo.org/873124
    Signed-off-by: brahmajit das <listout@protonmail.com>
    Signed-off-by: Arsen Arsenović <arsen@gentoo.org>

 x11-libs/wxGTK/Manifest                            |   2 +
 .../wxGTK/files/wxGTK-3.2.1-configure-tests.patch  |  19 +++
 .../wxGTK-3.2.1-gtk3-translation-domain.patch      |  12 ++
 x11-libs/wxGTK/wxGTK-3.2.1.ebuild                  | 177 +++++++++++++++++++++
 4 files changed, 210 insertions(+)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-20 22:28:49 UTC
Reopening now eclass support is available.
Comment 9 jospezial 2023-02-13 19:50:50 UTC
upstream has released kicad-7.0.0
Comment 10 jon R-B 2023-02-13 20:05:11 UTC
Please note this will require wxpython-4.2 for plugins to work
Comment 11 Jonas Stein gentoo-dev 2023-02-15 22:51:48 UTC
*** Bug 894660 has been marked as a duplicate of this bug. ***
Comment 12 Zoltan Puskas 2023-02-16 05:34:07 UTC
(In reply to jon R-B from comment #10)
> Please note this will require wxpython-4.2 for plugins to work

Thanks for the heads up. If that's the case then for now I'll keep KiCad on wxGTK on 3.0 series until wxPython lands in main portage tree.
Comment 13 jospezial 2023-02-21 19:37:23 UTC
As we now have up-to-date kicad 7+ ebuilds set to wxGTK 3.2 and wxpython-4.2.0 I see no need for this bug report further.
6.0.9 has been stabilized and can stay as it is for stable users.
Anybody else is advised to use kicad 7+ which will be stabilized anyway in near future.

Zoltan, if you have other plans for 6 branch, reopen.
Comment 14 Alex Orange 2023-02-21 21:51:58 UTC
(In reply to jon R-B from comment #10)
> Please note this will require wxpython-4.2 for plugins to work

Please provide an example where this is a problem. I am using kicad 7.0.0 with wxpython-4.0 and have tested plugins and do not see a problem.

Unless wxpython-4.2.0 is due to be stabilized soon I would suggest against depending on it.
Comment 15 Zoltan Puskas 2023-02-22 03:08:41 UTC
Actually I was thinking going another way, and dropping the wxGTK as a direct dependency to KiCad along with the WX_GTK_VER specifier, since we already depend on wxpython, which will in turn pull in wxGTK with the correct use flags set anyway.

What KiCad really needs is to be rebuilt anytime wxpython version changes, which can be achieved by updating the slot operator. As long as wxpython is built against the correct wxGTK version, KiCad should work. 

@matthews has already backported some patches to fix wxpython version detection from upstream, which will be included in 7.0.1.

As for KiCad 6 series, it could be worth also fixing it, e.g. by adding 6.0.11 release and applying patches as needed or by forcing the dependency to be wxGTK-3.0 and wxpython-4.0 only. KiCad 7.0.0 is a major version and for industrial users it might take some time/testing to migrate, thus having both the latest KiCad-6 version and the new KiCad-7 series in parallel could be meaningful for some time to allow users the choice to upgrade a bit slower.
Comment 16 Larry the Git Cow gentoo-dev 2023-04-19 17:50:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efdb96fba96c4cc3da3a877ed8676346e93ff28e

commit efdb96fba96c4cc3da3a877ed8676346e93ff28e
Author:     Zoltan Puskas <zoltan@sinustrom.info>
AuthorDate: 2023-03-20 01:24:41 +0000
Commit:     Matthew Smith <matthew@gentoo.org>
CommitDate: 2023-04-19 17:47:10 +0000

    sci-electronics/kicad: Fix up stable version
    
    - Restrict to Python
    - Restrict to wxwidgets
    - Change tarball to bz2 compression
    
    Bug: https://bugs.gentoo.org/873124
    Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info>
    Signed-off-by: Matthew Smith <matthew@gentoo.org>

 sci-electronics/kicad/Manifest                                      | 2 +-
 sci-electronics/kicad/{kicad-6.0.9.ebuild => kicad-6.0.9-r1.ebuild} | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)