After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644516 - pdfmod 0.9.1 does not compile with mono 2.10
pdfmod 0.9.1 does not compile with mono 2.10
Status: RESOLVED FIXED
Product: pdfmod
Classification: Other
Component: general
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: pdfmod-maint
pdfmod-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-11 16:12 UTC by Loren Bandiera
Modified: 2011-03-21 04:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes mono 2.10 compilation problem (1.01 KB, patch)
2011-03-17 20:17 UTC, Nuno Araujo (IRC: russo79)
committed Details | Review

Description Loren Bandiera 2011-03-11 16:12:24 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
Comment 1 Antoine Jacoutot 2011-03-12 11:05:52 UTC
I see the exact same issue on OpenBSD as well.
Comment 2 Marius Tolzmann 2011-03-17 17:50:25 UTC
I can confirm this bug when compiling pdfmod-0.9.1 with mono-2.10.1 ..
Comment 3 Nuno Araujo (IRC: russo79) 2011-03-17 20:17:38 UTC
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
Comment 4 Antoine Jacoutot 2011-03-18 07:08:30 UTC
(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!
Comment 5 Loren Bandiera 2011-03-18 11:53:15 UTC
The patch worked for me as well.
Comment 6 Marius Tolzmann 2011-03-18 12:30:20 UTC
same here.. it compiles.. many thanks..
Comment 7 Alexander Kojevnikov 2011-03-21 04:15:41 UTC
Review of attachment 183674 [details] [review]:

Tested and committed, thanks Nuno!
Comment 8 Alexander Kojevnikov 2011-03-21 04:16:47 UTC
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.