Bug 475992

Summary: dia crashes on start: Couldn't find standard objects
Product: [Fedora] Fedora Reporter: Horst H. von Brand <vonbrand>
Component: diaAssignee: Huzaifa S. Sidhpurwala <huzaifas>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: caolanm, corbet, huzaifas, mclasen, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-04 04:19:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dia-0.96.1-so-plugin.patch
none
dia.spec for 0.9.6.1-9.1 none

Description Horst H. von Brand 2008-12-11 13:47:10 UTC
Description of problem:
Starting dia crashes immediately.

Version-Release number of selected component (if applicable):
dia-0.96.1-9.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start dia in a gnome-terminal
2.
3.
  
Actual results:
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory

** (dia:8932): CRITICAL **: Couldn't find standard objects when looking for object-libs in '/usr/lib64/dia'; exiting...

Expected results:
Start dia

Additional info:
This maybe isn't dia's fault, it used to work recently (after its last update, IIRC)

Comment 1 Horst H. von Brand 2008-12-11 19:08:17 UTC
The spam "Gtk message..." is due to missing PackageKit-gtk-module (reported as 476066)

Comment 2 Huzaifa S. Sidhpurwala 2008-12-12 03:39:05 UTC
I agree, closing the bug

Comment 3 Horst H. von Brand 2008-12-12 17:23:55 UTC
Nope, just the Gtk message part is fixed. dia still crashes, even after installing PackageKit-gtk-module.

Comment 4 Jonathan Corbet 2008-12-15 20:37:29 UTC
I have this problem too, with dia-0.96.1-9.fc11.x86_64 and PackageKit-gtk-module-0.4.0-1.fc11.x86_64.

The weird thing is that, according to strace, it's not actually looking for a whole lot of stuff in that directory - just a few standard libraries which it subsequently finds in their proper homes.

Comment 5 Ola Thoresen 2008-12-27 13:34:34 UTC
Same on my i386 here:

$ dia

** (dia:4481): CRITICAL **: Couldn't find standard objects when looking for object-libs in '/usr/lib/dia'; exiting...

$ rpm -q dia
dia-0.96.1-9.fc11.i386

Comment 6 Huzaifa S. Sidhpurwala 2009-01-03 03:35:46 UTC
Ok,
Sorry for the delay here ,will work on this as soon as i am back from my vacation ie in 2-3 days.

Comment 7 Huzaifa S. Sidhpurwala 2009-01-03 03:48:05 UTC
So here is what the problem is:
In the version 0.96.1-9
.la files were removed, this is what is causing this error, odd though.

Comment 8 Huzaifa S. Sidhpurwala 2009-01-03 11:16:36 UTC
Simple Experiment:
Install the older version of dia ie dia-0.96.1-7.fc10.i386 this works fine.
Now remove the .la files from /usr/lib/dia and it crashes with exactly the same error.

This is exactly what has been done in 0.96-1-9.
After examining the source it seems that the function dia_register_plugins is looking at the .la files to determine where the dia libs are and when they dont exists its konks off.

I am going to talk to upstream to see if something can be done on this.

ccing Caolan McNamara on this bug as he made the last change to remove the .la files.

Caolan, 
any idea if dia was tested after making this change, as to if it worked?

Comment 9 Matthias Clasen 2009-01-03 15:13:46 UTC
Looks like all you have to do is replace 

/* this one should work on any platform where libtool is used to compile dia */
#  define PLUG_IN_EXT ".la"
#  define PLUG_IN_EXT_LEN 3
#  define USING_LIBTOOL 1

by

#define PLUG_IN_EXT ".so"
#define PLUG_IN_EXT_LEN 3
#define USING_LIBTOOL 0

Comment 10 Horst H. von Brand 2009-01-03 19:00:46 UTC
Yep, that fixes it. Resulting patch and spec file attached.

Thanks!

Comment 11 Horst H. von Brand 2009-01-03 19:02:09 UTC
Created attachment 328113 [details]
dia-0.96.1-so-plugin.patch

Comment 12 Horst H. von Brand 2009-01-03 19:03:30 UTC
Created attachment 328114 [details]
dia.spec for 0.9.6.1-9.1

A spec file using the patch, tested to fix the issue.

Comment 13 Huzaifa S. Sidhpurwala 2009-01-04 03:28:48 UTC
I already have the patch committed, building the rpm now

Comment 14 Huzaifa S. Sidhpurwala 2009-01-04 04:14:49 UTC
http://koji.fedoraproject.org/koji/buildinfo?buildID=77053 is now build and ready for testing

Comment 15 Caolan McNamara 2009-01-05 13:44:56 UTC
Re #8 Hmm, I clearly didn't even run it once, sorry about that.