Bug 190579 - abiword does not find libgoffice
Summary: abiword does not find libgoffice
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: abiword
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marc Maurer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-03 18:59 UTC by Toshio Kuratomi
Modified: 2007-11-30 22:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-31 19:51:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace of abiword --g-fatal-warnings. Relevant part appears to be ~ line 12640 (917.03 KB, application/octet-stream)
2006-05-03 18:59 UTC, Toshio Kuratomi
no flags Details

Description Toshio Kuratomi 2006-05-03 18:59:41 UTC
Description of problem:
When loading abiword, it reports to the terminal::
(AbiWord-2.4:10305): GModule-CRITICAL **: g_module_close: assertion `module !=
NULL' failed
strace abiword --g-fatal-warnings shows that abiword is trying to open
libgoffice-1.so and not finding it.  This is because libgoffice-1.so is provided
by the goffice-devel package rather than the goffice package.

Investigation of the abiword source code shows that a plugin is using 
g_module_open ("libgoffice-1", (GModuleFlags)0)

GModule checks for libgoffice-1, libgoffice-1.so, and libgoffice-1.la in order
to load the module dynamically.  This functionality of GModule won't work
without the .so file.

Version-Release number of selected component (if applicable):
abiword-2.4.4-2.fc5
goffice-0.2.0-1.fc5

How reproducible:
Everytime

Steps to Reproduce:
1. yum erase goffice-devel
2. abiword &
3.
  
Actual results:
(AbiWord-2.4:10305): GModule-CRITICAL **: g_module_close: assertion `module !=
NULL' failed

Expected results:
Not seeing any warnings

Additional info:
This happens on both x86_64 and x86.  So the question is: Is libgoffice intended
to be loaded via GModule?  If so, then the goffice main package should provide
goffice.so.  If not, then the abiword plugin will have to be rewritten to
statically link to libgoffice rather than dynamically loading it at runtime.

Comment 1 Toshio Kuratomi 2006-05-03 18:59:42 UTC
Created attachment 128554 [details]
strace of abiword --g-fatal-warnings.  Relevant part appears to be ~ line 12640

Comment 2 Hans de Goede 2006-05-03 20:22:51 UTC
libgofffice is a _lib_ not a plugin and as such should not be opened through
ldopen, instead the abiword plugin using libgoffice should be linked with
-lgoffice. Reassinging to abiword.


Comment 3 Marc Maurer 2006-05-03 22:46:52 UTC
Indeed, Hans is correct. Will patch this upstream, and will patch it in Extras
as well, as I don't expect 2.4.5 soonish.

Comment 4 Jean Bréfort 2006-05-08 10:00:51 UTC
the plugin IS liked with -lgoffice, but not symbols are resolved at runtime and
this breaks goffice plugins, so the use of g_module_open/g_module_close to force
symbols resolution.
If someone knows a cleaner solution, I'd be happy to use it.

Comment 5 Hans de Goede 2006-05-08 10:29:30 UTC
Can't you fix this by passing RTLD_NOW to the dlopen call for loading the plugin?

If not can you describe the problem a bit more, your current description os
rather short.

Comment 6 Jean Bréfort 2006-05-08 12:41:40 UTC
I was wrong about goffice plugins. It is a libglade problem.

Simplistic description:
Currently, modules are loaded with the LOCAL flag. So the symbols from the
plugin (and its libraries) are not loaded in the main program and libglade can't
use them. As we have glade files with custom widgets, we need to make global the
symbols from libgoffice.

Curiously, if a widget of the same type has already been created, libglade finds it.

RTLD_NOW does not fix it.

I'll think a bit more about that and try to find a solution.

Comment 7 Jean Bréfort 2006-08-21 14:42:08 UTC
Fixed upstream.

Comment 8 Marc Maurer 2006-10-31 19:51:18 UTC
Closing, as per comment 7


Note You need to log in before you can comment on or make changes to this bug.