Minimum GTK2 version

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 9:57 am

I tried to compile wxWidgets 2.8.12 on Debian Woody, using wxGTK with GTK2 version 2.0.2-5woody2.

Code: Select all

/home/pal/wxWidgets-2.8.12/bk-deps g++-3.0 -c -o corelib_gtk_cursor.o  -D__WXGTK__     -DWXBUILDING      -I./src/regex -I./src/expat/lib -DwxUSE_BASE=0 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -I/home/pal/wxWidgets-2.8.12/lib/wx/include/gtk2-unicode-release-static-2.8 -I./include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ./src/gtk/cursor.cpp
src/gtk/cursor.cpp: In constructor `wxCursor::wxCursor(const wxImage&)':
src/gtk/cursor.cpp:183: `GdkDisplay' undeclared (first use this function)
src/gtk/cursor.cpp:183: (Each undeclared identifier is reported only once for 
   each function it appears in.)
src/gtk/cursor.cpp:183: `display' undeclared (first use this function)
src/gtk/cursor.cpp:183: `gdk_drawable_get_display' undeclared (first use this 
   function)
src/gtk/cursor.cpp:184: `gdk_display_supports_cursor_color' undeclared (first 
   use this function)
src/gtk/cursor.cpp:198: `gdk_cursor_new_from_pixbuf' undeclared (first use this 
   function)
make: *** [corelib_gtk_cursor.o] Error 1
The configure script doesn't report any error, it finishes successfully, however I suppose that this GTK version is too old.

What is the minimum required version for GTK2 in wxWidgets 2.8.X?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2511
Joined: Sun Jan 03, 2010 5:45 pm

Re: Minimum GTK2 version

Post by PB » Fri Mar 10, 2017 10:17 am

palacs wrote:What is the minimum required version for GTK2 in wxWidgets 2.8.X?
You can read gtk related documentation in your wxWidgets/docs/gtk folder or here https://github.com/wxWidgets/wxWidgets/ ... H/docs/gtk, where the readme states
It is recommended to use at least GTK+ 2.2.3 to get the
most out of wxWidgets and some features are only available
when using GTK+ 2.4 or even from GTK+ 2.8. Note that if you
compile wxWidgets against GTK+ 2.8 your app will still work
with older GTK+ version down to version 2.2 as wxWidgets
tests for the presence of newer features at run-time and it
will fall back to a generic implementation if these features
are not present in the GTK+ version used.

DavidHart
Site Admin
Site Admin
Posts: 3998
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Minimum GTK2 version

Post by DavidHart » Fri Mar 10, 2017 10:26 am

Hi,
I tried to compile wxWidgets 2.8.12 on Debian Woody, using wxGTK with GTK2 version 2.0.2-5woody2.
Out of curiosity, why? Woody was born in 2002. The wx version at that time was 2.2.0 and would have used gtk1.2.

On grepping the 2.8.12 source for GTK_CHECK_VERSION, the lowest version-number I found was 2.1.0. However those bits of code may be fossils of much earlier releases and aren't necessarily the minimum required.

Can you get away with using gtk1.2 or X11? If not I think you'll have to install a more recent gtk2.

Regards,

David

palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Re: Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 10:30 am

I'm writing applications specifically for old computers (Pentium II/III). They can't run newer distros with reliable speed.

Well, GTK1 would be a choice, but it seems quite unstable, a lot of samples do not work.

I had success with Debian Sarge though. It has a newer GTK2.

Thanks for the info.

It would be so good to keep up the 2.8.X branch with only maintenance fixes (and/or making the OS/2 and GTK1 port stable). This is the last branch to support a lot of legacy platforms.

catalin
Moderator
Moderator
Posts: 1586
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Minimum GTK2 version

Post by catalin » Fri Mar 10, 2017 10:59 am

palacs wrote: the 2.8.X branch [...]. This is the last branch to support a lot of legacy platforms.
FWIW thas is not true. Every platform supported by 2.8.X, is supported by 3.0.X as well.

palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Re: Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 11:23 am

I have never been able to compile wxWidgets 3.0.X to Windows 95, but had success with 2.8.X, including all samples. They all seem really stable. wxWidgets 2.8 supports Windows 95 while 3.0 doesn't.

catalin
Moderator
Moderator
Posts: 1586
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Minimum GTK2 version

Post by catalin » Fri Mar 10, 2017 11:32 am

Not being able to compile, finding a bug are not the same thing as not being supported.
The effort of contributing a fix (which sounds like a pretty small one in your case) is definitely worth the improvements that 3.0 brings.

palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Re: Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 11:39 am

I don't really need the benefits of 3.0. 2.8 is mature enough for my needs. I need stability on legacy platforms. Which one would you choose? You probably know the two branches better. My motto is like the less features, the less bugs so I suppose that there are more fixes and less bugs in 2.8 which has already had at least 11 maintenance releases. What do you think?

Btw, the about the fix... As doublemaxx highlighted in the other thread, WM_UNINITMENUPOPUP is used unconditionally. This causes the compilation problem for Windows 95. Or you mean I can file a bug report about this and won't be laughed at because I compile for Win95? :P

catalin
Moderator
Moderator
Posts: 1586
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Minimum GTK2 version

Post by catalin » Fri Mar 10, 2017 12:15 pm

palacs wrote:I don't really need the benefits of 3.0.
Right...
palacs wrote:2.8 is mature enough for my needs. I need stability on legacy platforms.
Why not go with 2.6 then ? It is so much older (does that make it more mature?), with a lot less features (does this give it more stability?).
palacs wrote:Which one would you choose? You probably know the two branches better. My motto is like the less features, the less bugs so I suppose that there are more fixes and less bugs in 2.8 which has already had at least 11 maintenance releases. What do you think?
You do realise that potential bugs could be in new features, while old features become even more stable as version numbers advance, right? Going further, all fixes ever applied to 2.8 are present in 3.0, but not all fixes applied in 3.0 have found their way back to 2.8.
Being maintained means that if you find a bug in 3.0 it might be fixed, and if you contribute the fix yourself it will be applied.
Not being maintained means that if you find a bug in 2.8 and even if you provide a fix for it, it will not be applied.
To answer your question: I think, without a doubt, that 3.0 is by far the better choice, and I cannot emphasize it enough.
3.0 is definitely mature and at least as stable as 2.8 ever was.
palacs wrote:Or you mean I can file a bug report about this and won't be laughed at because I compile for Win95? :P
Actually I mean more than that: file a bug report and provide the fix yourself.
A simple bug report will probably linger there for a long time, not many people being motivated to fix and test for bugs under Win95. But if you provide a fix yourself it will easily be applied.

palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Re: Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 12:24 pm

Fine, I get your point, but it's hard to believe that 3.0 has more new features and less bugs. However, I'm not deep into wxWidgets, so the best option for me is to believe it. 8)

I have recently seen the GitHub branch of 2.8. It has fixes from 2015 and 2014 while 2.8.12 was released in 2011.

You mean that you won't accept pull requests even if I fix a bug for branch 2.8?

What about performance issues? Isn't it possible that the performance of some units is worse and can be felt on Windows 95, but 2.8 has a better performance (due to less features)? How likely is this to happen?

catalin
Moderator
Moderator
Posts: 1586
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Minimum GTK2 version

Post by catalin » Fri Mar 10, 2017 12:43 pm

palacs wrote:it's hard to believe that 3.0 has more new features and less bugs.
..it has less bugs, at least if comparing features present in 2.8 too.
palacs wrote:I have recently seen the GitHub branch of 2.8. It has fixes from 2015 and 2014 while 2.8.12 was released in 2011.
Great. I'd ask how many they are, but no matter the answer, the fixes applied to 3.0 vastly outnumber the ones for 2.8. There really is no point in continuing on this subject. If you are happy with 2.8 that then just go with it, remember only that you will be completely on your own when you will hit a bug, and you will.
palacs wrote:You mean that you won't accept pull requests even if I fix a bug for branch 2.8?
Exactly that. ..well, with the exception that it's not "me" who will not accept a pull request, I'm only a wxW user, just like you.
palacs wrote:What about performance issues? Isn't it possible that the performance of some units is worse and can be felt on Windows 95, but 2.8 has a better performance (due to less features)? How likely is this to happen?
Sure, everything is possible. Just like 2.8 could be less efficient and held back by unfixed bugs. But I guess you'll have to chose which risk you should take.

coderrc
Earned some good credits
Earned some good credits
Posts: 141
Joined: Tue Nov 01, 2016 2:46 pm

Re: Minimum GTK2 version

Post by coderrc » Fri Mar 10, 2017 12:51 pm

palacs wrote:What about performance issues? Isn't it possible that the performance of some units is worse and can be felt on Windows 95, but 2.8 has a better performance (due to less features)? How likely is this to happen?
Somewhere between not very and not at all. If there is any performance difference, I'd lean towards 3.x being more performant since anything old that gets changed should strictly be an improvement. Plus, the wxconfig file lets you exclude anything you dont need, and the compiler should be smart enough to only compile what you actually use. So your fear of "more features" is a bit misguided. In 3.x, wxwidgets can be configured to just wrap the STL instead of using wxwidgets custom classes, eg wxString essentially just becomes std::string, so any overhead from using wxstring should be negligible. I don't know if this is true of 2.x wxwidgets.

My only concern writing code for windows 95 is that any compiler you dig up out of its grave to compile for windows 4.0 is probably going to be limited to what, like c++88 or something? /wrists

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4360
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimum GTK2 version

Post by ONEEYEMAN » Fri Mar 10, 2017 4:55 pm

Hi,
The bug you will file with the fix will not be applied to version 2.8, but it will be applied to version 3.0/3.1 if there is a proof that it is still exist in those versions.
Which essentially means that you have to keep the Git HEAD or 3.1 somewhere compiled and ready to test in case the issue you hit is not yet been fixed.

Moreover if you hit the bug with 2.8 and this issue is fixed 3.1 the only suggestions you will receive is - move to 3.0.
So it is easier to start with that version than start working with 2.8, hit the issue, check if it still exist in 3.0 and then backport the fix. You will still require the maintenance of this backported fix in a long run.

Also, just out of curiosity - why do you need Win95 support? This OS is seriously outdated, MS does not supported for a long time now and it is quite possible that you might hit the problem that is Windows-specific and therefore will waste a lot of time trying to find a fix.

3.0/3.1 has a minimum of WinXP SP3 which is decent and this OS can be run on some old hardware with good performance. Unless you have a machine from 1995 with i286. ;-)

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2511
Joined: Sun Jan 03, 2010 5:45 pm

Re: Minimum GTK2 version

Post by PB » Fri Mar 10, 2017 7:04 pm

ONEEYEMAN wrote:3.0/3.1 has a minimum of WinXP SP3 which is decent and this OS can be run on some old hardware with good performance.
Actually, the very first sentence in docs/msw/install.txt for 3.0x reads
This is wxWidgets for Microsoft Windows 9x/ME, Windows NT and later (2000, XP, Vista, 7, 8, 10, etc) including both 32 bit and 64 bit versions.
BTW, In the 3.1x there is
This is wxWidgets for Microsoft Windows (XP, Vista, 7, 8, 10, etc) including both 32 bit and 64 bit versions.
Also the FAQ on the wxWidgets website does not say anything about needing XP SP3, but it sill may be true.

palacs
Knows some wx things
Knows some wx things
Posts: 45
Joined: Mon May 30, 2016 11:11 am

Re: Minimum GTK2 version

Post by palacs » Fri Mar 10, 2017 7:36 pm

Using MSVC 2005, a few months ago I was able to compile wxWidgets 3.0.3 (git) for Windows 98. But not for Windows 95. The problem is that MSVC 2005 generates code incompatible with Windows 95. Another problem is that MSVC .NET 2003 would generate code fully compatible with Windows 95, but it won't compile 3.0 for the missing define I mentioned earlier. The least version it will run on is Windows 98. So the minimum version might be Windows 98, however it might need a little testing.

Some older hardware might not run XP well but would run 95 well. Or Windows 2000. I think if we really need a borderline, it should be Win2000. Windows 2000 is a really fast operating system.

Post Reply