Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building gi-gtksource 3.0.11 fails #75

Closed
jaccokrijnen opened this issue Jan 26, 2017 · 4 comments
Closed

Building gi-gtksource 3.0.11 fails #75

jaccokrijnen opened this issue Jan 26, 2017 · 4 comments

Comments

@jaccokrijnen
Copy link

jaccokrijnen commented Jan 26, 2017

While building leksah, gi-gtksource failed. On Ubuntu with gtk 3.18 (cabal 1.24, ghc 8.0.1).

[1 of 1] Compiling Main             ( /home/jacco/leksah/dist-newstyle/tmp/gi-gtksource-22322/gi-gtksource-3.0.11/dist/setup/setup.hs, /home/jacco/leksah/dist-newstyle/tmp/gi-gtksource-22322/gi-gtksource-3.0.11/dist/setup/Main.o )
Linking /home/jacco/leksah/dist-newstyle/tmp/gi-gtksource-22322/gi-gtksource-3.0.11/dist/setup/setup ...
Configuring gi-gtksource-3.0.11...
Building gi-gtksource-3.0.11...
Preprocessing library gi-gtksource-3.0.11...
[ 1 of 61] Compiling GI.GtkSource.Structs.Encoding[boot] ( GI/GtkSource/Structs/Encoding.hs-boot, dist/build/GI/GtkSource/Structs/Encoding.o-boot )
[ 2 of 61] Compiling GI.GtkSource.Structs.Encoding ( GI/GtkSource/Structs/Encoding.hs, dist/build/GI/GtkSource/Structs/Encoding.o )
[ 3 of 61] Compiling GI.GtkSource.Objects.View[boot] ( GI/GtkSource/Objects/View.hs-boot, dist/build/GI/GtkSource/Objects/View.o-boot )
[ 4 of 61] Compiling GI.GtkSource.Objects.Style[boot] ( GI/GtkSource/Objects/Style.hs-boot, dist/build/GI/GtkSource/Objects/Style.o-boot )
[ 5 of 61] Compiling GI.GtkSource.Objects.Style ( GI/GtkSource/Objects/Style.hs, dist/build/GI/GtkSource/Objects/Style.o )
[ 6 of 61] Compiling GI.GtkSource.Objects.SearchSettings[boot] ( GI/GtkSource/Objects/SearchSettings.hs-boot, dist/build/GI/GtkSource/Objects/SearchSettings.o-boot )
[ 7 of 61] Compiling GI.GtkSource.Objects.SearchSettings ( GI/GtkSource/Objects/SearchSettings.hs, dist/build/GI/GtkSource/Objects/SearchSettings.o )
[ 8 of 61] Compiling GI.GtkSource.Objects.MarkAttributes[boot] ( GI/GtkSource/Objects/MarkAttributes.hs-boot, dist/build/GI/GtkSource/Objects/MarkAttributes.o-boot )
[ 9 of 61] Compiling GI.GtkSource.Objects.Mark[boot] ( GI/GtkSource/Objects/Mark.hs-boot, dist/build/GI/GtkSource/Objects/Mark.o-boot )
[10 of 61] Compiling GI.GtkSource.Objects.Mark ( GI/GtkSource/Objects/Mark.hs, dist/build/GI/GtkSource/Objects/Mark.o )
[11 of 61] Compiling GI.GtkSource.Objects.MarkAttributes ( GI/GtkSource/Objects/MarkAttributes.hs, dist/build/GI/GtkSource/Objects/MarkAttributes.o )
[12 of 61] Compiling GI.GtkSource.Objects.Map ( GI/GtkSource/Objects/Map.hs, dist/build/GI/GtkSource/Objects/Map.o )
[13 of 61] Compiling GI.GtkSource.Objects.Language[boot] ( GI/GtkSource/Objects/Language.hs-boot, dist/build/GI/GtkSource/Objects/Language.o-boot )
[14 of 61] Compiling GI.GtkSource.Objects.Language ( GI/GtkSource/Objects/Language.hs, dist/build/GI/GtkSource/Objects/Language.o )
[15 of 61] Compiling GI.GtkSource.Objects.LanguageManager ( GI/GtkSource/Objects/LanguageManager.hs, dist/build/GI/GtkSource/Objects/LanguageManager.o )
[16 of 61] Compiling GI.GtkSource.Objects.GutterRenderer[boot] ( GI/GtkSource/Objects/GutterRenderer.hs-boot, dist/build/GI/GtkSource/Objects/GutterRenderer.o-boot )
[17 of 61] Compiling GI.GtkSource.Objects.GutterRendererPixbuf ( GI/GtkSource/Objects/GutterRendererPixbuf.hs, dist/build/GI/GtkSource/Objects/GutterRendererPixbuf.o )
[18 of 61] Compiling GI.GtkSource.Objects.GutterRendererText ( GI/GtkSource/Objects/GutterRendererText.hs, dist/build/GI/GtkSource/Objects/GutterRendererText.o )
[19 of 61] Compiling GI.GtkSource.Objects.Gutter[boot] ( GI/GtkSource/Objects/Gutter.hs-boot, dist/build/GI/GtkSource/Objects/Gutter.o-boot )
[20 of 61] Compiling GI.GtkSource.Objects.Gutter ( GI/GtkSource/Objects/Gutter.hs, dist/build/GI/GtkSource/Objects/Gutter.o )
[21 of 61] Compiling GI.GtkSource.Objects.File[boot] ( GI/GtkSource/Objects/File.hs-boot, dist/build/GI/GtkSource/Objects/File.o-boot )
[22 of 61] Compiling GI.GtkSource.Objects.Completion[boot] ( GI/GtkSource/Objects/Completion.hs-boot, dist/build/GI/GtkSource/Objects/Completion.o-boot )
[23 of 61] Compiling GI.GtkSource.Objects.Buffer[boot] ( GI/GtkSource/Objects/Buffer.hs-boot, dist/build/GI/GtkSource/Objects/Buffer.o-boot )
[24 of 61] Compiling GI.GtkSource.Objects.PrintCompositor ( GI/GtkSource/Objects/PrintCompositor.hs, dist/build/GI/GtkSource/Objects/PrintCompositor.o )
[25 of 61] Compiling GI.GtkSource.Objects.SearchContext ( GI/GtkSource/Objects/SearchContext.hs, dist/build/GI/GtkSource/Objects/SearchContext.o )
[26 of 61] Compiling GI.GtkSource.Objects.StyleScheme[boot] ( GI/GtkSource/Objects/StyleScheme.hs-boot, dist/build/GI/GtkSource/Objects/StyleScheme.o-boot )
[27 of 61] Compiling GI.GtkSource.Objects.StyleScheme ( GI/GtkSource/Objects/StyleScheme.hs, dist/build/GI/GtkSource/Objects/StyleScheme.o )
[28 of 61] Compiling GI.GtkSource.Objects.StyleSchemeManager ( GI/GtkSource/Objects/StyleSchemeManager.hs, dist/build/GI/GtkSource/Objects/StyleSchemeManager.o )
[29 of 61] Compiling GI.GtkSource.Objects.CompletionInfo[boot] ( GI/GtkSource/Objects/CompletionInfo.hs-boot, dist/build/GI/GtkSource/Objects/CompletionInfo.o-boot )
[30 of 61] Compiling GI.GtkSource.Objects.CompletionInfo ( GI/GtkSource/Objects/CompletionInfo.hs, dist/build/GI/GtkSource/Objects/CompletionInfo.o )
[31 of 61] Compiling GI.GtkSource.Objects.CompletionContext[boot] ( GI/GtkSource/Objects/CompletionContext.hs-boot, dist/build/GI/GtkSource/Objects/CompletionContext.o-boot )
[32 of 61] Compiling GI.GtkSource.Interfaces.UndoManager[boot] ( GI/GtkSource/Interfaces/UndoManager.hs-boot, dist/build/GI/GtkSource/Interfaces/UndoManager.o-boot )
[33 of 61] Compiling GI.GtkSource.Interfaces.UndoManager ( GI/GtkSource/Interfaces/UndoManager.hs, dist/build/GI/GtkSource/Interfaces/UndoManager.o )
[34 of 61] Compiling GI.GtkSource.Interfaces.StyleSchemeChooser[boot] ( GI/GtkSource/Interfaces/StyleSchemeChooser.hs-boot, dist/build/GI/GtkSource/Interfaces/StyleSchemeChooser.o-boot )
[35 of 61] Compiling GI.GtkSource.Interfaces.StyleSchemeChooser ( GI/GtkSource/Interfaces/StyleSchemeChooser.hs, dist/build/GI/GtkSource/Interfaces/StyleSchemeChooser.o )
[36 of 61] Compiling GI.GtkSource.Objects.StyleSchemeChooserButton ( GI/GtkSource/Objects/StyleSchemeChooserButton.hs, dist/build/GI/GtkSource/Objects/StyleSchemeChooserButton.o )
[37 of 61] Compiling GI.GtkSource.Objects.StyleSchemeChooserWidget ( GI/GtkSource/Objects/StyleSchemeChooserWidget.hs, dist/build/GI/GtkSource/Objects/StyleSchemeChooserWidget.o )
[38 of 61] Compiling GI.GtkSource.Interfaces.CompletionProvider[boot] ( GI/GtkSource/Interfaces/CompletionProvider.hs-boot, dist/build/GI/GtkSource/Interfaces/CompletionProvider.o-boot )
[39 of 61] Compiling GI.GtkSource.Objects.Completion ( GI/GtkSource/Objects/Completion.hs, dist/build/GI/GtkSource/Objects/Completion.o )
[40 of 61] Compiling GI.GtkSource.Interfaces.CompletionProposal[boot] ( GI/GtkSource/Interfaces/CompletionProposal.hs-boot, dist/build/GI/GtkSource/Interfaces/CompletionProposal.o-boot )
[41 of 61] Compiling GI.GtkSource.Interfaces.CompletionProposal ( GI/GtkSource/Interfaces/CompletionProposal.hs, dist/build/GI/GtkSource/Interfaces/CompletionProposal.o )
[42 of 61] Compiling GI.GtkSource.Objects.CompletionItem ( GI/GtkSource/Objects/CompletionItem.hs, dist/build/GI/GtkSource/Objects/CompletionItem.o )
[43 of 61] Compiling GI.GtkSource.Structs ( GI/GtkSource/Structs.hs, dist/build/GI/GtkSource/Structs.o )
[44 of 61] Compiling GI.GtkSource.Functions ( GI/GtkSource/Functions.hs, dist/build/GI/GtkSource/Functions.o )
[45 of 61] Compiling GI.GtkSource.Flags[boot] ( GI/GtkSource/Flags.hs-boot, dist/build/GI/GtkSource/Flags.o-boot )
[46 of 61] Compiling GI.GtkSource.Flags ( GI/GtkSource/Flags.hs, dist/build/GI/GtkSource/Flags.o )
[47 of 61] Compiling GI.GtkSource.Interfaces.CompletionProvider ( GI/GtkSource/Interfaces/CompletionProvider.hs, dist/build/GI/GtkSource/Interfaces/CompletionProvider.o )
[48 of 61] Compiling GI.GtkSource.Interfaces ( GI/GtkSource/Interfaces.hs, dist/build/GI/GtkSource/Interfaces.o )
[49 of 61] Compiling GI.GtkSource.Objects.CompletionContext ( GI/GtkSource/Objects/CompletionContext.hs, dist/build/GI/GtkSource/Objects/CompletionContext.o )
[50 of 61] Compiling GI.GtkSource.Objects.CompletionWords ( GI/GtkSource/Objects/CompletionWords.hs, dist/build/GI/GtkSource/Objects/CompletionWords.o )
[51 of 61] Compiling GI.GtkSource.Enums[boot] ( GI/GtkSource/Enums.hs-boot, dist/build/GI/GtkSource/Enums.o-boot )
[52 of 61] Compiling GI.GtkSource.Enums ( GI/GtkSource/Enums.hs, dist/build/GI/GtkSource/Enums.o )
[53 of 61] Compiling GI.GtkSource.Objects.Buffer ( GI/GtkSource/Objects/Buffer.hs, dist/build/GI/GtkSource/Objects/Buffer.o )

