[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mozembed segfaults – library path woes?



Hi,

Am Freitag, den 16.04.2010, 17:19 -0300 schrieb Marco Túlio Gontijo e
Silva:
> Excerpts from Joachim Breitner's message of Sex Abr 16 17:05:34 -0300 2010:
> (...)
> > Loading package mozembed-0.10.1 ... <command line>: can't load .so/.DLL for:
> > xpcom (libxul.so: cannot open shared object file: No such file or directory)
> 
> This is the problem I had the last time I tried to package it.  See:
> 
> http://sourceforge.net/mailarchive/forum.php?thread_name=1214335347.2850.9.camel%40quindinho.domain.invalid&forum_name=gtk2hs-devel

As suggested by
https://launchpad.net/ubuntu/+source/firefox/+bug/26436 comment #2, you
need to make add an rpath to the binary. When compiling your example
code from
http://lists.alioth.debian.org/pipermail/pkg-mozilla-maintainers/2008-June/003705.html
using
$ gcc  `pkg-config --cflags --libs mozilla-gtkmozembed gtk+-2.0 ` -lxpcom  mozembed.c  -o lala -Wl,-rpath,/usr/lib/xulrunner-1.9.1/
it does actually compile, but still segfaults:

$ gdb -ex run -ex bt ./lala
Reading symbols from /tmp/lala...(no debugging symbols found)...done.
Starting program: /tmp/lala 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6e14799 in EmbedPrivate::Realize (this=0x666a00, aAlreadyRealized=<value optimized out>) at EmbedPrivate.cpp:295
295	EmbedPrivate.cpp: Datei oder Verzeichnis nicht gefunden.
	in EmbedPrivate.cpp
#0  0x00007ffff6e14799 in EmbedPrivate::Realize (this=0x666a00, aAlreadyRealized=<value optimized out>) at EmbedPrivate.cpp:295
#1  0x00007ffff6e131ad in gtk_moz_embed_realize (widget=0x63a8a0) at gtkmozembed2.cpp:490
#2  0x00007ffff3b0747e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007ffff3b1ccd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007ffff3b1ea86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff3b1efd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007ffff5977217 in gtk_widget_realize () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007ffff5977a78 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007ffff5987c42 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007ffff3b0747e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff3b1ccd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff3b1ea86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff3b1efd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff5977a4e in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff5987d84 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff3b0747e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff3b1ccd1 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff3b1ea86 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff3b1efd3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff59781cb in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x0000000000400b83 in main ()


I assume that we have two issues here:
 * Using mozembed from ghci, fails because the module loading (dload
maybe?) does not take the rpath or library-paths setting into account,
thus not finding the module.
 * Building (successfully) with ghc, but having the final program crash.
But since this happens with a C program at the same position, maybe
there is a bug in the library?

Can other please try if the code from Marco’s mail, compiled with the
command line in this message, segfaults?

I’ll be filing a bug against xulrunner-dev.

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: