gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

segfault on window opening with wxgtk-3.0 #1078

Open eatdust opened 3 years ago

eatdust commented 3 years ago

Just trying new stable release, and I am getting a segfault in Magick:

GDL> window

(gdl:907266): Gtk-WARNING **: 00:10:30.072: gtk_disable_setlocale() must be called before gtk_init()
Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...
Aborted (core dumped)

GDL 1.0.0-rc3 compiled with the exact same compilation options works fine. Any advices?

thanks.

eatdust commented 3 years ago

I have found the culprit, this is wxgtk3.0. It works fine building against wxgtk3.1. Maybe some #directives should be added to allow for both linkage. That should be doable since rc3 built and worked fine against wxgtk3.0!

GillesDuvert commented 3 years ago

related to discussion stemming into https://github.com/gnudatalanguage/gdl/pull/1076. This wxGTK discrepancy between plplot's wxwidget driver and wxwidgets library begins to look like the Python2 vs Python3 nightmare... I'm more and more convinced that we (GDL) should recompile our own 'version' of the plplot drivers so to have a direct dependency on shared libraries. I've tried, it's quite simple, but packagers do not like source code replication...

eatdust commented 3 years ago

I've tried, it's quite simple, but packagers do not like source code replication...

It is not like we don't like it, it is just that you're looking for troubles without knowing it. In the next few years when the version you have absorbed will be far enough from the official one, then most developing time will be into backporting the work of others instead of focusing on gdl development. Anyway, you'll find enough examples on the web about now defunct, or hardly portable program, to convince yourself that this is not a good idea :)

Still, I fail to see the motivation here, it is just a versioning issue. If only wxgtk-3.1 is supported, just add a no-go in cmake to reject any lower version. rc3 worked very fine built against wxgtk-3.0 together with plplot built against wxgtk-3.1. So, the current issue sounds more like a compatibility issue in direct calls to wxgtk rather than a mismatch between plplot and gdl linkage!

GillesDuvert commented 3 years ago

Maybe this is different with the #1059 #969 and #961 but in all those cases, that showed the same error message as yours, it was solved by aligning plplot on the 'installed' version of wxWidgets, by recompiling plplot after installing wxwidgets, whatever the version of gtk. So GDL does not specifically 'ask' for a particular version of gtk, and should not IMHO.