Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689798 - dev-db/wxsqlite3 - move over to WX_GTK_VER=3.0-gtk3, EAPI-7 bump
Summary: dev-db/wxsqlite3 - move over to WX_GTK_VER=3.0-gtk3, EAPI-7 bump
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo wxWidgets Herd
URL: https://utelle.github.io/wxsqlite3/do...
Whiteboard:
Keywords:
Depends on:
Blocks: wxgtk2-removal EAPI5Removal 769626
  Show dependency tree
 
Reported: 2019-07-13 21:00 UTC by MJ
Modified: 2021-04-04 21:11 UTC (History)
0 users

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


Attachments
patch for stage "configure" (wxsqlite3-3.2.1-support-gtk3.patch,2.41 KB, patch)
2020-10-24 11:36 UTC, Atlant
Details | Diff
support new patch in ebuild (wxsqlite3-3.2.1-r2.ebuild,1.20 KB, text/plain)
2020-10-24 11:37 UTC, Atlant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MJ 2019-07-13 21:00:41 UTC
Even when selecting GTK3 version of wxwidgets using eselect, emerging wxsqlite3 still compiles for GTK2.

Available wxWidgets profiles:
  [1]   gtk2-unicode-3.0
  [2]   gtk3-unicode-3.0-gtk3 *


Take a look at the emerge log: https://dpaste.de/mknN

"checking for wx-config... /usr/lib64/wx/config/gtk2-unicode-3.0
.
.
checking which wxWidgets toolkit was selected... gtk2
.
.
The wxWidgets build which will be used by wxSqlite3 3.2.1 has the following settings:
.
.
.
  - PORT: gtk2"


If the GTK3 version is not supposed to be supported by this ebuild, can you support it?
Comment 1 Mart Raudsepp gentoo-dev 2019-07-16 09:19:40 UTC
Does the gtk3 port compile and work fine for wxSqlite3-3.2.1?
You can try by changing WX_GTK_VER from "3.0" to "3.0-gtk3" in the ebuild, and in DEPEND "x11-libs/wxGTK:3.0[X]" to "x11-libs/wxGTK:${WX_GTK_VER}[X]"
Comment 2 Mart Raudsepp gentoo-dev 2019-07-16 09:21:02 UTC
For context, eselect is ONLY for users use; packaging must set WX_GTK_VER and call setup-wxwidgets (done by wxwidgets.eclass unless overridden) to express what the package must use, as it's not OK to just build what is chosen by eselect, as the package manager has no knowledge of it to properly lock the required deps.
Comment 3 MJ 2019-07-16 09:48:57 UTC
(In reply to Mart Raudsepp from comment #2)
> For context, eselect is ONLY for users use; packaging must set WX_GTK_VER
> and call setup-wxwidgets (done by wxwidgets.eclass unless overridden) to
> express what the package must use, as it's not OK to just build what is
> chosen by eselect, as the package manager has no knowledge of it to properly
> lock the required deps.

But eselect changes the behaviour of wx-config, which is used by wxsqlite3 while building it, but the ./configure script used by wxsqlite3 also detects the available wxwidgets by itself. This will cause contradiction.

For example if I have wxwidgets 3.0-gtk3 selected by eselect, the ./configure script will still select the gtk2 version by default. This results in a library binary which causes "Floating Point Exception" by just linking it to your program, without even using the library itself.
Comment 4 Mart Raudsepp gentoo-dev 2019-07-16 10:00:19 UTC
wxwidgets.eclass sets up WX_ECLASS_CONFIG variable and that overrides wx-config, which is a gentoo-specific implementation in /usr/bin/wx-config which routes it to the eselected specific version, or whatever packaging overrides it to via WX_ECLASS_CONFIG.
Comment 5 MJ 2019-07-16 10:57:20 UTC
(In reply to Mart Raudsepp from comment #1)
> Does the gtk3 port compile and work fine for wxSqlite3-3.2.1?

wxWidgets 3.0-gtk3 shows "Floating Point Exception" by just linking wxsqlite with it. So it does not work.

> You can try by changing WX_GTK_VER from "3.0" to "3.0-gtk3" in the ebuild,
> and in DEPEND "x11-libs/wxGTK:3.0[X]" to "x11-libs/wxGTK:${WX_GTK_VER}[X]"

Can you make a new slot for wxsqlite3 for 3.0-gtk3? Or at least making the ebuild work according to eselect?

By the way, "eselect kernel" does change how portage compiles some packages that require kernel source, so why not do the same for wxwidgets?
Comment 6 Mart Raudsepp gentoo-dev 2019-07-16 11:58:12 UTC
(In reply to Mahmoud Jaoune from comment #5)
> wxWidgets 3.0-gtk3 shows "Floating Point Exception" by just linking wxsqlite
> with it. So it does not work.
> 
> Can you make a new slot for wxsqlite3 for 3.0-gtk3? Or at least making the
> ebuild work according to eselect?

Not if it immediately crashes anyways...

> By the way, "eselect kernel" does change how portage compiles some packages
> that require kernel source, so why not do the same for wxwidgets?

I already explained why. Kernel is not comparable here - kernel packages are source only and not a binary result like a library package such as wxGTK.
Comment 7 MJ 2019-07-16 12:21:25 UTC
(In reply to Mart Raudsepp from comment #6)
> Not if it immediately crashes anyways...

It crashes because it was built for GTK2 not GTK3. The crash only happens when you link it to a wxWidgets-GTK3 program and works with a wxWidgets-GTK2.

I have tried building the library myself outside portage from source and it works flawlessly.
Comment 8 Mart Raudsepp gentoo-dev 2019-07-16 12:47:53 UTC
I need to research what it'll take then to move everything over. Looks like testing wxsqlite3 and all consumers (guayadeque) against gtk3 and moving them over together in lockstep. wxwidgets@ maintains this stuff just historically, it could really use a dedicated maintainer.
But still, you can help testing it:
I assume you are trying it with guayadeque? In that case change that package locally over to WX_GTK_VER=3.0-gtk3 as well, just like wxsqlite3, so they both link against the same gtk version.
Comment 9 MJ 2019-07-16 13:18:30 UTC
(In reply to Mart Raudsepp from comment #8)
> I assume you are trying it with guayadeque?

Nope, I am using the library in a program I am developing.


If you meant that I help you with the wx ebuilds or maintain an ebuild, then I really stopped contributing to Gentoo's ebuild repo ever since I have tried to maintain a new package (RetroArch) for the first time, that was when the Gentoo repo admins kept demanding changes (Which most of them didn't make sense) until I had lost my temper, I really thought they were just trying to make this hard for me just to make me drop the PR.

Just for your curiosity, here are the PRs still laying there closed:
https://github.com/gentoo/gentoo/pull/7964
https://github.com/gentoo/gentoo/pull/8577


Anyways back to the point, as I had told you, I already built wxsqlite3 and added it to pkg-config in my machine and I am working with it without problems, I just wanted to post this bug to fix the package in portage so people wouldn't need to build the library manually like I did. Also the fact that wxWidgets developers might deprecate GTK2 anytime so more developers are shifting to wxGTK3.
Comment 10 Mart Raudsepp gentoo-dev 2019-07-16 18:01:15 UTC
The wxsqlite3 in gentoo tree is for the purpose of the gentoo tree. Unfortunately that's against gtk2 so far. If you want to use it against an app that builds against gtk3 wxGTK, then you need to wait for the gentoo package to get there, and use your own wxsqlite3 for your development efforts, or modify the package in a local overlay to use WX_GTK_VER=3.0-gtk3 as described before. Main tree can get to gtk3 only after someone does the work to bring it there in coordination with its consumers (currently only guayadeque); I'm not sure when I'd get to it, as I have never even touched wxsqlite3 before - it's a historical package baggage for wxwidgets@ that would be nice to get rid of to hands of a maintainer that cares for it more; but if not, we'll eventually get to it.
Comment 11 Atlant 2020-10-24 11:36:57 UTC
Created attachment 668270 [details, diff]
patch for stage "configure"

add support "gtk3" on "configure" stage.
Comment 12 Atlant 2020-10-24 11:37:48 UTC
Created attachment 668273 [details]
support new patch in ebuild

compiled succesfull on ~amd64
Comment 13 Larry the Git Cow gentoo-dev 2021-04-04 21:11:21 UTC
The bug has been referenced in the following commit(s):

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

commit c399e672292aa70bb8ec555c8fedb59ca2d3adb7
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-04-04 21:10:53 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-04-04 21:10:53 +0000

    dev-db/wxsqlite3: Port to EAPI 7
    
    Bug: https://bugs.gentoo.org/689798
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-db/wxsqlite3/wxsqlite3-3.2.1-r1.ebuild | 32 ++++++++++++++----------------
 1 file changed, 15 insertions(+), 17 deletions(-)