Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922657 - mail-client/claws-mail-4.2.0-r1 not compile with x11-libs/gtk+[-X,wayland] - error: unknown type name ‘GtkSocket’
Summary: mail-client/claws-mail-4.2.0-r1 not compile with x11-libs/gtk+[-X,wayland] - ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 00:36 UTC by Yuriy Dmitriev
Modified: 2024-02-02 15:23 UTC (History)
4 users (show)

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


Attachments
Build log (build.log,434.59 KB, text/x-log)
2024-01-22 00:36 UTC, Yuriy Dmitriev
Details
Output of: emerge --info mail-client/claws-mail (emerge.info.txt,6.04 KB, text/plain)
2024-01-22 12:30 UTC, Yuriy Dmitriev
Details
emerge.log after first install claws-mail (visual2.txt,139.85 KB, text/plain)
2024-01-22 18:07 UTC, Yuriy Dmitriev
Details
Properly gate off X11-only GtkSocket (gtk-socket-x11-only.patch,2.55 KB, patch)
2024-01-31 14:31 UTC, opensource
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Dmitriev 2024-01-22 00:36:42 UTC
Created attachment 882811 [details]
Build log

mail-client/claws-mail-4.2.0 do that
Comment 1 Yuriy Dmitriev 2024-01-22 00:38:55 UTC
Snip.
.
.
.
compose.c: At top level:
compose.c:9938:52: error: unknown type name ‘GtkSocket’; did you mean ‘AtkSocket’?
 9938 | static gboolean compose_ext_editor_plug_removed_cb(GtkSocket *socket, Compose *compose)
      |                                                    ^~~~~~~~~
      |                                                    AtkSocket
Comment 2 Jonas Stein gentoo-dev 2024-01-22 01:29:08 UTC
Thank you for the report. We need to have all information at hand before ticket assignment
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Please provide 

[x] the output of emerge --info <category/packagename> in the comment text
Comment 3 Yuriy Dmitriev 2024-01-22 12:30:28 UTC
Created attachment 882843 [details]
Output of: emerge --info mail-client/claws-mail
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-22 12:30:57 UTC
>mail-client/claws-mail-4.2.0 do that

What does this mean?
Comment 5 Yuriy Dmitriev 2024-01-22 12:40:02 UTC
(In reply to Sam James from comment #4)
> >mail-client/claws-mail-4.2.0 do that
> 
> What does this mean?

Few days ago I install mail-client/claws-mail-4.2.0 without problem.
I can't update mail-client/claws-mail-4.2.0 to mail-client/claws-mail-4.2.0-r1
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-22 12:41:36 UTC
Ah, OK. 4.2.0 is actually identical to 4.2.0-r1 apart from a fixed dep...
Comment 7 Bernard Cafarelli gentoo-dev 2024-01-22 13:35:31 UTC
Maybe your emerge.log between last passing compilation and today will give a clue, from the error I would double-check any recent merge of gtk+ (and changed USE flags on it)
Comment 8 Yuriy Dmitriev 2024-01-22 18:07:33 UTC
Created attachment 882862 [details]
emerge.log after first install claws-mail

claws-mail I was first emerge 15 jan 2024.
emerge.log from 15 jan 2024 to now.
What I doing after: I aprox 15 years I use sylpheed. Now time to remove it.
I remove sylpheed, remove all related to Xorg USE flags. I am wayland user), I love fast and clean systems.
After that, I do: emerge -DNu world; emerge --depclean;

