|
From: sfeam <sf...@us...> - 2016-01-05 05:04:10
|
On Monday, 04 January 2016 09:58:36 PM 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). > > > 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". Why? Do you know that gtk3 doesn't work? Please try the attached patch for configure.ac Ethan > > (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 |