Bug 1004372

Summary: Cryptic dependency of mono(System.Drawing) on libgdiplus-devel kills keepass
Product: [openSUSE] openSUSE Distribution Reporter: James Carter <jimc>
Component: DevelopmentAssignee: Matthias Mailänder <matthias>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_1mnG1T1-Ka, forgotten_HfcM5bRhtu
Version: Leap 42.1   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 42.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description James Carter 2016-10-12 20:26:27 UTC
This is for OpenSuSE "Leap" 42.1
keepass-2.34-1.10.noarch
mono-core-4.0.4-1.8.x86_64 (from main distro)
libgdiplus-devel-3.12-1.1.x86_64
libgdiplus0-3.12-1.1.x86_64

KeePass v2.x is in C-sharp and hence is interpreted by /usr/bin/mono.  
Nothing special in KeePass is involved with this bug.  Nonetheless there
are two bugs reporting this symptom with KeePass in the title: 
https://bugzilla.opensuse.org/show_bug.cgi?id=979464 and
https://bugzilla.opensuse.org/show_bug.cgi?id=972149

When you start keepass from the command line, it complains on stderr:
Unhandled exception: libgdiplus.so not found.
The backtrace reveals that mono(System.Drawing) was the component trying to load
libgdiplus.so ; mono(System.Drawing) is a dependency of keepass.  It is
provided by mono-core, and apparently also by mono-winforms-4.0.4-1.8.x86_64
(which I would expect to require it, not provide it).  

As of 2016-11-12 the effective workaround is to use zypper to install
libgdiplus-devel from the SuSE Build Service, plus its dependency 
libgdiplus0.  See https://bugzilla.opensuse.org/show_bug.cgi?id=944754
for fulminations by someone else about production packages requiring
devel packages, and a (simple) patch which has apparently not made it
into the distro.  The best fix would be for mono-core to explicitly depend
on libgdiplus0 or libgdiplus-devel.
Comment 1 Matthias Mailänder 2016-10-13 05:12:55 UTC
*** Bug 979464 has been marked as a duplicate of this bug. ***
Comment 2 Matthias Mailänder 2016-10-13 05:13:23 UTC
*** Bug 972149 has been marked as a duplicate of this bug. ***
Comment 3 Matthias Mailänder 2016-10-13 05:22:08 UTC
Thanks for the report and the extensive research on this apparently not very well maintained bug tracker. What you describe is essentially bug 944754 which I fixed this January. My fix also has been included in the official 4.6 Mono release from September so users don't need to install -devel packages for no good reason. In Tumbleweed rolling release this is obviously resolved. However no one backported or updated the Leap version.

What you can do is install https://software.opensuse.org/package/mono-core from the Mono:Factory repository or even better submit my fix to the Leap repositories. https://en.opensuse.org/openSUSE:How_to_contribute_to_Leap and https://en.opensuse.org/Portal:Maintenance might be of help. I have never done it myself and I also don't use Leap myself. I only have one Tumbleweed Laptop that I use for development and everyday work.
Comment 4 Matthias Mailänder 2016-10-13 05:29:34 UTC
I submitted https://build.opensuse.org/request/show/434660 to fix this at least in the upcoming 42.2 release as it seems mono-core has been forked from 42.1 there instead of Tumbleweed/Factory.
Comment 5 Bernhard Wiedemann 2016-10-15 12:00:25 UTC
This is an autogenerated message for OBS integration:
This bug (1004372) was mentioned in
https://build.opensuse.org/request/show/435492 42.2 / mono-core
Comment 6 Matthias Mailänder 2017-08-05 09:10:55 UTC
Please update to Leap >= 42.2 where it was fixed.