Feature #124

GTK+ update for Windows?

Added by X. W. over 1 year ago. Updated 8 months ago.

Status:In ProgressStart date:08/11/2013
Priority:NormalDue date:
Assignee:Hiroyuki Yamamoto% Done:

0%

Category:-Spent time:-
Target version:3.5

Description

Dear Mr. Yamamoto,

Sylpheed 3.3.0 for Windows still is utilizing GTK+ 2.10.14.

GTK+ 2.10.14 is very outdated an old though. It was released way back in 2007.

Could you please update GTK+ 2 to the latest version, which, at the time of writing this, is version 2.24.10?

Or just update/port to the latest GTK+ 3 directly instead, which would be preferred, as requested earlier already:

http://sylpheed.sraoss.jp/redmine/issues/123

test-gspawn.c Magnifier (2.25 KB) Kentaro HAYASHI, 04/07/2014 12:29 AM

History

#1 Updated by X. W. over 1 year ago

Ups,

sorry, a typo in the first post.

Actually 2.24.20 is the latest GTK+ 2 version, not 2.24.10.

#2 Updated by Hiroyuki Yamamoto over 1 year ago

  • Priority changed from Immediate to Normal

Hello,

I also want to update GTK+ included in the Windows version to the latest 2.x version,
but there is a font rendering performance problem with the later version
(official and self-built binaries) and I have not resolved it yet.

#3 Updated by X. W. over 1 year ago

Hello,

thank you very much for your reply.

What exactly do you mean with "font rendering performance problem"?

And did you already file a bug report for it on GNOME Bugzilla?

#4 Updated by X. W. about 1 year ago

Hello,

I also want to update GTK+ included in the Windows version to the latest 2.x version,
but there is a font rendering performance problem with the later version
(official and self-built binaries) and I have not resolved it yet.

I just saw you were referring to that some time earlier on the mailing list over there:

http://www.sraoss.jp/pipermail/sylpheed/2012-January/005018.html

But you are referring to CJK characters there explicitly.

And you said english and european language users probably would not be affected by it.

Well, would there be any chance then that you could release two separate versions of Sylpheed for Windows?

One version utilizing GTK+ 2.24.21 (the very latest GTK+ 2 version) for english and european users. And one version utilizing GTK+ 2.10.14 for users who need CJK?

Please ;).

#5 Updated by Hiroyuki Yamamoto 9 months ago

  • Status changed from New to In Progress
  • Assignee set to Hiroyuki Yamamoto
  • Target version set to 3.5

X. W. wrote:

I also want to update GTK+ included in the Windows version to the latest 2.x version,
but there is a font rendering performance problem with the later version
(official and self-built binaries) and I have not resolved it yet.

I just saw you were referring to that some time earlier on the mailing list over there:

http://www.sraoss.jp/pipermail/sylpheed/2012-January/005018.html

I have tested the recent version of GTK+ 2.24 (official binary), and
it seems that the problem I've described above has already been solved!
(probably by the following fix)

[pango/1.28] Improve performance on Windows especially for non-Latin scripts
https://mail.gnome.org/archives/commits-list/2010-September/msg04196.html

Sorry about not noticing it earlier.
I want to update the included GTK+ to 2.24.x at the next major release (probably 3.5).

#6 Updated by X. W. 9 months ago

Hiroyuki Yamamoto wrote:

Sorry about not noticing it earlier.
I want to update the included GTK+ to 2.24.x at the next major release (probably 3.5).

Awesome.

Could you please build Sylpheed 3.4 using the very latest GTK+ 2, which currently is GTK+ 2.24.23:

https://mail.gnome.org/archives/ftp-release-list/2014-March/msg00140.html

and immediately release it as Sylpheed 3.5beta1?

I know, the changelog for such a Sylpheed 3.5beta1 probably wouldn't be very long:

But that's not a problem IMHO ;).

Please, don't let us wait any longer than necessary ;).

It would be much appreciated.

Regards

PS:

While thinking about it...: Why don't you just release it as Sylpheed 3.4.1?

#7 Updated by Hiroyuki Yamamoto 9 months ago

Hello,

