GNOME Bugzilla – Bug 644516
pdfmod 0.9.1 does not compile with mono 2.10
Last modified: 2011-03-21 04:16:47 UTC
I get the following compiler errors: make[1]: Entering directory `/home/lorenb/pdfmod-0.9.1/src' mkdir -p '../bin' cp 'pdfmod' '../bin/pdfmod' chmod +x '../bin/pdfmod' mkdir -p ../bin cp /usr/lib64/hyena/Hyena.dll /usr/lib64/hyena/Hyena.Gui.dll ../bin cp /usr/lib64/hyena/Hyena.dll.config /usr/lib64/hyena/Hyena.dll.mdb /usr/lib64/hyena/Hyena.Gui.dll.config /usr/lib64/hyena/Hyena.Gui.dll.mdb ../bin /usr/bin/gmcs -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG" -out:../bin/PdfMod.exe -target:exe './PdfMod/Core/AssemblyInfo.cs' './PdfMod/Core/Client.cs' './PdfMod/Core/Configuration.cs' './PdfMod/Core/Defines.cs' './PdfMod/Gui/Actions.cs' './PdfMod/Gui/BookmarkView.cs' './PdfMod/Gui/CairoCell.cs' './PdfMod/Gui/Client.cs' './PdfMod/Gui/DocumentIconView.cs' './PdfMod/Gui/MetadataEditorBox.cs' './PdfMod/Gui/PageCell.cs' './PdfMod/Gui/PageListStore.cs' './PdfMod/Gui/SelectMatchingBox.cs' './PdfMod/Gui/ZoomSlider.cs' './PdfMod/Main.cs' './PdfMod/Pdf/Actions/BaseAction.cs' './PdfMod/Pdf/Actions/BasePageAction.cs' './PdfMod/Pdf/Actions/ExportImagesAction.cs' './PdfMod/Pdf/Actions/MoveAction.cs' './PdfMod/Pdf/Actions/RemoveAction.cs' './PdfMod/Pdf/Actions/RotateAction.cs' './PdfMod/Pdf/Document.cs' './PdfMod/Pdf/Page.cs' './PdfMod/Pdf/PageLabels.cs' './PdfMod/Pdf/PageThumbnail.cs' '-resource:./Resources/UIManager.xml' -r:Mono.Cairo -r:Mono.Posix -pkg:gconf-sharp-2.0 -pkg:glib-sharp-2.0 -pkg:gtk-sharp-2.0 -pkg:hyena -pkg:hyena.gui -r:System -r:System.Core -r:../bin/PdfSharp.dll -r:../bin/PdfSharp.dll -r:../bin/poppler-sharp.dll ./PdfMod/Gui/DocumentIconView.cs(322,53): error CS0039: Cannot convert type `byte[]' to `Hyena.Gui.DragDropList<PdfMod.Pdf.Page>' via a built-in conversion ./PdfMod/Gui/DocumentIconView.cs(322,17): error CS0825: The contextual keyword `var' may only appear within a local variable declaration ./PdfMod/Gui/DocumentIconView.cs(323,29): error CS0841: A local variable `pages' cannot be used before it is declared ./PdfMod/Gui/DocumentIconView.cs(324,56): error CS0841: A local variable `pages' cannot be used before it is declared ./PdfMod/Gui/DocumentIconView.cs(324,30): error CS1502: The best overloaded method match for `PdfMod.Pdf.Actions.MoveAction.MoveAction(PdfMod.Pdf.Document, System.Collections.Generic.IEnumerable<PdfMod.Pdf.Page>, int)' has some invalid arguments ./PdfMod/Pdf/Actions/MoveAction.cs(20,16): (Location of the symbol related to previous error) ./PdfMod/Gui/DocumentIconView.cs(324,30): error CS1503: Argument `#2' cannot convert `object' expression to type `System.Collections.Generic.IEnumerable<PdfMod.Pdf.Page>' Compilation failed: 6 error(s), 0 warnings make[1]: *** [../bin/PdfMod.exe] Error 1 make[1]: Leaving directory `/home/lorenb/pdfmod-0.9.1/src' make: *** [all-recursive] Error 1
I see the exact same issue on OpenBSD as well.
I can confirm this bug when compiling pdfmod-0.9.1 with mono-2.10.1 ..
Created attachment 183674 [details] [review] Fixes mono 2.10 compilation problem The attached patch forces the use of the overloaded implicit operator of Hyena.Gui.DragDropList to convert the Gtk.SelectionData to a Hyena.Gui.DragDropList<Page>. Tested locally with mono 2.10.1
(In reply to comment #3) > Created an attachment (id=183674) [details] [review] > Fixes mono 2.10 compilation problem > > The attached patch forces the use of the overloaded implicit operator of > Hyena.Gui.DragDropList to convert the Gtk.SelectionData to a > Hyena.Gui.DragDropList<Page>. > Tested locally with mono 2.10.1 This does the trick for me with mono-2.10.1, pdfmod-0.9.1 and hyena-0.5 on OpenBSD. Thanks!
The patch worked for me as well.
same here.. it compiles.. many thanks..
Review of attachment 183674 [details] [review]: Tested and committed, thanks Nuno!
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.