mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

[Linux/7.8.0] (Arch/Manjaro) monodevelop does not compile if gtk-sharp-3 is installed. #6808

Open lss4 opened 5 years ago

lss4 commented 5 years ago

Was trying to build MonoDevelop 7.8.0.1471 from this PKGBUILD in AUR, and encountered the following errors during compilation.

in main/external/xwt/Xwt.Gtk/Xwt.Gtk.csproj:

Xwt.GtkBackend/GtkWorkarounds.cs(37,26): error CS0234: The type or namespace name 'TreeModel' does not exist in the namespace 'Gtk' (are you missing an assembly reference?)
Xwt.GtkBackend/AccessibleBackend.cs(38,21): error CS0234: The type or namespace name 'Text' does not exist in the namespace 'Atk' (are you missing an assembly reference?)
Xwt.GtkBackend/AccessibleBackend.cs(36,26): error CS0234: The type or namespace name 'Component' does not exist in the namespace 'Atk' (are you missing an assembly reference?)

... and so on.

Apparently the issue was caused by the presence of gtk-sharp-3 in the system as pointed out in the AUR comments (credits to Sodden). For some reasons, the build process would incorrectly choose gtk-sharp-3 instead of gtk-sharp-2 when both are present in the system, causing the build process to fail.

Removing gtk-sharp-3 would allow the package to be built, and reinstalling gtk-sharp-3 afterwards doesn't appear to break anything. However, it appears some other packages in AUR (such as monogame) actually depends on gtk-sharp-3, so it would result in having to rebuild and reinstall these packages whenever I need to update monodevelop.

Although it sounds more like a distro-specific issue, is it possible to have a workaround for this on Monodevelop's side?

knocte commented 5 years ago

what's your script to build?

lss4 commented 5 years ago

If you're referring to the script details, you can look at the PKGBUILD here. When building I didn't modify anything.

It seems I'm still seeing this problem as of today (June 17, 2019).

I now switched to monodevelop-stable-bin which installs a precompiled version so I don't have to deal with this for the time being...