Updating GTK+ and all other dependencies is not a trivial task,
so it will take some time.
(currently I'm struggling with mingw-specific problems and dependency chain)

#8 Updated by Kentaro HAYASHI 9 months ago

Hiroyuki Yamamoto wrote:

Hello,

Updating GTK+ and all other dependencies is not a trivial task,
so it will take some time.
(currently I'm struggling with mingw-specific problems and dependency chain)

Hi

Then, it seems that writing down the process of this task on ticket about the problem is better, doesn't it?

#9 Updated by X. W. 9 months ago

Hiroyuki Yamamoto wrote:

Updating GTK+ and all other dependencies is not a trivial task,
so it will take some time.
(currently I'm struggling with mingw-specific problems and dependency chain)

Well, this guy:

http://sylpheed.sraoss.jp/redmine/issues/13#note-13

said he was able to do it within three days of work using Microsoft Visual Studio 2013 and even provided a build ;).

#10 Updated by Hiroyuki Yamamoto 9 months ago

Kentaro HAYASHI wrote:

Hiroyuki Yamamoto wrote:

Updating GTK+ and all other dependencies is not a trivial task,
so it will take some time.
(currently I'm struggling with mingw-specific problems and dependency chain)

Hi

Then, it seems that writing down the process of this task on ticket about the problem is better, doesn't it?

Well, I have already made the latest GTK+ 2.24.23 working (with a few issues).
I have built the following versions on the latest MinGW+MSYS:

  • libffi-3.0.13
  • glib-2.38.2
  • cairo-1.10.2 (using official binary)
  • pango-1.29.4 (using official binary)
  • gdk-pixbuf-2.30.7
  • gtk+-2.24.23

Other components are based on the official GTK+ 2.x binary: http://www.gtk.org/download/win32.php

Some problems I have encountered (and solved) while building:

  • UAC intercepts the execution of gtk/gtk-update-icon-cache.exe (run MSYS command prompt as Administrator)
  • gtk+-2.24.23 gtkimcontextime.c requires glib >= 2.30
  • glib-2.40.0 requires rand_s() function, but it is not supported by mingw32 yet. So I've used 2.38.2.
  • glib-2.38.2 requires libffi (official site doesn't seem to provide its tarball anymore except for github) and python.
  • gtk: make install fails at modules/input (had to modify the path of gtk-query-immodules-2.0 in modules/input/Makefile manually)
  • libsylph/libsylph-0.def, src/libsylpheed-plugin-0.def: syntax error (remove first line comment)
  • libsylph link fails because of missing -liconv
  • sylpheed.exe link fails because of missing -luuid

Build procedure:

libffi:

  ./configure --prefix=/target

GLib:

  ./configure --prefix=/target --disable-gtk-doc --disable-static

gdk-pixbuf:

  ./configure --prefix=/target --enable-explicit-deps=no --disable-gtk-doc --disable-static

GTK+:

  ./configure --prefix=/target --with-gdktarget=win32 --with-included-immodules --enable-explicit-deps=no --disable-gtk-doc --disable-static

Current problem:

  • xpm image is not displayed
  • execution of gspawn-win32-helper.exe fails with assertion

#11 Updated by Hiroyuki Yamamoto 9 months ago

Current problem:

  • xpm image is not displayed

This has been solved by configuring gdk-pixbuf with the following options:

./configure --prefix=/target --enable-explicit-deps=no --disable-gtk-doc --disable-static --with-included-loaders
  • execution of gspawn-win32-helper.exe fails with assertion

Rebuilt Sylpheed with glib-2.38.2, but no success:

ERROR:gspawn-win32-helper.c:226:main: assertion failed: (__argc >= ARG_COUNT)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

(sylpheed.exe:1556): Sylpheed-WARNING **: Couldn't execute curl

(sylpheed.exe:1556): Sylpheed-WARNING **: g_spawn_async_with_pipes: 子のパイプか
らデータを取得できませんでした (EOF)

#12 Updated by X. W. 9 months ago

Hiroyuki Yamamoto wrote:
  • glib-2.40.0 requires rand_s() function, but it is not supported by mingw32 yet. So I've used 2.38.2.

I just had a look at the glib changelogs and saw this:

http://ftp.gnome.org/pub/gnome/sources/glib/2.39/glib-2.39.1.news
  • GRand: use real random data as a seed on win32 and use the timestamp/pid/uid fallback only on UNIX machines where we can't open '/dev/urandom'. This may cause issues with older mingw32 releases due to a missing prototype for the rand_s() API.

So, maybe you are using an old release of mingw32?

Have you tried upgrading to the latest mingw32 release? Maybe then you can use glib-2.40.0?

#13 Updated by X. W. 9 months ago

PS:

I just found this:

https://bugzilla.gnome.org/show_bug.cgi?id=711043

Product: glib

Bug 711043 - MinGW : Implement fallback function for rand_s ()

Reading through this, it sounds like as if you could use glib-2.40.0 if you would use mingw64 or MSVC instead of mingw32.

#14 Updated by Kentaro HAYASHI 9 months ago

Hiroyuki Yamamoto wrote:

  • execution of gspawn-win32-helper.exe fails with assertion

Rebuilt Sylpheed with glib-2.38.2, but no success:

[...]

Actually, I can reproduce it on mingw32 with tiny sample code which is borrowed from update_check.c

  • GTK+ 2.10.14 (GLib 2.12) It works!
  • GTK+ 2.24.10 bundled version distributed by gtk.org (GLib 2.28) It works!
  • GTK+ 2.24.23 selfbuild version with GLib 2.38.2 - CRASHED!

It may be something wrong with my mingw32 build environment, but there is a possibility that this issue depends on the version of GLib.

#15 Updated by X. W. 9 months ago

Hello,

I stumbled upon the following page:

http://hexchat.github.io/gtk-win32/

Does it help you?

Regards

#16 Updated by Hiroyuki Yamamoto 9 months ago

Kentaro HAYASHI wrote:

Hiroyuki Yamamoto wrote:

  • execution of gspawn-win32-helper.exe fails with assertion

Rebuilt Sylpheed with glib-2.38.2, but no success:

[...]

Actually, I can reproduce it on mingw32 with tiny sample code which is borrowed from update_check.c

  • GTK+ 2.10.14 (GLib 2.12) It works!
  • GTK+ 2.24.10 bundled version distributed by gtk.org (GLib 2.28) It works!
  • GTK+ 2.24.23 selfbuild version with GLib 2.38.2 - CRASHED!

It may be something wrong with my mingw32 build environment, but there is a possibility that this issue depends on the version of GLib.

Finally, I have solved this issue.
It seems to be caused by recent mingw32+gcc-4.8.1.
In this build environment, the values of __argc and __argv cannot be obtained,
and replacing them in glib/gspawn-win32-helper.c to _argc and _argv respectively fixed the problem.

A patch I've found:
https://hev.cc/date/2013/10/31

Anyway, all major problems seems to be solved, so I will release
3.5beta1 with GTK+ 2.24.23 anytime soon :)

#17 Updated by X. W. 9 months ago

Hiroyuki Yamamoto wrote:

Anyway, all major problems seems to be solved, so I will release
3.5beta1 with GTK+ 2.24.23 anytime soon :)

Great, looking forward to it :)!

Regards

#18 Updated by Hiroyuki Yamamoto 8 months ago

Since the GTK+ 2.24 version of Sylpheed-win32 seems to become stable,
I put the test binary here:

http://sylpheed.sraoss.jp/sylpheed/test/Sylpheed-gtk2.24test-2.7z

Please try it (make a backup before running, just in case).

#19 Updated by X. W. 8 months ago

Hiroyuki Yamamoto wrote:
I put the test binary here

Thanks ;).

Hiroyuki Yamamoto wrote:
Please try it

I just tried it on Win8.1 x64 and it seems to work just fine so far.

#20 Updated by X. W. 8 months ago

Hiroyuki Yamamoto wrote:

so I will release 3.5beta1 with GTK+ 2.24.23 anytime soon :)

Where is Sylpheed 3.5.0beta1?

I saw that you already updated the news, see:

http://sylpheed.sraoss.jp/redmine/projects/sylpheed/repository/revisions/3401/entry/NEWS

But where can we download it?

Regards

Also available in: Atom PDF