|
From: Ethan A M. <sf...@us...> - 2016-01-04 21:43:45
|
On Monday, 04 January, 2016 21:58:36 Mojca Miklavec wrote: > On 4 January 2016 at 21:30, Ethan A Merritt wrote: > > On Monday, 04 January, 2016 11:53:37 Mojca Miklavec wrote: > > > >> Hi, > >> > >> I would like to ask for a bit of help with fixing some opportunistical > >> linking against GTK+ when wxWidgets is used: > >> https://trac.macports.org/ticket/50199 > >> > >> The problem is that as soon as pkg-config finds GTK+ version 2 on the > >> system and if wxWidgets terminal is enabled, gnuplot links against > >> GTK2 even if no GTK code is being used at all. And if wxWidgets uses > >> GTK 3, compilation fails because gnuplot tries to call some functions > >> that no longer exist in GTK 3. > > > > > > > > We've had this conversation before. > > I'm sorry, I missed that. > > > The answer to that latter issue (gdk_window_foreign_new not in gtk3) > > is to configure with --disable-raise-console. Or if you could comment > > out or remove that section of code just for wxt since it obviously isn't > > going to work anyhow. > > I don't want to patch this (comment it out) just on MacPorts because > MacPorts doesn't provide GTK-based wxWidgets inside gnuplot. > > But it would be wise to provide "universal" patch that doesn't attempt > to use GTK 2 functions inside GTK 3 (I can try to help with that if > needed). Hmm. As it turns out, it doesn't work for me with current GTK2 either unless I enable deprecated API components. My build script always disables raise-console, so I never noticed this before. When I enable raise-console I get: wxterminal/wxt_gui.cpp:1537:51: error: ‘gdk_window_foreign_new’ was not declared in this scope wxterminal/wxt_gui.cpp:3170:48: error: ‘GtkWidget’ has no member named ‘window’ wxterminal/wxt_gui.cpp:3183:47: error: ‘GtkWidget’ has no member named ‘window’ Those API components must have been deprecated at some point during the gtk2 release series. I'll look into it. Ethan > > > As to OSX + wxwidgets not requiring gtk at all, I would be happy > > to take a patch that sorted this out in the autoconf script. > > I suppose it would test the output of > > > > wx-config --query-toolkit > > > > What does that return on OSX? > > I have three different installations of wxWidgets: > - wxWidgets 3.0 built against Cocoa > - wxWidgets 3.0 built against GTK 3 > - wxWidgets 2.8 built against GTK 2 > > Here are the results: > > $ /path/to/wxWidgets/3.0/bin/wx-config --query-toolkit > osx_cocoa > $ /path/to/wxGTK/3.0/bin/wx-config --query-toolkit > gtk3 > $ /path/to/wxGTK/2.8/bin/wx-config --query-toolkit > gtk2 > > I assume you should only accept "gtk2". > > (Please note that it is *possible* to build wxWidgets against GTK2, it > just isn't the default configuration and it would rarely be used under > any normal circumstances. We use it for software that didn't bother > switching to wxWidgets 3.0 yet because wxWidgets 2.8 doesn't work > natively on modern versions of OS X. So you should generally not use > "if this is OS X", but rather check if "--query-toolkit" would return > gtk2.) > > Mojca > > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |