Saturday, January 19, 2013

Successful OALD8 installation on Fedora linux: libgtk-1.2, pronunciation, and Flash

This is the notes for a successful installation of Oxford Advanced Learner's English(OALD8/OALD7) on Fedora 16 GNU/Linux at Jan. 2013. The main issues covered are: libgtk-1.2.so.0 dependency, no sound/pronunciation, and missing flash plugin. The solutions applies to both OALD7 and OALD8.

Jump to the solutions ->

Issues:

1. Legacy libgtk dependency is the first problem came up, right after I mounted the iso, and tried to run . linux/steup.sh:

"error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: no such file or directory"

2. If you have the libgtk dependency, the dictionary should install and start up without problem. However, if you run the ./oald8 directly, it will not play the word pronunciation / sound, and you may see the error messages complaining about libflashplayer.so could not load, like the one below:

"error while loading shared libraries: libnssutil3.so.1d: cannot open shared object file: no such file or directory"

While it the sound issue may seem to be caused of the broken Flash plugin, it is indeed related to the conflicts between OSS(Open Sound System, legacy system used by the dictionary) and PulseAudio(commonly installed on GNU/Linux nowadays).

3. The Flash plugin issue has 3 parts.

First, the libflashplayer.so came with the package is missing a few dependencies: libplc4.so.0d, libplds4.so.0d, libnspr4.so.0d, libnssutil3.so.1d. That is why you saw the error messages mentioned above.

Secondly, the version matters. The latest version of Flash plugin for GNU/Linux (11.2 r202) will crash if you try copying libflashplayer.so from /usr/lib/flash-plugin/ to the oald8/plugins/. The 10.2 and 10.0 version suggested by Mac users would not work on Fedora either.

Thirdly, copy instead of (soft) link. I can confirm that OALD8 failed even when ln -s the Flash plugin 9 library, which worked later when copied to the plugins folder.

Ideas:

It would be nice to port the OALD to a later version of XUL runner, so that the dictionary could be run in Firefox. Since the application was developed on an older version of Mozilla codebase, Seamonkey  1.8, most of the content can be reused directly. One issue, however, is the changed format of manifest file, which is required to register the chrome.

Solutions:

# legacy gtk dependency
yum install glib.i686 gtk+.i686

# pulseaudio oss wrapper, for pronunciation
padsp ./oald8

# link the missing libraries
ln -s /usr/lib/libnssutil3.so libnssutil3.so.1d
ln -s libplc4.so libplc4.so.0d
ln -s libplds4.so libplds4.so.0d
ln -s libnspr4.so  libnspr4.so.0d

# use flash player 9
http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp9r280_plus_archive.zip

# misc, debug
padsp ./oald8 -jsconsole

window.open("chrome://oald8/content/flash/main.xul","oo","chrome,width=600,height=300")

window.open("chrome://oald8/content/flash/main.xul","oo","menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes,width=600,height=300")

# icon, for launcher
chrome/icons/default/main.xpm

# unsolved issues
* Resources content can not display, as a result of broken built in PDF viewer.
* Practise your pronunciation part does not play/record your voice.

1 comment:

Anonymous said...

Try this for resources tab

change line 31 in "chrome/oald8/content/js/resources.js":
L_File.launch(); -> pdf_program L_File;