compiling gnc 1.7.7 on SuSE: success

Thomas Spahni tsp@lawbiz.ch
Mon, 6 Jan 2003 18:47:24 +0100 (CET)


Gang,

this is to give some positive feedback to those who are desperately trying
to get gnucash running. I started out with SuSE 8.0 distribution. Then I
did:

- download the source gnucash-1.7.7.tar.gz and g-wrap-1.3.4
- tar xvzf gnucash-1.7.7.tar.gz
- tar xvzf g-wrap-1.3.4
- cd gnucash-1.7.7.tar.gz
- configure --prefix=/usr
  repeat this step ...

each time when it bailed out I had to add a package from the distribution
CD. Sometimes it was necessary to have a look at config.log to see what
was missing. When it asked for -lesd that meant to install the esound
package. Everyone's mileage may vary here depending on what is already
installed.

- make

compilation stopped at a point where it run into redeclaration of gettext,
dgettext and dcgettext. These are declared in /usr/include/libintl.h and
would be redeclared in /opt/gnome/include/gnome-1.0/libgnome/gnome-i18n.h

I decided to hack /usr/include/libintl.h adding

#ifndef ENABLE_NLS
#define ENABLE_NLS      1
#endif /* ENABLE_NLS */

because that is what gnome-i18n.h checks for:

#include <libintl.h>
#ifdef ENABLE_NLS
#    ifdef GNOME_EXPLICIT_TRANSLATION_DOMAIN
#        undef _
#        define _(String) dgettext (GNOME_EXPLICIT_TRANSLATION_DOMAIN,
String)
#    else
#        define _(String) gettext (String)
#    endif
#    ifdef gettext_noop
#        define N_(String) gettext_noop (String)
#    else
#        define N_(String) (String)
#    endif
#else
/* Stubs that do something close enough.  */
#    define textdomain(String) (String)
#    define gettext(String) (String)
#    define dgettext(Domain,Message) (Message)
#    define dcgettext(Domain,Message,Type) (Message)
#    define bindtextdomain(Domain,Directory) (Domain)
#    define _(String) (String)
#    define N_(String) (String)
#endif

Anyway: now it compiled fine. The package started up after

su -c 'make install'

and appears to run fine. I've not yet tested one of the new features.

Regards,
Thomas Spahni