Bluefish 1.3.3 under OpenSolaris or Solaris Nevada

To speed things up Bluefish 1.3.3 has static inline functions. However, GCC thinks that the “inlineness” is defined twice:

bftextview2_scanner.c:257: error: duplicate `inline’
bftextview2_scanner.c:305: error: duplicate `inline’
bftextview2_scanner.c:339: error: duplicate `inline’
bftextview2_scanner.c:383: error: duplicate `inline’
bftextview2_scanner.c:432: error: duplicate `inline’
gmake[3]: *** [bftextview2_scanner.o] Error 1
gmake[3]: Leaving directory `/var/tmp/bluefish-unstable-1.3.3/src’
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/var/tmp/bluefish-unstable-1.3.3/src’
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/var/tmp/bluefish-unstable-1.3.3/src’
gmake: *** [all-recursive] Error 1

This is an excerpt from the source:

#ifdef __GNUC__
__inline__
#endif

static inline void paint_margin_line(BluefishTextView *btv,
GdkEventExpose * event,
gint w,gint height) {

To fix remove one of the inline definitions for all functions. For example, change from:

static inline void paint_margin_line(BluefishTextView *btv,
GdkEventExpose * event,
gint w,gint height) {

to

static void paint_margin_line(BluefishTextView *btv,
GdkEventExpose * event,
gint w,gint height) {

Also see the previous post (/archives/432) on Bluefish.

How to compile Bluefish 1.3.x under OpenSolaris or Solaris Nevada

  1. Get intltool package (for example, from blastwave)

    If you use the bundled intltool, you will get the following error:

    Undefined first referenced
    symbol in file
    libintl_bind_textdomain_codeset bluefish.o
    libintl_gettext bf_lib.o
    libintl_textdomain bluefish.o
    libintl_bindtextdomain bluefish.o
    libintl_ngettext file.o
    ld: fatal: symbol referencing errors. No output written to bluefish-unstable
    collect2: ld returned 1 exit status
    gmake[3]: *** [bluefish-unstable] Error 1
    gmake[3]: Leaving directory `/var/tmp/bluefish-unstable-1.3.2/src’
    gmake[2]: *** [all-recursive] Error 1
    gmake[2]: Leaving directory `/var/tmp/bluefish-unstable-1.3.2/src’
    gmake[1]: *** [all] Error 2
    gmake[1]: Leaving directory `/var/tmp/bluefish-unstable-1.3.2/src’
    gmake: *** [all-recursive] Error 1
  2. Set the LIBS variable:
    export LIBS=”-lsocket -lnsl -L/usr/csw/lib -lintl”
  3. Put /usr/gnu/bin directory in the first place in PATH. For example:
    export PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:
    /sbin:/usr/dt/bin:/usr/sfw/bin:/usr/csw/bin:/usr/local/bin

    The reason is two different xgettext programs. The configure script wants the GNU version:

    checking for xgettext… (cached) /usr/bin/xgettext
    checking for msgmerge… /usr/bin/msgmerge
    checking for msgfmt… (cached) /usr/bin/msgfmt
    /usr/bin/xgettext: illegal option — version
    Usage: xgettext [-a [-x exclude-file]] [-jns][-c comment-tag]
    [-d default-domain] [-m prefix] [-M suffix] [-p pathname] files …
    xgettext -h
    ERROR: Cannot open file –version.
    configure: error: GNU gettext tools not found; required for intltool