silnrsi / libreoffice-linguistic-tools

LibreOffice Linguistic Tools for technical write-ups of lesser-known languages.
6 stars 2 forks source link

can't find `libmonoboehm-2.0.so.1` #18

Open agricolamz opened 4 years ago

agricolamz commented 4 years ago

Hi,

when I press select Converter I get an error:

Library error: libmonoboehm-2.0.so.1: cannot open shared object file: No such file or directory.

Looks like it didn't find a path to my libmonoboehm-2.0.so.1, but I have it on my PC:

$ locate libmonoboehm-2.0.so.1
/opt/mono-sil/lib/libmonoboehm-2.0.so.1
/opt/mono-sil/lib/libmonoboehm-2.0.so.1.0.0
/usr/lib/debug/opt/mono-sil/lib/libmonoboehm-2.0.so.1.0.0

What should I do?

* Linux 5.3 * LibreOffice Version: 6.3.1.2 * Linguistics Tools 3.9.2 * SIL FLEx 8.3 * Python library lxml is installed
jkornelsen commented 4 years ago

Well, I installed Flex 8.3 and got the same error. So to tell it where to find the libraries, I did the following:

  1. Edit /etc/ld.so.conf.d/encConverters.conf
  2. Add this line: /opt/mono-sil/lib
  3. Run ldconfig -v as root

However now that it knows where the mono libraries are, it is just crashing for me.

The encoding converters do work in Flex (Bulk Edit Entries). For LibreOffice, the library /usr/lib/fieldworks/libecdriver_64.so embeds mono to call the converters. The ECDriver has not been tested with libmono-2.0 or 64-bit as far as I know. I originally got the code to work with libmono-1.4 or something like that.

jkornelsen commented 4 years ago

Okay, it seems that libecdriver_64.so is not the problem after all. The following calls successfully opened the converter interface:

export MONO_TRACE_LISTENER=Console.Out
python3
from ctypes import *
mylib = cdll.LoadLibrary("/usr/lib/fieldworks/libecdriver_64.so")
funcSelectConverter = mylib.EncConverterSelectConverter
bufConverterName = create_string_buffer(1024)
c_directionFw = c_bool(False)
c_normForm = c_ushort(0)
funcSelectConverter (bufConverterName, byref(c_directionFw), byref(c_normForm))

The next thing to do is determine why these calls worked from the command line but not from LibreOffice.

agricolamz commented 4 years ago

Hi, sorry for the late answer. I tried everything you've wrote, and it had exactly the same effect, as you've wrote. I tried to test everything (open libreoffice, open converter window, choose converter, crash) via terminal and I get this mistake, may be this error will be informative for youю

$ libreoffice6.3 
ECDriver: Loading Mono and SEC classes.
ECDriver: MONO_PATH=/usr/lib/fieldworks.
ECDriver: MONO_REGISTRY_PATH=/var/lib/fieldworks/registry.
ECDriver: Got assembly /usr/lib/fieldworks/SilEncConverters40.dll.
ECDriver: Got image
ECDriver: Got class handle
ECDriver: Calling EncConverters constructor.
EncConverters: Falling back to assembly folder
ECDriver: Finished calling ECs constructor.
ECDriver: Getting EncConverter class methods.
ECDriver: Got methods.

(soffice:6909): Gtk-ERROR **: 10:03:44.232: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

Fatal exception: Signal 5
Stack:
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x154a4)[0x7439fed0f4a4]
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x3d2d0)[0x7439fed372d0]
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x3d36b)[0x7439fed3736b]
/lib/x86_64-linux-gnu/libc.so.6[0x366dc3ef20]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0[0x3673c51ea1]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_default_handler+0xac)[0x3673c52f3c]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_logv+0x25d)[0x3673c531cd]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log+0x8f)[0x3673c5333f]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0[0x368012f5b2]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_option_context_parse+0x1e6)[0x3673c58756]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_parse_args+0xa8)[0x368012f848]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_init_check+0x9)[0x368012f8a9]
[0x412ae89f]

Some info:

$ pkg-config --libs gtk+-2.0

-lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype

$ pkg-config --libs gtk+-3.0

-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0

With the version 6.3.3.2 is the same.

jkornelsen commented 4 years ago

GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

If that is the problem then likely it could be fixed by using apt to remove libreoffice-gtk3 and add libreoffice-gtk instead.

agricolamz commented 4 years ago

I've done it, but the result is the same:

Library error: libmonoboehm-2.0.so.1: cannot open shared object file: No such file or directory. 
jkornelsen commented 4 years ago

I'm not sure why you're mentioning the "No such file" error now. That problem is circumvented with ldconfig as described in my first comment. But from your other message, it sounds like you had already gotten that part to work. Maybe you forgot and need to do that part again?

agricolamz commented 4 years ago

Year, sorry, you are right... I'll do it tomorrow!

agricolamz commented 4 years ago

I've got some new behavior: it closes everything without any message.

agricolamz@agricolamz ~ $ libreoffice6.3 &
[2] 4421
agricolamz@agricolamz ~ $ ECDriver: Loading Mono and SEC classes.
ECDriver: MONO_PATH=/usr/lib/fieldworks.
ECDriver: MONO_REGISTRY_PATH=/var/lib/fieldworks/registry.
ECDriver: Got assembly /usr/lib/fieldworks/SilEncConverters40.dll.
ECDriver: Got image
ECDriver: Got class handle
ECDriver: Calling EncConverters constructor.
EncConverters: Falling back to assembly folder
ECDriver: Finished calling ECs constructor.
ECDriver: Getting EncConverter class methods.
ECDriver: Got methods.

(soffice:4436): Gtk-ERROR **: 10:02:08.266: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

Fatal exception: Signal 5
Stack:
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x154a4)[0x7c6aadea14a4]
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x3d2d0)[0x7c6aadec92d0]
/opt/libreoffice6.3/program/libuno_sal.so.3(+0x3d36b)[0x7c6aadec936b]
/lib/x86_64-linux-gnu/libc.so.6(+0x3efd0)[0x7c6aadad9fd0]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x51ea1)[0x7c6aaa5f8ea1]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log_default_handler+0xac)[0x7c6aaa5f9f3c]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_logv+0x252)[0x7c6aaa5fa1c2]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_log+0x8f)[0x7c6aaa5fa31f]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0[0x368012f5b2]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_option_context_parse+0x1e6)[0x7c6aaa5ff736]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_parse_args+0xa8)[0x368012f848]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_init_check+0x9)[0x368012f8a9]
[0x40d1a00f]
^Q
[2]-  Exit 134                libreoffice6.3