Skip to content

Parse error building gi-glib #82

@clumens

Description

@clumens

I am trying to add a new set of bindings for libostree. There's not a lot in the way of documentation on how to add new bindings, so I am just copying what the libsecret commit did and I am taking the build process from .travis.yaml. When I get to the point where I'd run cabal install -j3 ./OSTree, it fails when trying to build gi-glib, which is a prerequisite. The error is:

Resolving dependencies...
Configuring gi-glib-2.0.11...
Failed to install gi-glib-2.0.11
Build log ( /home/clumens/.cabal/logs/gi-glib-2.0.11.log ):
cabal: Entering directory '/tmp/cabal-tmp-9435/gi-glib-2.0.11'
[1 of 1] Compiling Main             ( /tmp/cabal-tmp-9435/gi-glib-2.0.11/dist/setup/setup.hs, /tmp/cabal-tmp-9435/gi-glib-2.0.11/dist/setup/Main.o )
Linking /tmp/cabal-tmp-9435/gi-glib-2.0.11/dist/setup/setup ...
Error when parsing "namespace [GLib] / alias [MutexLocker]": Unexpected "none"
type.
Element
{ elementName =
Name
{ nameLocalName = "alias"
, nameNamespace = Just "http://www.gtk.org/introspection/core/1.0"
, namePrefix = Nothing
}
, elementAttributes =
fromList
[ ( Name
{ nameLocalName = "name"
, nameNamespace = Nothing
, namePrefix = Nothing
}
, "MutexLocker"
)
, ( Name
{ nameLocalName = "type"
, nameNamespace = Just "http://www.gtk.org/introspection/c/1.0"
, namePrefix = Just "c"
}
, "GMutexLocker"
)
]
, elementNodes =
[ NodeContent "\n "
, NodeElement
Element
{ elementName =
Name
{ nameLocalName = "doc"
, nameNamespace = Just "http://www.gtk.org/introspection/core/1.0"
, namePrefix = Nothing
}
, elementAttributes =
fromList
[ ( Name
{ nameLocalName = "space"
, nameNamespace = Just "http://www.w3.org/XML/1998/namespace"
, namePrefix = Just "xml"
}
, "preserve"
)
]
, elementNodes =
[ NodeContent "Opaque type. See g_mutex_locker_new() for details."
]
}
, NodeContent "\n "
, NodeElement
Element
{ elementName =
Name
{ nameLocalName = "type"
, nameNamespace = Just "http://www.gtk.org/introspection/core/1.0"
, namePrefix = Nothing
}
, elementAttributes =
fromList
[ ( Name
{ nameLocalName = "name"
, nameNamespace = Nothing
, namePrefix = Nothing
}
, "none"
)
, ( Name
{ nameLocalName = "type"
, nameNamespace = Just "http://www.gtk.org/introspection/c/1.0"
, namePrefix = Just "c"
}
, "void"
)
]
, elementNodes = []
}
, NodeContent "\n "
]
}
CallStack (from HasCallStack):
error, called at lib/Data/GI/GIR/Alias.hs:21:37 in
haskell-gi-0.20-8glIyDKIqmqEit1YSyju8g:Data.GI.GIR.Alias
cabal: Leaving directory '/tmp/cabal-tmp-9435/gi-glib-2.0.11'
cabal: Error: some packages failed to install:
gi-gio-2.0.11 depends on gi-glib-2.0.11 which failed to install.
gi-glib-2.0.11 failed during the configure step. The exception was:
ExitFailure 1
gi-gobject-2.0.11 depends on gi-glib-2.0.11 which failed to install.
gi-ostree-0.0.1 depends on gi-glib-2.0.11 which failed to install.

Looking at the gir file for glib, I think it's crapping out on this block:

    <alias name="MutexLocker" c:type="GMutexLocker">
      <doc xml:space="preserve">Opaque type. See g_mutex_locker_new() for details.</doc>
      <type name="none" c:type="void"/>
    </alias>

For the record, I am on Fedora. I have gobject-introspection-1.52.0, glib2-2.52.0, and ghc-8.0.2 installed. I am trying to use the latest from haskell-gi git to do this build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions