Subject: pkg/28526: finance/gnucash crashes after every input line [AHA]
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Andreas Hallmann <hallmann@hallhard.darktech.org>
List: pkgsrc-bugs
Date: 12/03/2004 10:12:00
>Number:         28526
>Category:       pkg
>Synopsis:       finance/gnucash crashes after every input line [AHA] <finance/gnucash>
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 03 10:12:00 +0000 2004
>Originator:     Andreas Hallmann
>Release:        NetBSD 1.6.2_STABLE
>Organization:
>Environment:
System: NetBSD nda 1.6.2_STABLE NetBSD 1.6.2_STABLE (AHAv8#2) #8: Mon Jun 21 15:16:26 CEST 2004 toor@nda:/amd/nda/mounts/netbsd/src/sys/arch/sparc/compile/AHAv8#2 sparc
Architecture: sparc
Machine: sparc
>Description:
	At least on sparc, gnucash is not in a working condition for a long time now.
        It compiles, can be started, but crashes after every new line checked into an account.
	Moreover, it throws a lot gtk-related error-messages and warnings.

	Im not picking on the maintainer. He is doinging a great job. Pulling up any new revision.

	Due to my analysis, guppi, guile-slib, guile-gtk and g-wrap needs to be modernised and all dependencies
	to guile14 should be replaced by guile.

>How-To-Repeat:
	compile and try to enter a few lines of data into an account

>Fix:

	It was a lot of work, to build a set of patches to fix this.
	Applying them results in a rock stable gnucash (again at least on sparc)
	Please, apply them before the freeze.

	A series of patches follow. Marked by [AHA] and i.e. <math/guppi> for your convinience.
	All should be applied from your pkgsrc root. (again for your convinience.)
	OK, first fix is trivial.

	Here it goes:  (Submission of these patches via send-pr took 3h of my time --- Lord I need 'cvs ci' )

cd /usr/pkgsrc
remove         finance/gnucash/patches/patch-ad
add new patch  finance/gnucash/patches/patch-aa
-----------------------------patch-aa--------
#
# This cast works around a incompatible pointer cast warning.
# As far as I can see it is correct.
# But I digged not for enough to be shure.
# So if anyone is in trouble, saving something to html....
#

--- src/gnome-utils/gnc-html.c.orig	Sat Apr 12 19:03:30 2003
+++ src/gnome-utils/gnc-html.c
@@ -1335,7 +1335,7 @@ gnc_html_export(gnc_html * html, const c
   if (!fh)
     return FALSE;
 
-  gtk_html_save (GTK_HTML(html->html), raw_html_receiver, fh);
+  gtk_html_save (GTK_HTML(html->html), (GtkHTMLSaveReceiverFn) raw_html_receiver, fh);
 
   fclose (fh);
 

-----------------------------patch-aa--------end


########################
Patch to finance gnucash
########################

Index: finance/gnucash/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/finance/gnucash/Makefile,v
retrieving revision 1.74
diff -r1.74 Makefile
4c4
< PKGREVISION=		4
---
> PKGREVISION=		5
32,36c32
< BUILDLINK_TRANSFORM+=  rm:-Werror
< 
< CFLAGS+=		-Wl,-R${PREFIX}/${GUILE14_SUBDIR}/lib
< #CFLAGS+=		-L${PREFIX}/${GUILE14_SUBDIR}/lib -Wl,-R${PREFIX}/${GUILE14_SUBDIR}/lib
< LDFLAGS+=		-L${PREFIX}/${GUILE14_SUBDIR}/lib -Wl,-R${PREFIX}/${GUILE14_SUBDIR}/lib
---
> #BUILDLINK_TRANSFORM+=  rm:-Werror
40d35
< MAKE_ENV+=		GUILE14_SUBDIR=${GUILE14_SUBDIR:Q}
47,54d41
< SUBST_CLASSES+=		guile14
< SUBST_STAGE.guile14=	pre-configure
< SUBST_MESSAGE.guile14=	"Substitute interpreter calls to use guile14."
< SUBST_FILES.guile14+=	src/bin/overrides/gnucash
< SUBST_FILES.guile14+=	src/bin/overrides/gnucash-make-guids
< SUBST_FILES.guile14+=	src/bin/overrides/gnucash-run-script
< SUBST_SED.guile14+=	"s, guile , ${PREFIX}/${GUILE14_SUBDIR}/bin/guile ,"
< 
96c83
< .include "../../lang/guile14/buildlink3.mk"
---
> .include "../../lang/guile/buildlink3.mk"
Index: finance/gnucash/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/finance/gnucash/distinfo,v
retrieving revision 1.21
diff -r1.21 distinfo
5c5
< SHA1 (patch-ad) = cffcbb86e71ff1f491b36ba14e4a9c0486ca7984
---
> SHA1 (patch-aa) = cac281099a0348f1c04b7ffd147d145dd6b8f05d