GI/GtkSource/Objects/Buffer.hs:1316:79: error:
    • Couldn't match type ‘Gtk.TextIter.TextIter’
                     with ‘Ptr Gtk.TextIter.TextIter’
      Expected type: Ptr (Ptr Gtk.TextIter.TextIter)
        Actual type: Ptr Gtk.TextIter.TextIter
    • In the second argument of ‘gtk_source_buffer_iter_backward_to_context_class_toggle’, namely
        ‘iter''’
      In a stmt of a 'do' block:
        result <- gtk_source_buffer_iter_backward_to_context_class_toggle
                    buffer' iter'' contextClass'
      In the second argument of ‘($)’, namely
        ‘do { buffer' <- unsafeManagedPtrCastPtr buffer;
              iter' <- disownBoxed iter;
              iter'' <- callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter);
              memcpy iter'' iter' 80;
              .... }’

GI/GtkSource/Objects/Buffer.hs:1319:51: error:
    • Couldn't match expected type ‘Ptr Gtk.TextIter.TextIter’
                  with actual type ‘Gtk.TextIter.TextIter’
    • In the second argument of ‘wrapBoxed’, namely ‘iter'''’
      In a stmt of a 'do' block:
        iter'''' <- (wrapBoxed Gtk.TextIter.TextIter) iter'''
      In the second argument of ‘($)’, namely
        ‘do { buffer' <- unsafeManagedPtrCastPtr buffer;
              iter' <- disownBoxed iter;
              iter'' <- callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter);
              memcpy iter'' iter' 80;
              .... }’

