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
325 stars 26 forks source link

Running the Hello World project crashes #30

Closed CRKatri closed 3 years ago

CRKatri commented 4 years ago

When I try to run the Hello World app, it crashes with:

Fetching https://github.com/rhx/SwiftGtk.git
Fetching https://github.com/rhx/SwiftAtk.git
Fetching https://github.com/rhx/SwiftGdk.git
Fetching https://github.com/rhx/SwiftGObject.git
Fetching https://github.com/rhx/SwiftGdkPixbuf.git
Fetching https://github.com/rhx/SwiftPangoCairo.git
Fetching https://github.com/rhx/SwiftGLib.git
Fetching https://github.com/rhx/SwiftGIO.git
Fetching https://github.com/rhx/SwiftGModule.git
Fetching https://github.com/rhx/SwiftCairo.git
Fetching https://github.com/rhx/SwiftPango.git
Cloning https://github.com/rhx/SwiftCairo.git
Resolving https://github.com/rhx/SwiftCairo.git at master
Cloning https://github.com/rhx/SwiftGIO.git
Resolving https://github.com/rhx/SwiftGIO.git at master
Cloning https://github.com/rhx/SwiftPango.git
Resolving https://github.com/rhx/SwiftPango.git at master
Cloning https://github.com/rhx/SwiftGObject.git
Resolving https://github.com/rhx/SwiftGObject.git at master
Cloning https://github.com/rhx/SwiftPangoCairo.git
Resolving https://github.com/rhx/SwiftPangoCairo.git at master
Cloning https://github.com/rhx/SwiftGModule.git
Resolving https://github.com/rhx/SwiftGModule.git at master
Cloning https://github.com/rhx/SwiftAtk.git
Resolving https://github.com/rhx/SwiftAtk.git at master
Cloning https://github.com/rhx/SwiftGdk.git
Resolving https://github.com/rhx/SwiftGdk.git at master
Cloning https://github.com/rhx/SwiftGtk.git
Resolving https://github.com/rhx/SwiftGtk.git at master
Cloning https://github.com/rhx/SwiftGLib.git
Resolving https://github.com/rhx/SwiftGLib.git at master
Cloning https://github.com/rhx/SwiftGdkPixbuf.git
Resolving https://github.com/rhx/SwiftGdkPixbuf.git at master
Cloning into 'gir2swift'...
remote: Enumerating objects: 245, done.
remote: Counting objects: 100% (245/245), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 2118 (delta 184), reused 213 (delta 156), pack-reused 1873
Receiving objects: 100% (2118/2118), 900.70 KiB | 2.30 MiB/s, done.
Resolving deltas: 100% (1432/1432), done.
Fetching https://github.com/rhx/SwiftLibXML.git
Cloning https://github.com/rhx/SwiftLibXML.git
Resolving https://github.com/rhx/SwiftLibXML.git at master
[4/4] Linking gir2swift
which: no parallel in (/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Generate Swift Wrapper for SwiftAtk
Generate Swift Wrapper for SwiftCairo
Generate Swift Wrapper for SwiftGdk
Generate Swift Wrapper for SwiftGdkPixbuf
Generate Swift Wrapper for SwiftGIO
Generate Swift Wrapper for SwiftGLib
Generate Swift Wrapper for SwiftGModule
Generate Swift Wrapper for SwiftGObject
Generate Swift Wrapper for SwiftGtk
which: no parallel in (:/home/cameron/Documents/SwiftHelloGtk/.build/checkouts/SwiftGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/checkouts/SwiftGtk/.build/gir2swift/.build/debug:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/*/bin:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug::/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/release:/home/cameron/Documents/SwiftHelloGtk/.build/gir2swift/.build/debug:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/gems/*/gems/jazzy-*/bin/:/usr/local/bin)
Postprocessing Wrapper for Gtk-3.0-AboutDialog-Bin.swift
Postprocessing Wrapper for Gtk-3.0-AboutDialogClass-BinClass.swift
Postprocessing Wrapper for Gtk-3.0-Actionable-Buildable.swift
Postprocessing Wrapper for Gtk-3.0-aliases.swift
Postprocessing Wrapper for Gtk-3.0-BinPrivate-CalendarClass.swift
Postprocessing Wrapper for Gtk-3.0-bitfields.swift
Postprocessing Wrapper for Gtk-3.0-BooleanCellAccessible-Calendar.swift
Postprocessing Wrapper for Gtk-3.0-CalendarPrivate-DialogClass.swift
Postprocessing Wrapper for Gtk-3.0-callbacks.swift
Postprocessing Wrapper for Gtk-3.0-CellAccessible-Dialog.swift
Postprocessing Wrapper for Gtk-3.0-CellAccessibleParent-Editable.swift
Postprocessing Wrapper for Gtk-3.0-constants.swift
Postprocessing Wrapper for Gtk-3.0-DialogPrivate-EditableInterface.swift
Postprocessing Wrapper for Gtk-3.0-DrawingArea-Entry.swift
Postprocessing Wrapper for Gtk-3.0-EntryAccessibleClass-FileChooserButtonClass.swift
Postprocessing Wrapper for Gtk-3.0-EntryAccessible-FileChooserButton.swift
Postprocessing Wrapper for Gtk-3.0-enumerations.swift
Postprocessing Wrapper for Gtk-3.0-FileChooserButtonPrivate-GLAreaClass.swift
Postprocessing Wrapper for Gtk-3.0-FileChooserDialog-GLArea.swift
Postprocessing Wrapper for Gtk-3.0-FileChooser-Orientable.swift
Postprocessing Wrapper for Gtk-3.0-functions.swift
Postprocessing Wrapper for Gtk-3.0-GestureClass-HBoxClass.swift
Postprocessing Wrapper for Gtk-3.0-Gesture-HBox.swift
Postprocessing Wrapper for Gtk-3.0-HButtonBoxClass-IMContextClass.swift
Postprocessing Wrapper for Gtk-3.0-HButtonBox-IMContext.swift
Postprocessing Wrapper for Gtk-3.0-IMContextInfo-LabelAccessibleClass.swift
Postprocessing Wrapper for Gtk-3.0-IMContextSimple-Label.swift
Postprocessing Wrapper for Gtk-3.0-LabelAccessible-Menu.swift
Postprocessing Wrapper for Gtk-3.0-LabelAccessiblePrivate-MenuAccessibleClass.swift
Postprocessing Wrapper for Gtk-3.0-MenuAccessible-NativeDialog.swift
Postprocessing Wrapper for Gtk-3.0-MenuAccessiblePrivate-NativeDialogClass.swift
Postprocessing Wrapper for Gtk-3.0-_MountOperationHandlerIface-_MountOperationHandlerSkeletonPrivate.swift
Postprocessing Wrapper for Gtk-3.0-NotebookAccessibleClass-OffscreenWindowClass.swift
Postprocessing Wrapper for Gtk-3.0-Notebook-OffscreenWindow.swift
Postprocessing Wrapper for Gtk-3.0-OrientableIface-PadActionEntry.swift
Postprocessing Wrapper for Gtk-3.0-Overlay-PadController.swift
Postprocessing Wrapper for Gtk-3.0-PadControllerClass-RadioActionClass.swift
Postprocessing Wrapper for Gtk-3.0-PageSetup-RadioAction.swift
Postprocessing Wrapper for Gtk-3.0-PrintOperationPreview-RecentChooser.swift
Postprocessing Wrapper for Gtk-3.0-RadioActionEntry-ScaleAccessibleClass.swift
Postprocessing Wrapper for Gtk-3.0-RadioButton-Scale.swift
Postprocessing Wrapper for Gtk-3.0-ScaleAccessiblePrivate-TableChild.swift
Postprocessing Wrapper for Gtk-3.0-ScaleAccessible-Table.swift
Postprocessing Wrapper for Gtk-3.0-Scrollable-ToolShell.swift
Postprocessing Wrapper for Gtk-3.0.swift
Postprocessing Wrapper for Gtk-3.0-TableClass-UIManagerClass.swift
Postprocessing Wrapper for Gtk-3.0-TearoffMenuItem-UIManager.swift
Postprocessing Wrapper for Gtk-3.0-TreeDragDest-TreeSortable.swift
Postprocessing Wrapper for Gtk-3.0-UIManagerPrivate-VBoxClass.swift
Postprocessing Wrapper for Gtk-3.0-unions.swift
Postprocessing Wrapper for Gtk-3.0-VBox-Widget.swift
Postprocessing Wrapper for Gtk-3.0-VButtonBoxClass-WidgetAccessibleClass.swift
Postprocessing Wrapper for Gtk-3.0-WidgetAccessiblePrivate-_MountOperationHandler.swift
Postprocessing Wrapper for Gtk-3.0-WidgetAccessible-WindowGroup.swift
Generate Swift Wrapper for SwiftPangoCairo
Generate Swift Wrapper for SwiftPango
'CGLib' glib-2.0 gio-unix-2.0.pc: warning: couldn't find pc file
./build.sh: line 11: 183565 Segmentation fault      (core dumped) swift build $CCFLAGS $LINKFLAGS "$@"

This is on Arch with Swift 5.2.4 (swift-5.2.4-RELEASE)

rhx commented 4 years ago

I've never tried this on Arch Linux, but this seems to be an issue with your Swift compiler (or the Swift Package Manager): it should never crash (segfault), even if it can't find the right pkg-config (pc) files. Which version of Arch are you using? Did you build the compiler yourself or did you download it as a binary?

Dadoum commented 4 years ago

I get the same error. Manjaro Linux 20.0.3 (kernel 5.6.19-2-MANJARO). Downloaded with the AUR package swift-bin (= CentOS build with an elf patch to change names of libraries)

Dadoum commented 4 years ago

Downgrading to 5.1.5 makes swift working (no segfault) but it still does not compile. 5.3 crashes too.

rhx commented 4 years ago

Swift 5.3 beta versions don't work at the moment (this requires putting in a type system into gir2swift). Can you post your output when trying to compile it with 5.1.5, please?

Dadoum commented 4 years ago
Updating https://github.com/rhx/SwiftAtk.git
Updating https://github.com/rhx/SwiftGLib.git
Updating https://github.com/rhx/SwiftGModule.git
Updating https://github.com/rhx/SwiftGdkPixbuf.git
Updating https://github.com/rhx/SwiftGIO.git
Updating https://github.com/rhx/SwiftGObject.git
Updating https://github.com/rhx/SwiftPangoCairo.git
Updating https://github.com/rhx/SwiftCairo.git
Updating https://github.com/rhx/SwiftGtk.git
Updating https://github.com/rhx/SwiftGdk.git
Updating https://github.com/rhx/SwiftPango.git
Completed resolution in 9.99s
Cloning https://github.com/rhx/SwiftGLib.git
Resolving https://github.com/rhx/SwiftGLib.git at master
Cloning https://github.com/rhx/SwiftGObject.git
Resolving https://github.com/rhx/SwiftGObject.git at master
Cloning https://github.com/rhx/SwiftGModule.git
Resolving https://github.com/rhx/SwiftGModule.git at master
Cloning https://github.com/rhx/SwiftPangoCairo.git
Resolving https://github.com/rhx/SwiftPangoCairo.git at master
Cloning https://github.com/rhx/SwiftPango.git
Resolving https://github.com/rhx/SwiftPango.git at master
Cloning https://github.com/rhx/SwiftAtk.git
Resolving https://github.com/rhx/SwiftAtk.git at master
Cloning https://github.com/rhx/SwiftGdkPixbuf.git
Resolving https://github.com/rhx/SwiftGdkPixbuf.git at master
Cloning https://github.com/rhx/SwiftCairo.git
Resolving https://github.com/rhx/SwiftCairo.git at master
Cloning https://github.com/rhx/SwiftGdk.git
Resolving https://github.com/rhx/SwiftGdk.git at master
Cloning https://github.com/rhx/SwiftGIO.git
Resolving https://github.com/rhx/SwiftGIO.git at master
Cloning https://github.com/rhx/SwiftGtk.git
Resolving https://github.com/rhx/SwiftGtk.git at master
'CCairo' cairo glib-2.0 gio-unix-2.0.pc: warning: couldn't find pc file
'CGLib' glib-2.0 gio-unix-2.0.pc: warning: couldn't find pc file
'CGdkPixbuf' cairo glib-2.0 gio-unix-2.0.pc: warning: couldn't find pc file
'CGdk' gdk-3.0 pangocairo pangoft2 pango gio-unix-2.0 glib-2..pc: warning: couldn't find pc file
'CAtk' atk glib-2.0 gio-unix-2.0.pc: warning: couldn't find pc file
'CGtk' gtk-3.0 gdk-3.0 pangocairo pangoft2 pango gio-unix-2.0 glib-2.0.pc: warning: couldn't find pc file

: unknown attribute 'swift_infer_import_as_member' [-Wignored-attributes]

                       ^
: unknown attribute 'swift_infer_import_as_member' [-Wignored-attributes]
module CGLib [system] [swift_infer_import_as_member] {
                       ^
 warning: incompatible integer to pointer conversion returning 'GType' (aka 'unsigned long') from a function with result type 'GTypeClass *' (aka 'struct _GTypeClass *') [-Wint-conversion]
    return G_TYPE_FROM_INSTANCE(gobject);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 note: expanded from macro 'G_TYPE_FROM_INSTANCE'
#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
2 warnings generated.
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:13:18: error: use of undeclared type 'LogLevelFlags'
public extension LogLevelFlags {
                 ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:15:24: error: use of unresolved identifier 'LogLevelFlags'
    static let debug = LogLevelFlags.levelDebug
                       ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:17:23: error: use of unresolved identifier 'LogLevelFlags'
    static let info = LogLevelFlags.levelInfo
                      ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:19:26: error: use of unresolved identifier 'LogLevelFlags'
    static let message = LogLevelFlags.levelMessage
                         ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:21:26: error: use of unresolved identifier 'LogLevelFlags'
    static let warning = LogLevelFlags.levelWarning
                         ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:26:27: error: use of unresolved identifier 'LogLevelFlags'
    static let critical = LogLevelFlags.levelCritical
                          ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:29:24: error: use of unresolved identifier 'LogLevelFlags'
    static let error = LogLevelFlags.levelError
                       ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:78:51: error: use of undeclared type 'LogLevelFlags'
public func g_log(_ message: String, level flags: LogLevelFlags = .debug) {
                                                  ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:94:61: error: use of undeclared type 'LogLevelFlags'
public func g_log(messagePtr: UnsafePointer<CChar>?, level: LogLevelFlags = .debug) {
                                                            ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:105:61: error: use of undeclared type 'LogLevelFlags'
public func g_log(domain: String, _ message: String, level: LogLevelFlags = .debug) {
                                                            ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:96:77: error: use of unresolved identifier 'cast'
    g_logv(nil, level.value, msg, CVaListPointer(_fromUnsafeMutablePointer: cast(msg)))
                                                                            ^~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:125:43: error: reference to member 'warning' cannot be resolved without a contextual type
        g_log(domain: d, message, level: .warning)
                                         ~^~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/GLib.swift:127:32: error: reference to member 'warning' cannot be resolved without a contextual type
        g_log(message, level: .warning)
                              ~^~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Time.swift:23:47: error: use of unresolved identifier 'SourceFunc'
    let callback = unsafeBitCast(handler, to: SourceFunc.self)
                                              ^~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Time.swift:24:14: error: use of unresolved identifier 'timeoutAddFull'
    let rv = timeoutAddFull(priority: p, interval: interval, function: callback, data: opaqueHolder) {
             ^~~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Mutex.swift:11:18: error: use of undeclared type 'Mutex'
public extension Mutex {
                 ^~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Mutex.swift:16:9: error: use of unresolved identifier 'init_'
        init_()
        ^~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:11:18: error: use of undeclared type 'MainContextRef'
public extension MainContextRef {
                 ^~~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:18:37: error: use of undeclared type 'MainContextRef'
    static func defaultContext() -> MainContextRef {
                                    ^~~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:25:18: error: use of undeclared type 'MainContext'
public extension MainContext {
                 ^~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:32:37: error: use of undeclared type 'MainContext'
    static func defaultContext() -> MainContext {
                                    ^~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:40:18: error: use of undeclared type 'MainLoopRef'
public extension MainLoopRef {
                 ^~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:50:18: error: use of undeclared type 'MainLoop'
public extension MainLoop {
                 ^~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:33:23: error: use of unresolved identifier 'MainContext'
        let context = MainContext(g_main_context_ref(g_main_context_default())!)
                      ^~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/MainLoop.swift:44:9: error: use of unresolved identifier 'ptr'
        ptr = UnsafeMutableRawPointer(g_main_loop_new(g_main_context_default()!, 0)!)
        ^~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:18:18: error: use of undeclared type 'StringRef'
public extension StringRef {
                 ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:28:21: error: initializer does not override a designated initializer from its superclass
    override public init(_ op: UnsafeMutablePointer<GString>) {
    ~~~~~~~~        ^
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:26:27: error: use of undeclared type 'StringType'
public class StringClass: StringType {
                          ^~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:47:23: error: use of undeclared type 'StringRef'
    var g_string_ref: StringRef { return StringRef(self) }
                      ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:21:25: error: use of unresolved identifier 'ptr'
    init(_ s: String) { ptr = UnsafeMutableRawPointer(s.gstring_ptr) }
                        ^~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:29:9: error: 'super' members cannot be referenced in a root class
        super.init(UnsafeMutablePointer(g_string_new(op.pointee.str)))
        ^
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:34:9: error: 'super' members cannot be referenced in a root class
        super.init(s.gstring_ptr)
        ^
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/String.swift:39:23: error: use of unresolved identifier 'gstring_ptr'
        g_string_free(gstring_ptr, 1)
                      ^~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:17:11: error: use of undeclared type 'ErrorTypeProtocol'
extension ErrorTypeProtocol {
          ^~~~~~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:29:18: error: use of undeclared type 'ErrorType'
public extension ErrorType {
                 ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:45:11: error: use of undeclared type 'ErrorType'
extension ErrorType: CustomStringConvertible {}
          ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:46:11: error: use of undeclared type 'ErrorType'
extension ErrorType: CustomDebugStringConvertible {}
          ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:47:11: error: use of undeclared type 'ErrorRef'
extension ErrorRef: CustomStringConvertible {}
          ^~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:48:11: error: use of undeclared type 'ErrorRef'
extension ErrorRef: CustomDebugStringConvertible {}
          ^~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:20:32: error: use of unresolved identifier 'error_ptr'
        return String(cString: error_ptr.pointee.message)
                               ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:25:26: error: use of unresolved identifier 'quarkToString'
        return String("\(quarkToString(quark: error_ptr.pointee.domain) ?? "-") error \(error_ptr.pointee.code): \(String(cString: error_ptr.pointee.message) )")
                         ^~~~~~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:25:47: error: use of unresolved identifier 'error_ptr'
        return String("\(quarkToString(quark: error_ptr.pointee.domain) ?? "-") error \(error_ptr.pointee.code): \(String(cString: error_ptr.pointee.message) )")
                                              ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:25:89: error: use of unresolved identifier 'error_ptr'
        return String("\(quarkToString(quark: error_ptr.pointee.domain) ?? "-") error \(error_ptr.pointee.code): \(String(cString: error_ptr.pointee.message) )")
                                                                                        ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:25:132: error: use of unresolved identifier 'error_ptr'
        return String("\(quarkToString(quark: error_ptr.pointee.domain) ?? "-") error \(error_ptr.pointee.code): \(String(cString: error_ptr.pointee.message) )")
                                                                                                                                   ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:40:15: error: use of unresolved identifier 'cast'
        get { cast(error_ptr.pointee.code) }
              ^~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:40:20: error: use of unresolved identifier 'error_ptr'
        get { cast(error_ptr.pointee.code) }
                   ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:41:15: error: use of unresolved identifier 'error_ptr'
        set { error_ptr.pointee.code = cast(newValue) }
              ^~~~~~~~~
/home/dadoum/Téléchargements/SwiftHelloGtk/.build/checkouts/SwiftGLib/Sources/GLib/Error.swift:41:40: error: use of unresolved identifier 'cast'
        set { error_ptr.pointee.code = cast(newValue) }
                                       ^~~~
Dadoum commented 4 years ago

Issue related to SPM pkgConfig; the JIRA ticket can be reviewed here

rhx commented 4 years ago

The current version is working fine with Swift 5.2.5 on Ubuntu. Can you try

./distclean.sh
./build.sh

and let me know if this works? (Should also work with Swift 5.3 now.)

Dadoum commented 3 years ago

Got it working with on my fork of swift-package-manager ! I will publish it soon (it was caused by an undefined behaviour in SPM, pkgConfig: with pkg-config files in package is not defined, and is recognized as a single file on arch linux, and when swift tries to get its path, it fails since there is no file with that name)

Dadoum commented 3 years ago

Update: the bug is fixed on upstream !

rhx commented 3 years ago

Thanks!