Ticket #1161 (new defect)

Opened 5 years ago

Last modified 4 years ago

configure.ac requires gtksourceview-2.0.2, code needs 2.2

Reported by: guest Owned by: axel
Priority: normal Milestone: 0.12.0
Component: SourceView bindings Version: 0.9.12
Keywords: Cc:

Description

When compiling gtk2hs-0.10.0 I get this error (which does not kill the build?!):

./tools/c2hs/c2hsLocal +RTS -RTS -iglib:gtk:gtksourceview2 --precomp=gtksourceview2/gtksourceview2.precomp -o gtksourceview2/Graphics/UI/Gtk/SourceView/SourceMark.hs gtksourceview2/Graphics/UI/Gtk/SourceView/SourceMark.chs
c2hsLocal: Errors during expansion of binding hooks:

gtksourceview2/Graphics/UI/Gtk/SourceView/SourceMark.chs:50: (column 27) [ERROR] 
  >>> Unknown identifier!
  Cannot find a definition for `source_mark_get_category' in the header file.
gtksourceview2/Graphics/UI/Gtk/SourceView/SourceMark.chs:59: (column 42) [ERROR] 
  >>> Unknown identifier!
  Cannot find a definition for `source_mark_next' in the header file.
gtksourceview2/Graphics/UI/Gtk/SourceView/SourceMark.chs:65: (column 42) [ERROR] 
  >>> Unknown identifier!
  Cannot find a definition for `source_mark_prev' in the header file.

Eventually I run into this error:

/usr/bin/ghc +RTS -RTS -split-objs -c gtksourceview2/Graphics/UI/Gtk/SourceView.hs -o gtksourceview2/Graphics/UI/Gtk/SourceView.o -O -XForeignFunctionInterface -igtksourceview2 -package-conf package.conf.inplace -hide-all-packages -ignore-package gtksourceview2 -package base-4.1.0.0 -package glib-0.10.0 -package gtk-0.10.0 -package-name gtksourceview2-0.10.0 '-#include<gtksourceview2.h>' -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -I/usr/include/gtksourceview-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -Igtksourceview2

gtksourceview2/Graphics/UI/Gtk/SourceView.hs:12:0:
    Failed to load interface for `Graphics.UI.Gtk.SourceView.SourceBuffer':
      Use -v to see a list of the files searched for.

source_mark_get_category, source_mark_next, source_mark_prev are all available from gtksourceview-2.2, according to the upstream docs. These functions are exposed through the API, but not used within gtk2hs. There are more functions used for all gtksourceview versions, except they only came with 2.2.

./configure.ac is satisfied with gtksourceview-2.0.2, which is what I had installed. Should the version dep be adjusted, or the code patched (foo_CHECK_VERSION)?

Lennart Kolmodin

Change History

Changed 5 years ago by pgavin

  • owner changed from duncan to pgavin

Don't know if this is still an issue (it probably is). I'll look into it.

Changed 5 years ago by pgavin

  • milestone set to 0.10.2

Changed 4 years ago by axel

  • owner changed from pgavin to axel
  • milestone changed from 0.10.2 to 0.12.0

This is still an issue. We still only require 2.0.2 in the cabal file but lack the #ifdefs around newer functions.

Note: See TracTickets for help on using tickets.