GI/GtkSource/Objects/Buffer.hs:1353:78: error:
    • Couldn't match type ‘Gtk.TextIter.TextIter’
                     with ‘Ptr Gtk.TextIter.TextIter’
      Expected type: Ptr (Ptr Gtk.TextIter.TextIter)
        Actual type: Ptr Gtk.TextIter.TextIter
    • In the second argument of ‘gtk_source_buffer_iter_forward_to_context_class_toggle’, namely
        ‘iter''’
      In a stmt of a 'do' block:
        result <- gtk_source_buffer_iter_forward_to_context_class_toggle
                    buffer' iter'' contextClass'
      In the second argument of ‘($)’, namely
        ‘do { buffer' <- unsafeManagedPtrCastPtr buffer;
              iter' <- disownBoxed iter;
              iter'' <- callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter);
              memcpy iter'' iter' 80;
              .... }’

GI/GtkSource/Objects/Buffer.hs:1356:51: error:
    • Couldn't match expected type ‘Ptr Gtk.TextIter.TextIter’
                  with actual type ‘Gtk.TextIter.TextIter’
    • In the second argument of ‘wrapBoxed’, namely ‘iter'''’
      In a stmt of a 'do' block:
        iter'''' <- (wrapBoxed Gtk.TextIter.TextIter) iter'''
      In the second argument of ‘($)’, namely
        ‘do { buffer' <- unsafeManagedPtrCastPtr buffer;
              iter' <- disownBoxed iter;
              iter'' <- callocBoxedBytes 80 :: IO (Ptr Gtk.TextIter.TextIter);
              memcpy iter'' iter' 80;
              .... }’

