Build problem

Bug #609871 reported by Elvanör
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Basenji
Invalid
Undecided
Unassigned

Bug Description

I get the following error while trying to build on Gentoo:

gmcs -noconfig -codepage:utf8 -warn:3 -optimize+ -out:bin/Release/Basenji.exe -target:winexe './src/Gui/About.cs' './src/Gui/DBProperties.cs' './src/Gui/DriveSelection.cs' './src/Gui/Events.cs' './src/Gui/ItemSearch.cs' './src/Gui/MainWindow.cs' './src/Gui/Preferences.cs' './src/Gui/VolumeProperties.cs' './src/Gui/VolumeScanner.cs' './src/Gui/Base/BinBase.cs' './src/Gui/Base/DialogBase.cs' './src/Gui/Base/ViewBase.cs' './src/Gui/Base/WindowBase.cs' './src/Gui/Widgets/DateChooser.cs' './src/Gui/Widgets/FSVolumeEdit.cs' './src/Gui/Widgets/ItemInfo.cs' './src/Gui/Widgets/ItemView.cs' './src/Gui/Widgets/Led.cs' './src/Gui/Widgets/SearchResultView.cs' './src/Gui/Widgets/VolumeEdit.cs' './src/Gui/Widgets/VolumeView.cs' './src/Icons/CustomIconTheme.cs' './src/Icons/Icon.cs' './src/Icons/IconCache.cs' './src/Icons/IconUtils.cs' './src/Icons/ItemIcons.cs' './src/Icons/MimeIconCache.cs' './src/Icons/NameInCustomIconThemeAttribute.cs' './src/App.cs' './src/AssemblyInfo.cs' './src/PathUtil.cs' './src/FileDialog.cs' './src/Main.cs' './src/MsgDialog.cs' './src/Settings.cs' './src/Util.cs' './src/S.cs' './src/Gui/Widgets/CategoryView.cs' './src/Gui/Widgets/PageNavigation.cs' './src/Gui/Widgets/VolumeEditEvents.cs' './src/Gui/Widgets/PageNavigationEvents.cs' './src/Gui/Widgets/IconEntry.cs' './src/Gui/Widgets/SearchEntry.cs' './src/Gui/Widgets/ItemPreview.cs' './src/Gui/Import.cs' './src/Gui/Widgets/AudioCdVolumeEdit.cs' './src/Icons/CustomIconThemeMimeMapping.cs' './src/MimeCategoryMapping.cs' '-resource:./images/LED_Off.png,Basenji.images.LED_Off.png' '-resource:./images/LED_On.png,Basenji.images.LED_On.png' '-resource:./po/de.resources,Basenji.po.de.resources' '-resource:./po/he.resources,Basenji.po.he.resources' '-resource:./po/da.resources,Basenji.po.da.resources' '-resource:./images/search.png,Basenji.images.search.png' '-resource:./po/es.resources,Basenji.po.es.resources' '-resource:./po/fr.resources,Basenji.po.fr.resources' '-resource:./po/ru.resources,Basenji.po.ru.resources' -r:System -pkg:gtk-sharp-2.0 -pkg:glib-sharp-2.0 -pkg:mono-cairo -r:System.Core -r:../Platform/bin/Release/Platform.dll -r:../VolumeDB/bin/Release/VolumeDB.dll
./src/Gui/Widgets/VolumeEdit.cs(89,29): warning CS0108: `Basenji.Gui.Widgets.VolumeEdit.Sensitive' hides inherited member `Gtk.Widget.Sensitive'. Use the new keyword if hiding was intended
/usr/lib/mono/gac/gtk-sharp/2.12.0.0__35e10195dab3c99f/gtk-sharp.dll (Location of the symbol related to previous warning)
./src/Gui/Widgets/Led.cs(42,29): warning CS0108: `Basenji.Gui.Widgets.Led.State' hides inherited member `Gtk.Widget.State'. Use the new keyword if hiding was intended
/usr/lib/mono/gac/gtk-sharp/2.12.0.0__35e10195dab3c99f/gtk-sharp.dll (Location of the symbol related to previous warning)
./src/Gui/MainWindow.cs(433,37): warning CS0618: `Gtk.Timeout' is obsolete: `Replaced by GLib.Timeout'
./src/Gui/MainWindow.cs(433,37): warning CS0618: `Gtk.Timeout.Add(uint, Gtk.Function)' is obsolete: `Replaced by GLib.Timeout.Add'
./src/Gui/Widgets/VolumeEdit.cs(80,41): warning CS0162: Unreachable code detected
./src/Gui/Widgets/VolumeEdit.cs(83,41): warning CS0162: Unreachable code detected
./src/Gui/Widgets/ItemInfo.cs(407,65): warning CS0612: `Gtk.Widget.Flags' is obsolete
./src/Gui/Widgets/ItemInfo.cs(407,45): warning CS0612: `Gtk.Widget.Flags' is obsolete
./src/Gui/Widgets/ItemInfo.cs(433,25): error CS0029: Cannot implicitly convert type `Cairo.Context' to `Cairo.Context'
./src/Gui/Widgets/ItemInfo.cs(433,25): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
Internal(1,1): The type `Cairo.Context' has two conflicting definitions, one comes from `Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and the other from `Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' (in the previous error)
Compilation failed: 1 error(s), 8 warnings
make[1]: *** [bin/Release/Basenji.exe] Error 1
make[1]: Leaving directory `/home/elvanor/Desktop/basenji-0.6.1/Basenji'
make: *** [all-recursive] Error 1

I am using Mono 2.6.x. I don't know what's pulling Mono.Cairo v2 (apparently gtk-sharp and other dependencies all pull v1, but I am not a Mono / .NET programmer).

With help from some people on #mono, I found a workaround:

replace -pkg:mono-cairo by -r:Mono.Cairo in the Makefile.

With that, basenji builds fine and runs well 9(entoo has all the needed dependencies packaged). I'd like to integrate Basenji in the Gentoo tree (I am a Gentoo dev) but first this problem should be fixed upstream.

Revision history for this message
Patrick Ulbrich (pulb) wrote :

Hi, thanks for your bugreport.

I wonder what pulls in the cairo 1.0 dependency since I explicitly link against 2.0 only.
I had the same issue on ubuntu some time ago, it's probably a pgkconfig issue.
Can you verify if there are two pkgconfig files for both, mono-cairo 1.0 and 2.0 on you system?
I only have /usr/lib/pkgconfig/mono-cairo.pc which pulls in the 2.0 dependency as it should.
Please also check the output of the following commands and see if those make use of the 1.0 dependency:
pkg-config --libs gtk-sharp-2.0.pc
pkg-config --libs glib-sharp-2.0

Thanks for your packaging support!

Revision history for this message
Patrick Ulbrich (pulb) wrote :

Since the build failure appears to be caused by a mono/cairo-cil packaging issue specific to gentoo, I mark this bug as invalid.
Please feel free to reopen if it turns out otherwise.

Changed in basenji:
status: New → Invalid
Revision history for this message
Elvanör (elvanor) wrote :

Hello, I got the time to look at the issue today. The /usr/lib/pkgconfig/mono-cairo.pc points to the 1.0 dependency so I guess the problem comes from this. I am going to report this to Gentoo's Mono packagers. Thanks for the help, and keep up the good work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.