claws-mail - stay working. But -r1 not compile((((
Comment 9 Yuriy Dmitriev 2024-01-22 18:10:14 UTC
 янв  - (short) january, jan.
Comment 10 Bernard Cafarelli gentoo-dev 2024-01-23 09:30:20 UTC
"remove all related to Xorg USE flags"

And I see gtk+ was re-merged, so I suppose it now is installed with USE="-X wayland". Can you try rebuilding with USE=X and then claws-mail again?
Comment 11 Yuriy Dmitriev 2024-01-23 13:09:10 UTC
(In reply to Bernard Cafarelli from comment #10)
> "remove all related to Xorg USE flags"
> 
> And I see gtk+ was re-merged, so I suppose it now is installed with USE="-X
> wayland". Can you try rebuilding with USE=X and then claws-mail again?

I make this experiment.
My steps:
1.
USE="X" emerge -DNuvp claws-mail
This rebuild 17 packages including claws-mail.
2.
I execute: emerge -DNuvp world
This rebuild 14 packages without "X"
3.
I run: emerge --depclean 
This remove few packages. Forgot count.

Resume:
I have possibility run claws-mail, compiled with "X", but really run WITHOUT "X" flag enabled in system configuration.
No any package have "+X"
All system, exept claws-mail, compiled with "-X".
Then I try emerge -1 claws-mail. Result=failed.

+X  is compile-time deps? Runtime X libraries don't need.
If it is true, it break GTK-3+ ant up concept. GTK apps can and must run via any framebuffer, including VESA specs.

May be possible build static app?
Interesting questions.

I think, we are need cleanup source from deprecated and old libs. 

With best wishes - YD.
Comment 12 Bernard Cafarelli gentoo-dev 2024-01-28 09:53:14 UTC
Thanks for confirmation, I also tested locally with gtk+[-X,wayland] and indeed claws-mail compilation fails on apparently basic GTK+ types

From a few quick searches it seems GtkSocket is indeed X11-specific (so it makes sense to depend on gtk+[X]

Remember you would not need USE=X globally, you can add it for gtk+ and needed packages in /etc/portage/package.use
Comment 13 Larry the Git Cow gentoo-dev 2024-01-28 10:13:56 UTC
The bug has been closed via the following commit(s):

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

commit 139e18abcb245db9140ca961174b4e624626071c
Author:     Bernard Cafarelli <voyageur@gentoo.org>
AuthorDate: 2024-01-28 10:00:05 +0000
Commit:     Bernard Cafarelli <voyageur@gentoo.org>
CommitDate: 2024-01-28 10:00:34 +0000

    mail-client/claws-mail: depend on gtk+ with USE=X
    
    Uses some X11-only classes like GtkSocket
    
    Closes: https://bugs.gentoo.org/922657
    Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>

 mail-client/claws-mail/claws-mail-4.1.1-r4.ebuild | 2 +-
 mail-client/claws-mail/claws-mail-4.2.0-r1.ebuild | 2 +-
 mail-client/claws-mail/claws-mail-9999.ebuild     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 14 opensource 2024-01-31 14:31:51 UTC
Created attachment 883866 [details, diff]
Properly gate off X11-only GtkSocket

It's absolutely trivial to patch GtkSocket out properly as the machinery is already there but incorrectly gated behind compiling for Windows. I have been running on an entirely X-less with this for a while now.
Comment 15 opensource 2024-02-02 11:05:15 UTC
It appears that I've been preempted here. Upstream committed this patch right after spinning 4.2.0:
https://git.claws-mail.org/?p=claws.git;a=commit;h=dd4c4e5152235f9f4f319cc9fdad9227ebf688c9
https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4505

I would really appreciate it if we could nix the X deps here and just backport this patch.
Comment 16 Bernard Cafarelli gentoo-dev 2024-02-02 12:26:53 UTC
Thanks for the work and upstream link! Let me get that in (and drop the dep from live ebuild
Comment 17 Larry the Git Cow gentoo-dev 2024-02-02 15:23:36 UTC
The bug has been closed via the following commit(s):

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

commit 42779f2ce4cc4bd17641865034e5b19ddd931c20
Author:     Bernard Cafarelli <voyageur@gentoo.org>
AuthorDate: 2024-02-02 15:18:44 +0000
Commit:     Bernard Cafarelli <voyageur@gentoo.org>
CommitDate: 2024-02-02 15:23:34 +0000

    mail-client/claws-mail: backport upstream fix for gtk+ without X11
    
    This avoids the recently introduced dependency on gtk+[X] for 4.2.0 and
    live ebuild
    
    Closes: https://bugs.gentoo.org/922657
    Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>

 ...-4.2.0-r1.ebuild => claws-mail-4.2.0-r2.ebuild} |   4 +-
 mail-client/claws-mail/claws-mail-9999.ebuild      |   2 +-
 .../files/claws-mail-4.2.0-gtksocket.patch         | 214 +++++++++++++++++++++
 3 files changed, 218 insertions(+), 2 deletions(-)