rhx/SwiftHelloGtk

Cannot build Swift wrappers on Arch Linux

Opened this issue · 0 comments

When I run ./run-gir2swift.sh -noUpdate I get the following output:

Girs located at /usr/share/gir-1.0
Building gir2swift
Generating Swift Wrapper for Cairo ... 
Generating Swift Wrapper for Gdk ... 
Generating Swift Wrapper for GdkPixbuf ... 
Generating Swift Wrapper for GIO ... 
Generating Swift Wrapper for GLib ... 
Generating Swift Wrapper for GModule ... 
Generating Swift Wrapper for GLibObject ... 
Generating Swift Wrapper for Gtk ... Warning: duplicate type 'check_version' for //gir:function ignored!
Warning: duplicate type 'test_init' for //gir:function ignored!
/usr/bin/bash: line 1: Sources/Gtk/*-*.swift: ambiguous redirect
mv: target 'Sources/Gtk/Gtk-4.0-WidgetPaintable-WindowHandle.swift' is not a directory
Generating Swift Wrapper for Pango ... 
Generating Swift Wrapper for PangoCairo ... 

My Swift version (installed from here):

Swift version 5.3.1 (swift-5.3.1-RELEASE)
Target: x86_64-unknown-linux-gnu

I can't seem to find the source of the ambiguous redirect error.
Note that I've also modified the gir2swift-manifest.sh scripts in the in checkouts/Swift*/ dirs to try and build the wrappers. It seems like most of the wrappers started to work fine after I:

  • Installed parallel package
  • Wrapped the ${src} and "Sources/*-*.swift" variables in double quotations

Without wrapping the variables, I get this output instead:

Fetching https://github.com/rhx/gir2swift.git
Fetching https://github.com/rhx/SwiftGtk.git
Fetching https://github.com/rhx/SwiftLibXML.git
Fetching https://github.com/rhx/SwiftPangoCairo.git
Fetching https://github.com/rhx/SwiftGdk.git
Fetching https://github.com/rhx/SwiftCairo.git
Fetching https://github.com/rhx/SwiftPango.git
Fetching https://github.com/rhx/SwiftGdkPixbuf.git
Fetching https://github.com/rhx/SwiftGObject.git
Fetching https://github.com/rhx/SwiftGIO.git
Fetching https://github.com/rhx/SwiftGModule.git
Fetching https://github.com/rhx/SwiftGLib.git
Cloning https://github.com/rhx/SwiftCairo.git
Resolving https://github.com/rhx/SwiftCairo.git at main
Cloning https://github.com/rhx/SwiftLibXML.git
Resolving https://github.com/rhx/SwiftLibXML.git at main
Cloning https://github.com/rhx/SwiftPango.git
Resolving https://github.com/rhx/SwiftPango.git at main
Cloning https://github.com/rhx/SwiftGtk.git
Resolving https://github.com/rhx/SwiftGtk.git at gtk4
Cloning https://github.com/rhx/SwiftGIO.git
Resolving https://github.com/rhx/SwiftGIO.git at main
Cloning https://github.com/rhx/SwiftGdkPixbuf.git
Resolving https://github.com/rhx/SwiftGdkPixbuf.git at main
Cloning https://github.com/rhx/SwiftGLib.git
Resolving https://github.com/rhx/SwiftGLib.git at main
Cloning https://github.com/rhx/SwiftGObject.git
Resolving https://github.com/rhx/SwiftGObject.git at main
Cloning https://github.com/rhx/SwiftGModule.git
Resolving https://github.com/rhx/SwiftGModule.git at main
Cloning https://github.com/rhx/gir2swift.git
Resolving https://github.com/rhx/gir2swift.git at main
Cloning https://github.com/rhx/SwiftGdk.git
Resolving https://github.com/rhx/SwiftGdk.git at gtk4
Cloning https://github.com/rhx/SwiftPangoCairo.git
Resolving https://github.com/rhx/SwiftPangoCairo.git at main
Girs located at /usr/share/gir-1.0
Building gir2swift
Generating Swift Wrapper for Cairo ... 
Generating Swift Wrapper for Gdk ... 
Generating Swift Wrapper for GdkPixbuf ... 
Generating Swift Wrapper for GIO ... 
Generating Swift Wrapper for GLib ... 
Generating Swift Wrapper for GModule ... 
Generating Swift Wrapper for GLibObject ... 
Generating Swift Wrapper for Gtk ... Warning: duplicate type 'check_version' for //gir:function ignored!
Warning: duplicate type 'test_init' for //gir:function ignored!
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression
sed: file Gtk-4.0.sed line 4: Invalid preceding regular expression

Generating Swift Wrapper for Pango ... 
Generating Swift Wrapper for PangoCairo ...