Bug 190579 - abiword does not find libgoffice
abiword does not find libgoffice
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: abiword (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marc Maurer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-03 14:59 EDT by Toshio Kuratomi
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-31 14:51:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 14:59 EDT, Toshio Kuratomi
no flags Details

  None (edit)
Description Toshio Kuratomi 2006-05-03 14:59:41 EDT
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 14:59:42 EDT
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 16:22:51 EDT
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 18:46:52 EDT
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 06:00:51 EDT
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 06:29:30 EDT
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 08:41:40 EDT
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 10:42:08 EDT
Fixed upstream.
Comment 8 Marc Maurer 2006-10-31 14:51:18 EST
Closing, as per comment 7

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