-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Mon, Jan 26, 2009 at 8:07 PM, Duncan Coutts wrote:
> On Mon, 2009-01-26 at 16:37 -0500, Gwern Branwen wrote:
>
>> I tried using that gtk2hs tarball. make eventually errored out as:
>
>> glib/System/Glib/GObject.chs.pp:38: error: missing expression between
>> '(' and ')'
>> glib/System/Glib/GObject.chs.pp:91: error: missing expression between
>> '(' and ')'
>> make: *** [glib/System/Glib/GObject.chs] Error 1
>>
>> Any suggestions?
>
> I've seen this occasionally. If you check gtk2hs-confg.h near the bottom
> of the file you'll likely find something like
>
> #def _GLIB_MAJOR_VERSION ()
>
> rather than
>
> #def _GLIB_MAJOR_VERSION (2)
>
> It is ./configure that generates the gtk2hs-confg.h from
> gtk2hs-confg.h.in based on tests in configure.ac. I've never been able
> to reproduce it and when others have helped me investigate we did not
> find a solution or indeed a cause.
>
> If you'd like to do some digging it'd be much appreciated. I'm cc'ing
> the gtk2hs-users list just in case someone else has already diagnosed
> this.
>
> Duncan
Yes, that file does seem broken in the way you describe. Starting at line 132:
/* Glib major version */
#define _GLIB_MAJOR_VERSION ()
/* Glib micro version */
#define _GLIB_MICRO_VERSION ()
/* Glib minor version */
#define _GLIB_MINOR_VERSION ()
/* gnome-vfs major version */
#define _GNOME_VFS_MAJOR_VERSION ()
/* gnome-vfs micro version */
#define _GNOME_VFS_MICRO_VERSION ()
/* gnome-vfs minor version */
#define _GNOME_VFS_MINOR_VERSION ()
/* gstreamer major version */
#define _GST_MAJOR_VERSION ()
/* gstreamer micro version */
#define _GST_MICRO_VERSION ()
/* gstreamer minor version */
#define _GST_MINOR_VERSION ()
/* gtksourceview2 major version */
#define _GTKSOURCEVIEW2_MAJOR_VERSION ()
/* gtksourceview2 micro version */
#define _GTKSOURCEVIEW2_MICRO_VERSION ()
/* gtksourceview2 minor version */
#define _GTKSOURCEVIEW2_MINOR_VERSION ()
/* Gtk+ major version */
#define _GTK_MAJOR_VERSION ()
/* Gtk+ micro version */
#define _GTK_MICRO_VERSION ()
/* Gtk+ minor version */
#define _GTK_MINOR_VERSION ()
/* librsvg major version */
#define _LIBRSVG_MAJOR_VERSION ()
/* librsvg micro version */
#define _LIBRSVG_MICRO_VERSION ()
/* librsvg minor version */
#define _LIBRSVG_MINOR_VERSION ()
/* Pango major version */
#define _PANGO_MAJOR_VERSION ()
/* Pango micro version */
#define _PANGO_MICRO_VERSION ()
/* Pango minor version */
#define _PANGO_MINOR_VERSION ()
That all looks quite broken.
I'm afraid I don't know enough about autotools to figure this out.
However, I've put up a tarball of the gtk directory just after a make
failed, at http://code.haskell.org/~gwern/gtk-broken.tar.gz so people
can look at it themselves?
- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkl+cvcACgkQvpDo5Pfl1oLXwACgl2V427baEPYV3AHwnTZH2W5D
wlMAoJgqQdUjBHCIi01UHlvtyQUyifMa
=INxD
-----END PGP SIGNATURE-----
/* gtk2hs-config.h. Generated from gtk2hs-config.h.in by configure. */
/* gtk2hs-config.h.in. Generated from configure.ac by autoheader. */
/* Hack to suppress warnings that these symbols clash with
the ones from ghc's version of config.h */
#undef /**/ PACKAGE_NAME
#undef /**/ PACKAGE_STRING
#undef /**/ PACKAGE_TARNAME
#undef /**/ PACKAGE_VERSION
/* Leave out all deprecated functions. */
/* #undef DISABLE_DEPRECATED */
/* Whether or not the cairo package is available. */
#define ENABLE_CAIRO
/* cairo pdf backend enabled */
#define ENABLE_CAIRO_PDF_SURFACE
/* cairo png functions available */
#define ENABLE_CAIRO_PNG_FUNCTIONS
/* cairo ps backend enabled */
#define ENABLE_CAIRO_PS_SURFACE
/* cairo svg backend enabled */
#define ENABLE_CAIRO_SVG_SURFACE
/* Whether or not the firefox package is available. */
/* #undef ENABLE_FIREFOX_MOZEMBED */
/* Whether or not the gconf package is available. */
#define ENABLE_GCONF
/* Whether or not the gio package is available. */
#define ENABLE_GIO
/* Whether or not the gnomevfs package is available. */
#define ENABLE_GNOMEVFS
/* Whether or not the gstreamer package is available. */
#define ENABLE_GSTREAMER
/* Whether or not the gtk package is available. */
#define ENABLE_GTK
/* Whether or not the opengl package is available. */
#define ENABLE_GTKGLEXT
/* Whether or not the gtksourceview2 package is available. */
/* #undef ENABLE_GTKSOURCEVIEW2 */
/* Whether or not the libglade package is available. */
#define ENABLE_LIBGLADE
/* Whether or not the mozilla package is available. */
#define ENABLE_MOZILLA_MOZEMBED
/* Whether or not the seamonkey package is available. */
/* #undef ENABLE_SEAMONKEY_MOZEMBED */
/* Whether or not the sourceview package is available. */
#define ENABLE_SOURCEVIEW
/* Whether or not the svg package is available. */
#define ENABLE_SVGCAIRO
/* Whether or not the xulrunner package is available. */
/* #undef ENABLE_XULRUNNER_MOZEMBED */
/* Omit deprecated gdk functions. */
/* #undef GDK_DISABLE_DEPRECATED */
/* Omit deprecated pixbuf functions. */
/* #undef GDK_PIXBUF_DISABLE_DEPRECATED */
/* Omit deprecated gtk functions. */
/* #undef GTK_DISABLE_DEPRECATED */
/* Define this if we need to hack around a broken development version of Gtk+
(2.1.0) that for some reason Sun decided it'd be a really good idea for
them to ship. Grrr. */
/* #undef GTK_MULTIHEAD_SAFE */
/* Omit deprecated glib functions. */
/* #undef G_DISABLE_DEPRECATED */
/* Define if you have the new Control.Exception module (from GHC 6.10) */
#define HAVE_NEW_CONTROL_EXCEPTION 1
/* Using split base package. */
#define HAVE_SPLIT_BASE 1
/* The mozembed library directory */
#define MOZEMBED_LIBDIR ""
/* Name of package */
#define PACKAGE "gtk2hs"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "gtk2hs"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "gtk2hs 0.10.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gtk2hs"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.10.0"
/* Use the new GClosure based signals implementation. */
#define USE_GCLOSUE_SIGNALS_IMPL
/* Version number of package */
#define VERSION "0.10.0"
/* cairo major version number */
#define _CAIRO_MAJOR_VERSION (1)
/* cairo minor patch level */
#define _CAIRO_MICRO_VERSION (0)
/* cairo minor version number */
#define _CAIRO_MINOR_VERSION (8)
/* Glib major version */
#define _GLIB_MAJOR_VERSION ()
/* Glib micro version */
#define _GLIB_MICRO_VERSION ()
/* Glib minor version */
#define _GLIB_MINOR_VERSION ()
/* gnome-vfs major version */
#define _GNOME_VFS_MAJOR_VERSION ()
/* gnome-vfs micro version */
#define _GNOME_VFS_MICRO_VERSION ()
/* gnome-vfs minor version */
#define _GNOME_VFS_MINOR_VERSION ()
/* gstreamer major version */
#define _GST_MAJOR_VERSION ()
/* gstreamer micro version */
#define _GST_MICRO_VERSION ()
/* gstreamer minor version */
#define _GST_MINOR_VERSION ()
/* gtksourceview2 major version */
#define _GTKSOURCEVIEW2_MAJOR_VERSION ()
/* gtksourceview2 micro version */
#define _GTKSOURCEVIEW2_MICRO_VERSION ()
/* gtksourceview2 minor version */
#define _GTKSOURCEVIEW2_MINOR_VERSION ()
/* Gtk+ major version */
#define _GTK_MAJOR_VERSION ()
/* Gtk+ micro version */
#define _GTK_MICRO_VERSION ()
/* Gtk+ minor version */
#define _GTK_MINOR_VERSION ()
/* librsvg major version */
#define _LIBRSVG_MAJOR_VERSION ()
/* librsvg micro version */
#define _LIBRSVG_MICRO_VERSION ()
/* librsvg minor version */
#define _LIBRSVG_MINOR_VERSION ()
/* Pango major version */
#define _PANGO_MAJOR_VERSION ()
/* Pango micro version */
#define _PANGO_MICRO_VERSION ()
/* Pango minor version */
#define _PANGO_MINOR_VERSION ()
/* Version number of GHC. */
#define __GLASGOW_HASKELL__ 610
/* Allow code to be compiled differently for different versions of Gtk+ */
#ifdef GTK2HS_HS_PREPROC
#define GTK_CHECK_VERSION(major, minor, micro) \
(_GTK_MAJOR_VERSION > (major) || \
(_GTK_MAJOR_VERSION == (major) && _GTK_MINOR_VERSION > (minor)) || \
(_GTK_MAJOR_VERSION == (major) && _GTK_MINOR_VERSION == (minor) && \
_GTK_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of gtksourceview2 */
#ifdef GTK2HS_HS_PREPROC
#define GTKSOURCEVIEW2_CHECK_VERSION(major, minor, micro) \
(_GTKSOURCEVIEW2_MAJOR_VERSION > (major) || \
(_GTKSOURCEVIEW2_MAJOR_VERSION == (major) && _GTKSOURCEVIEW2_MINOR_VERSION > (minor)) || \
(_GTKSOURCEVIEW2_MAJOR_VERSION == (major) && _GTKSOURCEVIEW2_MINOR_VERSION == (minor) && \
_GTKSOURCEVIEW2_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of Pango */
#ifdef GTK2HS_HS_PREPROC
#define PANGO_CHECK_VERSION(major, minor, micro) \
(_PANGO_MAJOR_VERSION > (major) || \
(_PANGO_MAJOR_VERSION == (major) && _PANGO_MINOR_VERSION > (minor)) || \
(_PANGO_MAJOR_VERSION == (major) && _PANGO_MINOR_VERSION == (minor) && \
_PANGO_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of Glib */
#ifdef GTK2HS_HS_PREPROC
#define GLIB_CHECK_VERSION(major, minor, micro) \
(_GLIB_MAJOR_VERSION > (major) || \
(_GLIB_MAJOR_VERSION == (major) && _GLIB_MINOR_VERSION > (minor)) || \
(_GLIB_MAJOR_VERSION == (major) && _GLIB_MINOR_VERSION == (minor) && \
_GLIB_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of gstreamer */
#ifdef GTK2HS_HS_PREPROC
#define GST_CHECK_VERSION(major, minor, micro) \
(_GST_MAJOR_VERSION > (major) || \
(_GST_MAJOR_VERSION == (major) && _GST_MINOR_VERSION > (minor)) || \
(_GST_MAJOR_VERSION == (major) && _GST_MINOR_VERSION == (minor) && \
_GST_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of gnome-vfs */
#ifdef GTK2HS_HS_PREPROC
#define GNOME_VFS_CHECK_VERSION(major, minor, micro) \
(_GNOME_VFS_MAJOR_VERSION > (major) || \
(_GNOME_VFS_MAJOR_VERSION == (major) && _GNOME_VFS_MINOR_VERSION > (minor)) || \
(_GNOME_VFS_MAJOR_VERSION == (major) && _GNOME_VFS_MINOR_VERSION == (minor) && \
_GNOME_VFS_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of librsvg */
#ifdef GTK2HS_HS_PREPROC
#define LIBRSVG_CHECK_VERSION(major, minor, micro) \
(_LIBRSVG_MAJOR_VERSION > (major) || \
(_LIBRSVG_MAJOR_VERSION == (major) && _LIBRSVG_MINOR_VERSION > (minor)) || \
(_LIBRSVG_MAJOR_VERSION == (major) && _LIBRSVG_MINOR_VERSION == (minor) && \
_LIBRSVG_MICRO_VERSION >= (micro)))
#endif
/* Allow code to be compiled differently for different versions of cairo */
#ifdef GTK2HS_HS_PREPROC
#define CAIRO_CHECK_VERSION(major,minor,micro) \
(_CAIRO_MAJOR_VERSION > (major) || \
(_CAIRO_MAJOR_VERSION == (major) && _CAIRO_MINOR_VERSION > (minor)) || \
(_CAIRO_MAJOR_VERSION == (major) && _CAIRO_MINOR_VERSION == (minor) && \
_CAIRO_MICRO_VERSION >= (micro)))
#endif
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe