Menu

#1592 wxwidgets 3.0 on linux (again)

None
closed-out-of-date
nobody
wxt (19)
2016-03-01
2015-04-10
No

The wxt terminal seems again (see also #1401) broken with wxwidgets 3.0 (no problems with 2.8).

After compiling on ubuntu, running "make check" stops after the first few plots with "Speicherzugriffsfehler" (memory access error). The exact position in the demo plots varies. It happens both with gp5.0 and 5.1

compiling was done with

make clean
TERMLIBS="-lX11" ./configure
make
make check

can anyone confirm this? I'm not sure when exactly this problem turned up, it might be quite a while.

This here also works to crash gp after five or fifty steps:

i=1; while (i<100) {plot i*x title "".i; i=i+1; pause 0.1}

**
Gdk:ERROR:/build/buildd/gtk+2.0-2.24.27/gdk/gdkregion-generic.c:337:miSetExtents: assertion failed: (pExtents->y1 < pExtents->y2)
Abgebrochen (Speicherabzug geschrieben)

Discussion

  • Ethan Merritt

    Ethan Merritt - 2015-04-10

    1) No, I am not seeing any such problems with current CVS build and wxgtk 3.0.2

    2) The error message you show self-reports as gtk+2.0 rather than gtk+3.0. Are you sure you have linked against wxgtk 3 rather than 2? Or some incompatible mixture of the two?

    3) In the first round of bug reports against wxt 3.0 in the Debian tracker, it was suggested that a [different?] assertion failure in the gtk library was due to the library having been incorrectly built with a debug option active even though it should have been turned off for the distributed version. I wonder if this is the same thing.

    4) [fumbling in the dark here ...] There was one earlier report of a wxgtk 3.0 problem from someone who thought maybe it was due to running specifically on a Haswell chipset (although logically I think this would make more sense if it were specific to compiling for a Haswell chipset since that might trigger the compiler to generate code using Haswell-specific instructions).
    What do you see in "head -10 /proc/cpuinfo"?

    5) One more thing to try:
    ./configure --with-wx-single-threaded

     
  • Karl Ratzsch

    Karl Ratzsch - 2015-04-10

    2) That's it. I now installed the gtk3 dev package (along with all it's dependencies) and after recompiling "make check" finishes without problem. I had thought it would have been installed automatically with libwxt3.0-dev.

    The gtk+2.0 dev package was also never installed, though. Shouldn't ./configure have complained about the missing library?

    5) That helped, too, but it probably doesn't matter.

     
  • Ethan Merritt

    Ethan Merritt - 2015-04-10

    The configure script only checks that a dependency has been satisfied during a test compile+build of a dummy program. It doesn't check that any real code actually works afterward. In your case it apparently found a linkable version of the gtk library, but has no way of testing whether the version it found will actually work.

    When I was first trying to test with wxgtk 3.0 installed manually on top of an existing setup I had terrible problems with library incompatibilities. It only started working when I got a newer machine with compatible libraries installed from the start. Even on the new machined there is a missing dependency in the pkg-config description of wxgtk - it requires libX11 but doesn't list that anywhere, so building gnuplot would fail if you configure out the x11 terminal.

     
  • Karl Ratzsch

    Karl Ratzsch - 2015-04-10

    Alright, i'm glad i have it working now. ;-)

    By the way: Those Glib warnings

    (gnuplot:2852) Glib-Critical **: Source ID 269 was not found when attempting to remove it.
    

    I reported in #1401 are also gone now with gtk3-dev installed.

     
  • Ethan Merritt

    Ethan Merritt - 2015-04-11
    • status: open --> closed-works-for-me
    • Group: -->
    • Priority: -->
     
  • Karl Ratzsch

    Karl Ratzsch - 2015-04-12

    Sorry, i was too fast with saying it works. No idea why "make check" finished without error the other day.

    I digged into this a bit more, and found that ubuntu (and debian?) actually uses gtk+2 for liwxgtk3.0, not gtk+3:
    https://bugs.launchpad.net/ubuntu/+source/wxwidgets3.0/+bug/1394031

    If the gtk+2-dev package is not available during compiling, gnuplot always crashes during "make check", and there are a number of complaints about the missing gtk+2 in config.log. It'd probably be good if that showed up in the summary, too.

    If it is installed, the build is seemingly stable at the moment. If ./configure is run with the wx-single-threaded option, also those warnings from Glib disappear.

    sudo apt-get install libgtk2.0-dev libwxgtk3.0-dev
    TERMLIBS="-lX11"  ./configure --with-wx-single-threaded
    make && sudo make install
    
     

    Last edit: Karl Ratzsch 2015-04-12
  • Ethan Merritt

    Ethan Merritt - 2015-04-12
    • status: closed-works-for-me --> open-works-for-me
     
  • Ethan Merritt

    Ethan Merritt - 2015-04-12

    I am not clear on what exactly you are currently seeing.

    The ./configure script succeeds but the compile fails?

    Gnuplot configures + compiles but gets a error while running?

    It links against gtk+3 but was configured with gtk+2-dev?
    (I can certainly see why that would cause problems)

    FWIW here are the wx-related linked libraries used by my working build:

            libwx_gtk2u_xrc-3.0.so.0 => /lib64/libwx_gtk2u_xrc-3.0.so.0 (0x00007f273cf29000)
            libwx_gtk2u_webview-3.0.so.0 => /lib64/libwx_gtk2u_webview-3.0.so.0 (0x00007f273ccff000)
            libwx_gtk2u_html-3.0.so.0 => /lib64/libwx_gtk2u_html-3.0.so.0 (0x00007f273c9d5000)
            libwx_gtk2u_qa-3.0.so.0 => /lib64/libwx_gtk2u_qa-3.0.so.0 (0x00007f273c79e000)
            libwx_gtk2u_adv-3.0.so.0 => /lib64/libwx_gtk2u_adv-3.0.so.0 (0x00007f273c34f000)
            libwx_gtk2u_core-3.0.so.0 => /lib64/libwx_gtk2u_core-3.0.so.0 (0x00007f273b9c4000)
            libwx_baseu_xml-3.0.so.0 => /lib64/libwx_baseu_xml-3.0.so.0 (0x00007f273b7ad000)
            libwx_baseu_net-3.0.so.0 => /lib64/libwx_baseu_net-3.0.so.0 (0x00007f273b548000)
            libwx_baseu-3.0.so.0 => /lib64/libwx_baseu-3.0.so.0 (0x00007f273b00c000)
            libgtk-x11-2.0.so.0 => /lib64/libgtk-x11-2.0.so.0 (0x00007f2739cf4000)
            libwebkitgtk-1.0.so.0 => /lib64/libwebkitgtk-1.0.so.0 (0x00007f2734137000)
    

    As you can see, it's all version 3 except for libgtk-x11-2.0.so.0 (not sure what's up with that one).

    Anyhow, I'd need an actual stack trace or dump to debug where it failed. The assert statement you showed originally is of little help.

     
  • Karl Ratzsch

    Karl Ratzsch - 2015-04-12

    Looks like you also have a wxwidgets 3.0 built upon gtk+2, not gtk+3.

    My problem appeared because of the missing gtk+2 dev package, about which ./configure complains, but only in the log file. This broken configuration actually builds, then, but is unstable.

     
  • Ethan Merritt

    Ethan Merritt - 2015-04-13

    I think you tried to upload your config.log file earlier, but it doesn't seem to have worked. Can you try again to upload the log file showing errors if gtk+2-dev is missing?

     
    • Karl Ratzsch

      Karl Ratzsch - 2015-04-13

      After removing the libgtk2.0-dev package, ./configure says "checking for GTK... no" somewhere, but it's a few pages up, hard to notice. The resulting config.log file is attached.

      After compiling this, "make check" stops with

      Gdk:ERROR:/build/buildd/gtk+2.0-2.24.27/gdk/gdkregion-  generic.c:337:miSetExtents: assertion failed: (pExtents->y1 < pExtents->y2)
      

      sometimes at the first plot, sometimes a bit later.

       
  • Ethan Merritt

    Ethan Merritt - 2015-04-23

    I think I understand why ./configure does not report failure if GTK is not found. That's because wxWidgets uses different toolkits depending on the platform. On OSX is uses cocoa or carbon (I think) rather than gtk. So the idea is to look for it and add it to the library list if found, but not error out if it isn't found.

    I don't understand how it can successfully compile if the library is missing, however.

     
  • Karl Ratzsch

    Karl Ratzsch - 2015-04-26

    Jep. Me neither. ;-)

    Btw., ./configure --help lists x11 as optional, but it gets configured by default.

    Following the release notes, I shouldn't need the "TERMLIBS="-lX11"" env. variable then, but i do. Otherwise make stops with that "undefined reference to symbol XInitThread" error. (unless i go for configuring wx single-threaded, of course)

    Is that a clue maybe, or have I simply misunderstood something here?

    I've attached the log file from running ./configure without any options or additional environment variables.

     
  • Ethan Merritt

    Ethan Merritt - 2015-04-26

    I think you misunderstood the release notes. They are warning about exactly what you found - that wxt requires -lX11

     
    • Karl Ratzsch

      Karl Ratzsch - 2015-06-03

      Not exactly. It says that it may be necessary to pass "-lX11" as an explicit option if x11 is not configured. But I find it's required on my system whether x11 is configured or not.

       
  • Karl Ratzsch

    Karl Ratzsch - 2015-08-05

    I don't know when and why exactly, but this problem seems to have sorted itself out mostly.

    gnuplot now builds and seems stable on ubuntu 15.04 with wxgtk3 without giving "--with-wx-single-threaded". Also there are no more of these "Glib critical" warnings. Let's see if
    that holds up. I've got a feeling this depends on the daily form of my computer. ;-)

    Also "-lX11" now is only necessary if './configure' was run '--without-x'.

    The remaining problem is that gnulot configures and even builds if the libgtk-dev package belonging to wxgtk3 is missing. The resulting binary is very unstable. I guess there is nothing to be done about that, except put a hint in the release notes.

     
  • Ethan Merritt

    Ethan Merritt - 2015-08-05

    gtk3 itself does not seem to be very stable. Or perhaps the configuration options used by the various linux distros to prepare the gtk3 packages isn't consistent.

    I poked the gnuplot build system until it worked with the wx + gtk3 versions I had, but you are probably dealing with slightly different versions.

     
  • Ethan Merritt

    Ethan Merritt - 2016-03-01
    • status: open-works-for-me --> closed-out-of-date
     

Log in to post a comment.