On Sun, Jun 01, 2014 at 05:18:30PM -0700, sfeam wrote:
> The upstream gnuplot source has already been patched to call XInitThreads.
> I didn't realize you were testing without it. 

I was just testing based on the package currently in unstable.

> As I said in a separate post, for me this allows running with wx3 but
> does not remove the separate stream of error messages starting with

I hadn't seen your message when I wrote ine.

>     assert "m_window" failed in DoGetSize(): GetSize() doesn't work without 
> window 

It seems that gnuplot doesn't use the wx macros which set things up so
that defining NDEBUG disables these checks.  The attached patch gets me
a gnuplot which runs without this noise (obviously addressing these
issues would be better, but wx3.0 with -DNDEBUG is basically what you
get with wx2.8 by default, so the need to use -DNDEBUG is no reason to
stick with wx2.8.

Cheers,
    Olly
diff -Nru gnuplot-4.6.5/debian/changelog gnuplot-4.6.5/debian/changelog
--- gnuplot-4.6.5/debian/changelog	2014-05-30 17:41:02.000000000 +1200
+++ gnuplot-4.6.5/debian/changelog	2014-06-02 14:39:11.000000000 +1200
@@ -1,3 +1,10 @@
+gnuplot (4.6.5-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Call XInitThreads() and disable wx assertions.
+
+ -- Olly Betts <o...@survex.com>  Mon, 02 Jun 2014 14:39:10 +1200
+
 gnuplot (4.6.5-3) unstable; urgency=medium
 
   * [5aef72d] Fix typo in control-file. (Closes: #749820)
diff -Nru gnuplot-4.6.5/debian/patches/series gnuplot-4.6.5/debian/patches/series
--- gnuplot-4.6.5/debian/patches/series	2014-03-01 11:17:19.000000000 +1300
+++ gnuplot-4.6.5/debian/patches/series	2014-06-02 11:12:33.000000000 +1200
@@ -2,3 +2,4 @@
 05_default_gd_font.diff
 08_do_not_set_qt_default_term.patch
 09_force_texinfo.patch
+tmp.patch
diff -Nru gnuplot-4.6.5/debian/patches/tmp.patch gnuplot-4.6.5/debian/patches/tmp.patch
--- gnuplot-4.6.5/debian/patches/tmp.patch	1970-01-01 12:00:00.000000000 +1200
+++ gnuplot-4.6.5/debian/patches/tmp.patch	2014-06-02 15:06:37.000000000 +1200
@@ -0,0 +1,21 @@
+--- a/src/wxterminal/wxt_gui.cpp
++++ b/src/wxterminal/wxt_gui.cpp
+@@ -95,6 +95,8 @@
+ /* define DEBUG here to have debugging messages in stderr */
+ #include "wxt_gui.h"
+ 
++#include <X11/Xlib.h>
++
+ /* frame icon composed of three icons of different resolutions */
+ #include "bitmaps/xpm/icon16x16.xpm"
+ #include "bitmaps/xpm/icon32x32.xpm"
+@@ -1566,6 +1568,9 @@
+ 	if ( wxt_status == STATUS_UNINITIALIZED ) {
+ 		FPRINTF((stderr,"First Init\n"));
+ 
++		XInitThreads();
++		wxDISABLE_DEBUG_SUPPORT();
++
+ #ifdef __WXMSW__
+ 		/* the following is done in wxEntry() with wxMSW only */
+ 		WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
diff -Nru gnuplot-4.6.5/debian/rules gnuplot-4.6.5/debian/rules
--- gnuplot-4.6.5/debian/rules	2014-05-30 03:05:38.000000000 +1200
+++ gnuplot-4.6.5/debian/rules	2014-06-02 14:45:44.000000000 +1200
@@ -4,10 +4,11 @@
 	dh $@ --parallel --with autoreconf
 
 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export DEB_LDFLAGS_MAINT_APPEND = -lX11 -Wl,--as-needed
 
 # Tell compiler where should find lua headers
 export DEB_CFLAGS_MAINT_APPEND = -I/usr/include/lua5.1
+export DEB_CXXFLAGS_MAINT_APPEND = -DNDEBUG
 
 BUILDDIR_NOX = $(CURDIR)/debian/build-nox
 BUILDDIR_X11 = $(CURDIR)/debian/build-x11

Reply via email to