@garetxe
Copy link
Collaborator

garetxe commented Jan 27, 2017

Thanks for the report.

I need a bit more info: could you please send me the versions of haskell-gi and haskell-gi-base you are using (also, are they hackage or git versions), together with the contents of GI/GtkSource/Objects/Buffer.hs and /usr/share/gir-1.0/GtkSource-3.0.gir?

@jaccokrijnen
Copy link
Author

jaccokrijnen commented Jan 27, 2017

jacco@X556UV:~$ ghc-pkg list --package-db .cabal/store/ghc-8.0.1/package.db/ | grep haskell-gi
    haskell-gi-0.20
    haskell-gi-base-0.20

I got all gi bindings through hackage.

  • There is no GtkSource-3.0.gir file in my /usr/share/gir-1.0/ directory. I do have the package libgtksourceview-3.0-dev installed
  • Buffer.hs

@jaccokrijnen jaccokrijnen changed the title Building gi-gtk 3.0.11 fails Building gi-gtksource 3.0.11 fails Jan 27, 2017
@garetxe
Copy link
Collaborator

garetxe commented Jan 27, 2017

Thanks! This was an error in the introspection data, fixed in more recent versions of GtkSource: https://bugzilla.gnome.org/show_bug.cgi?id=762556

Closing this now, I have just uploaded gi-gtksource-3.0.12 to hackage wth a fix.

@jaccokrijnen
Copy link
Author

Thanks for the quick fixing, it's building again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants