mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

Fix build failure with mcs caused by C#8 changes in mcs #263

Closed radical closed 5 years ago

radical commented 5 years ago

Recent addition of C#8 features to mcs possibly broke this:

mcs -out:WidgetViewer.exe -r:../../glib/glib-sharp.dll -r:../../pango/pango-sharp.dll -r:../../atk/atk-sharp.dll -r:../../gdk/gdk-sharp.dll -r:../../gtk/gtk-sharp.dll ./TestCheckButton.cs ./TestColorSelection.cs ./TestRadioButton.cs ./TestRange.cs ./TestStatusbar.cs ./TestDialog.cs ./TestFlipping.cs ./TestSizeGroup.cs ./TestCombo.cs ./TestComboBox.cs ./WidgetViewer.cs
./TestCombo.cs(17,14): warning CS0612: `Gtk.Combo' is obsolete
./TestRange.cs(35,6): error CS0104: `Range' is an ambiguous reference between `System.Range' and `Gtk.Range'
@/external/bockbuild/stage/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
@/external/bockbuild/builds/gtk-sharp-None/sample/test/../../gtk/gtk-sharp.dll (Location of the symbol related to previous error)
./TestRange.cs(35,13): error CS0030: Cannot convert type `Gtk.HScale' to `System.Range'
./TestRange.cs(42,6): error CS0104: `Range' is an ambiguous reference between `System.Range' and `Gtk.Range'
@/external/bockbuild/stage/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
@/external/bockbuild/builds/gtk-sharp-None/sample/test/../../gtk/gtk-sharp.dll (Location of the symbol related to previous error)
./TestRange.cs(42,13): error CS0030: Cannot convert type `Gtk.HScrollbar' to `System.Range'
./TestRange.cs(62,6): error CS0104: `Range' is an ambiguous reference between `System.Range' and `Gtk.Range'
@/external/bockbuild/stage/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
@/external/bockbuild/builds/gtk-sharp-None/sample/test/../../gtk/gtk-sharp.dll (Location of the symbol related to previous error)
./TestRange.cs(62,13): error CS0030: Cannot convert type `Gtk.VScale' to `System.Range'

This is because the compiler is resolving Range in the test as System.Range instead of Gtk.Range, so we disambiguate it.

/cc @marek-safar

radical commented 5 years ago

The build failures I see are:

23:41:05 + '[' -e ./bootstrap-2.12 ']'
23:41:05 + ./autogen.sh
23:41:05 
23:41:05 **Error**: You must have `libtool' installed to compile Gtk#.

@Therzok Are the CI builds expected to build?

Therzok commented 5 years ago

Should work cc @directhex

Therzok commented 5 years ago

Feel free to merge