rhx / SwiftGtk

A Swift wrapper around gtk-3.x and gtk-4.x that is largely auto-generated from gobject-introspection
https://rhx.github.io/SwiftGtk/
BSD 2-Clause "Simplified" License
317 stars 26 forks source link

Failed compilation on a Fedora 31 system #21

Closed dov closed 4 years ago

dov commented 4 years ago

I tried building this on a Fedora 31 system and it failed with the following errors:

/space1/dov/tmp/SwiftGtk/.build/checkouts/SwiftGIO/Sources/GIO/Gio-2.0-DBusArgInfo-EmblemClass.swift:5927:36: error: use of undeclared type 'GDesktopAppInfoLookupIface'
    var _ptr: UnsafeMutablePointer<GDesktopAppInfoLookupIface> { get }
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
/space1/dov/tmp/SwiftGtk/.build/checkouts/SwiftGIO/Sources/GIO/Gio-2.0-DBusArgInfo-EmblemClass.swift:5944:36: error: use of undeclared type 'GDesktopAppInfoLookupIface'
    init(_ p: UnsafeMutablePointer<GDesktopAppInfoLookupIface>) {
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
/space1/dov/tmp/SwiftGtk/.build/checkouts/SwiftGIO/Sources/GIO/Gio-2.0-DBusArgInfo-EmblemClass.swift:5999:44: error: use of undeclared type 'GDesktopAppInfoLookupIface'
    public init(_ op: UnsafeMutablePointer<GDesktopAppInfoLookupIface>) {

:

But since the symbol GDesktopAppInfoLookupIface does not exist in the repo, I guess it is a gir problem. But perhaps someone has an idea of how to workaround this?

rhx commented 4 years ago

This was an issue with SwiftGIO needing to explicitly include gio/gdesktopappinfo.h on Linux, thanks for spotting. This should work now if you do a

./distclean.sh
git pull
./build.sh
dov commented 4 years ago

Thanks! But there are no new commits, did you forget to push your fix?

rhx commented 4 years ago

The commit (fix) was in SwiftGIO, not SwiftGtk. Hence you need to run ./distclean.sh, so it'll download the latest SwiftGIO version.

dov commented 4 years ago

👍 Got it! And got SwiftHelloGtk working! Btw, the claim that building SwiftGtk takes a long time to build was not an issue on my system. I think it built in less than 5 minutes.